Hello, help me find my question, expecting a reply, thank you!
Translated from this http://forums.smartclient.com/showthread.php?t=26772 post in Chinese
GWT version: smartgwt-4.0d (nightly20130604)
Problem Description:
When modifying an existing data, double click this record and display a new window which holds each field, and one of the fields needs to use a SelectItem Component .
But the SelectItem displays a blank after something flashing by, and no default value has been selected .(it displays correctly at smartgwt-3 version )
no error has been reported. Here is the snippet of my code . Did I leave out any attributes?
code:
sorry of my pool English.
Translated from this http://forums.smartclient.com/showthread.php?t=26772 post in Chinese
GWT version: smartgwt-4.0d (nightly20130604)
Problem Description:
When modifying an existing data, double click this record and display a new window which holds each field, and one of the fields needs to use a SelectItem Component .
But the SelectItem displays a blank after something flashing by, and no default value has been selected .(it displays correctly at smartgwt-3 version )
no error has been reported. Here is the snippet of my code . Did I leave out any attributes?
code:
Code:
final DataSource titleDataSource = new DataSource(); titleDataSource.setDataURL("system/findTitleAction.do"); titleDataSource.setRecordXPath("/info/allTitle"); DataSourceIntegerField dictDetailId = new DataSourceIntegerField("titleDictDetailId"); dictDetailId.setPrimaryKey(true); dictDetailId.setHidden(true); DataSourceTextField displayVal = new DataSourceTextField("titleDisplayVal"); DataSourceTextField displayText = new DataSourceTextField("titleDisplayText"); titleDataSource.setFields(dictDetailId,displayVal, displayText); final SelectItem titleItem = new SelectItem("titleName"); titleItem.setOptionDataSource(titleDataSource); titleItem.setAutoFetchData(true); titleItem.setValueField("titleDisplayVal"); titleItem.setDisplayField("titleDisplayText"); titleItem.setFilterLocally(true); titleItem.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { System.out.println(titleItem.getValue()); } });
sorry of my pool English.
Comment