jhickman / gxt-uibinder

Automatically exported from code.google.com/p/gxt-uibinder
0 stars 0 forks source link

Support for SimpleComboBox #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
like this:

<form:SimpleComboBox width="80">
   <form:SimpleComboValue>"before"</form:SimpleComboValue>
   <form:SimpleComboValue>"after"</form:SimpleComboValue>
</form:SimpleComboBox>

??

Original issue reported on code.google.com by joel.re...@gmail.com on 15 Mar 2011 at 5:08

GoogleCodeExporter commented 9 years ago
Probably would have to do something different with the SimpleComboValue.  The 
UiBinder Editor always has problems with non-Widget elements.

It looks like the add() method on SimpleComboBox supports any data type to be 
added

Original comment by jus...@jhickman.com on 15 Mar 2011 at 6:59

GoogleCodeExporter commented 9 years ago
so, how would you use SimpleComboBox currently? (simple example?)

Original comment by joel.re...@gmail.com on 15 Mar 2011 at 7:06

GoogleCodeExporter commented 9 years ago
Sorry.  I didn't mean that it currently works today.  Most likely it won't 
without some custom XML parsing.

Original comment by jus...@jhickman.com on 15 Mar 2011 at 7:11

GoogleCodeExporter commented 9 years ago
I have been trying to get just ComboBox to work per your example, I'm getting 
this:

[ERROR] - Returns class ListStore<ComboBoxItem>, can't be used as class 
ListStore<D>

(qualified names removed for brevity)...
my class (ComboBoxItem) is simply extending BaseModel like your Stock class 
does.
any clue what is wrong here? 

Original comment by joel.re...@gmail.com on 15 Mar 2011 at 7:44

GoogleCodeExporter commented 9 years ago
I'm assuming you're referring to the Forms demo.

From that demo, I have this:

<ui:with type="com.extjs.gxt.ui.client.store.ListStore" field="companyStore" />
...
<form:ComboBox fieldLabel="Company" displayField="name" triggerAction="ALL" 
store="{companyStore}" />

With a UiFactory:
@UiFactory
public ListStore<Stock> provideCompanyStore() {
...
}

What version of GWT and GXT are you using?

Original comment by jus...@jhickman.com on 15 Mar 2011 at 7:50

GoogleCodeExporter commented 9 years ago
GWT 2.1.1
GXT 2.2.1

Original comment by joel.re...@gmail.com on 15 Mar 2011 at 7:55

GoogleCodeExporter commented 9 years ago
sorry...my bad...I tried doing this through a property of an object provided by 
a UiFactory - it apparently won't allow that.

Original comment by joel.re...@gmail.com on 15 Mar 2011 at 8:05

GoogleCodeExporter commented 9 years ago
Okay.  So, you're good with the ComboBox.  You still need the SimpleComboBox 
however.

Original comment by jus...@jhickman.com on 15 Mar 2011 at 8:07

GoogleCodeExporter commented 9 years ago
it would be nice. yes.

Original comment by joel.re...@gmail.com on 15 Mar 2011 at 9:02

GoogleCodeExporter commented 9 years ago
Add support in 0.9-SNAPSHOT.  Will be available in the next release (most 
likely this coming weekend).

Used the XML:

<form:SimpleComboBox ui:field="checkNodes" triggerAction="ALL" editable="false" 
simpleValue="Both">
    <form:value>Both</form:value>
    <form:value>Leaf</form:value>
    <form:value>Parent</form:value>
</form:SimpleComboBox>

Right now, it will only support String values as nested children.  

Original comment by jus...@jhickman.com on 16 Mar 2011 at 3:35

GoogleCodeExporter commented 9 years ago
Demo can be seen here:

http://gxt-uibinder.appspot.com/#MyPlace:checkboxtree

Original comment by jus...@jhickman.com on 16 Mar 2011 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by jus...@jhickman.com on 16 Mar 2011 at 3:42

GoogleCodeExporter commented 9 years ago

Original comment by jus...@jhickman.com on 18 Mar 2011 at 4:19

GoogleCodeExporter commented 9 years ago
Thanks for this enhancement. works great!

Original comment by joel.re...@gmail.com on 22 Mar 2011 at 9:30