Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default [CLOSED] ComboBox getValue return null - rc1

    [CLOSED] ComboBox getValue return null - rc1


    click in the button "get combo value" you can see one alert showing that the value is null, but the value was set before the combo render..

    Data.java
    Code:
    package example.client;
    
    import com.extjs.gxt.ui.client.data.BaseModel;
    
    public class Data extends BaseModel {
    
    	public Data() {
    
    	}
    
    	public Data(String name) {
    		setName(name);
    	}
    
    	public String getName() {
    		return get("name");
    	}
    
    	public void setName(String name) {
    		set("name", name);
    	}
    }
    GreetingService.java
    Code:
    package example.client;
    
    import com.extjs.gxt.ui.client.data.BasePagingLoadResult;
    import com.google.gwt.user.client.rpc.RemoteService;
    import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
    
    @RemoteServiceRelativePath("greet")
    public interface GreetingService extends RemoteService {
    	BasePagingLoadResult<Data> getData();
    }
    GreetingServiceAsync.java
    Code:
    package example.client;
    
    import com.extjs.gxt.ui.client.data.BasePagingLoadResult;
    import com.extjs.gxt.ui.client.data.ModelData;
    import com.google.gwt.user.client.rpc.AsyncCallback;
    
    public interface GreetingServiceAsync {
    	void getData(AsyncCallback<BasePagingLoadResult<ModelData>> callback);
    }
    Gxt.java
    Code:
    package example.client;
    
    import java.util.List;
    import com.extjs.gxt.ui.client.data.BaseListLoader;
    import com.extjs.gxt.ui.client.data.ModelData;
    import com.extjs.gxt.ui.client.data.RpcProxy;
    import com.extjs.gxt.ui.client.event.ButtonEvent;
    import com.extjs.gxt.ui.client.event.SelectionListener;
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.extjs.gxt.ui.client.widget.form.ComboBox;
    import com.extjs.gxt.ui.client.widget.form.FormPanel;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.user.client.Window;
    import com.google.gwt.user.client.rpc.AsyncCallback;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class Gxt implements EntryPoint {
    
    	private final GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
    
    	public void onModuleLoad() {
    
    		RpcProxy<List<ModelData>> proxy = new RpcProxy<List<ModelData>>() {
    
    			@Override
    			protected void load(Object loadConfig, AsyncCallback callback) {
    
    				greetingService.getData(callback);
    			}
    		};
    
    		BaseListLoader loader = new BaseListLoader(proxy);
    		ListStore<ModelData> store = new ListStore<ModelData>(loader);
    
    		final ComboBox<ModelData> combo = new ComboBox<ModelData>();
    		combo.setDisplayField("name");
    		combo.setStore(store);
    		combo.setFieldLabel("Example");
    		combo.setValue(new Data("data value"));
    
    		FormPanel panel = new FormPanel();
    		panel.add(combo);
    
    		Button button = new Button("get combo value", new SelectionListener<ButtonEvent>() {
    
    			@Override
    			public void componentSelected(ButtonEvent ce) {
    
    				ModelData value = combo.getValue();
    
    				String msg = "";
    
    				if (value != null) {
    
    					msg = value.get("name");
    				} else {
    					msg = "null";
    				}
    
    				Window.alert(msg);
    			}
    		});
    
    		RootPanel.get().add(panel);
    		RootPanel.get().add(button);
    	}
    }
    GreetingServiceImpl.java
    Code:
    package example.server;
    
    import java.util.ArrayList;
    import java.util.List;
    import com.extjs.gxt.ui.client.data.BasePagingLoadResult;
    import com.google.gwt.user.server.rpc.RemoteServiceServlet;
    import example.client.Data;
    import example.client.GreetingService;
    
    @SuppressWarnings("serial")
    public class GreetingServiceImpl extends RemoteServiceServlet implements GreetingService {
    
    	public BasePagingLoadResult<Data> getData() {
    
    		List<Data> list = new ArrayList<Data>();
    		list.add(new Data("name 1"));
    		list.add(new Data("name 2"));
    		list.add(new Data("name 3"));
    		list.add(new Data("name 4"));
    		list.add(new Data("name 5"));
    
    		return new BasePagingLoadResult<Data>(list);
    	}
    }

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is not really an issue in the combobox. The item is not in the store, so you cant get it. You can use getRawValue which gets you the rawvalue. I am closing this isuse.

  3. #3
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default


    ok.. I agree if you,

    but its really necessary access all data in store to get the combobox value? I think that ISNT a good ideia.. for performace..

    If I have one form.. that I need edit the data.. I set all values for my inputs (incluind textfields and combobox).. and if the user will realy need change the combobox value.. he will click in trigger and choose other item..

    you told that The item is not in the store but if I change my code for this..

    Code:
    combo.setValue(new Data("name 1"));
    now the item is in the store.. but continue return null..

    other way.. raw value its one String and not the really value of my combo that its one ModelData

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    No it is not in the store as your load your data later. Use a memoryproxy for example.

  5. #5
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744
    Vote Rating
    -1
    fother is an unknown quantity at this point

      0  

    Default


    ok.. I can use other ways to do this... overwrite the method.. or create my combo box but the problem is that the concept its wrong.. in all frameworks.. if you have one method get and set.. what you set should be what you get..

    why need iterate in store to get the value if you have one get and set? when the user choose the item in list.. call method set.. I dont see none problem..

Thread Participants: 1