Hi men,
I have to display in a ComboBox within a form, the state description
(such as Los Angeles) instead of the state id (e.g. LA) when showing
the customer data from the table CUSTOMER(cust_id, cust_name,
state_id). state_id is a foreign key from the table STATE(state_id,
state_desc) in the CUSTOMER table . So in CUSTOMER, I have this
record : C001;Scott TIGER;LA for cust_id, cust_name and state_id. Now
I just need to display "Los Angeles" in the ComboBox instead of "LA"
when showing the record "C001;Scott TIGER;LA". I have now the
following code:
SimpleStore stateComboStore = new SimpleStore(new String[]{"code",
"desc"}, new Object[][]{
{"LA","Los Angeles"},
{"NY","New York"}
});
stateComboStore .load();
ComboBox stateCOMBO = new ComboBox("State", "state_id", 180);
stateCOMBO .setDisplayField("desc");
stateCOMBO .setEditable(false);
stateCOMBO .setStore(stateComboStore );
But my combo displays "LA" and not "Los Angeles".
Thanks everybody for any reply.
If you save a man, you save the world !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---