I face the case when I need to filter optionalDataSource
Using criteria doesn't work here is the sample of code
Explanation of how setOptionFilterContext() forks is very vague
Is there a sample code where can I see how to use it on client and server sides.
Thank you
Using criteria doesn't work here is the sample of code
Code:
ListGridField lf = lsf[i];
final ComboBoxItem cb = new ComboBoxItem();
// this is very custom piece of code, works only when field name is "FIELD_NAME"
if(lf.getName().equals("FIELD_NAME")) {
cb.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
Criteria fieldClit = new Criteria();
String tableName = record.getAttributeAsString("TABLE_NAME");
fieldClit.addCriteria("TABLE_NAME", tableName);
cb.setOptionCriteria(fieldClit);
}
});
lf.setEditorType(cb);
Is there a sample code where can I see how to use it on client and server sides.
Thank you
Comment