Create a new store with the current selection... something like that: ListStore<ModelData> newStore = new ListStore<ModelData>(); newStore.add(combo.getSelection()); ComboBox<ModelData> newBox = new ComboBox<ModelData>(); newBox.setStore(newStore);
On 12 Okt., 17:57, Diego Venuzka <[email protected]> wrote: > Ok, that's it! this code solved my problem. But i have another one. For > example, i use this code to select the state, but how i can do another > combobox that show only the cities previously selected in the previous > combobox? > > Thanks for the help! > > 2010/10/11 Carl Pritchett <[email protected]> > > > > > > > Hi, > > > Two tips: Post GXT questions on the Sencha forums and download the GXT > > source code and search it. The source is invaluable. > > > The stock class is not part of the extGWT library, but it is in the > > source code for the examples. For 2.2.0 it is in samples\resources\src > > \com\extjs\gxt\samples\resources\client\model. > > You can add that to your project to get it working, but ultimatley you > > don't want to use the data in the stocks file, you want to use your > > own data in the combo box. > > > You probably want a to create simple list of "state" strings and > > SimpleComboBox<String> > > > e.g. > > > SimpleComboBox<String> combo = new SimpleComboBox<String>(); > > combo.add("Iowa"); > > combo.add("Illinois"); > > .... > > combo.setSimpleValue("Ohio"); > > > Regards, > > Carl Pritchett > > > On Oct 11, 10:28 am, Diego Venuzka <[email protected]> wrote: > > > Hello! > > > On my project, i'll need a combox, to filter states. On the > > > sencha.comsite, > > > i found this example:http://www.sencha.com/examples/#combobox > > > But this code dont work and show: "Class Stock not found". I guess that > > > class have the data to show on combo...But how i create that class? I > > still > > > searching on entire site and i don't found nothing... > > > Somebody have an example to send? > > > > thanks! =) > > > -- > > > Diego Venuzka > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-web-toolkit%2Bunsubs > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > Diego Venuzka -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
