FF 5.0
GWT 2.4
SGWT Power 3.0p (From dev console ==> SmartClient Version: v8.2p_2012-06-30/PowerEdition Deployment (built 2012-06-30) )
I have a use case where I need a SelectItem to display the list based on an option which user has selected. The list is rendered
via the setPickListProperties and the underlying picklistProperty field allows for filtering.
The problem : On selecting to filter by either rule, the list displays the expected rows. However if the search feature of the pickListProperty field
is used, you are able to locate entries which aren't in the filtered list.
Below is the code which I am using as a test (its almost as good as a stand alone test case).
The *.ds.xml entries are straight forward queries and as mentioned returns the expected rows.
Let me know what I am missing as I suspect I have overlooked something.
GWT 2.4
SGWT Power 3.0p (From dev console ==> SmartClient Version: v8.2p_2012-06-30/PowerEdition Deployment (built 2012-06-30) )
I have a use case where I need a SelectItem to display the list based on an option which user has selected. The list is rendered
via the setPickListProperties and the underlying picklistProperty field allows for filtering.
The problem : On selecting to filter by either rule, the list displays the expected rows. However if the search feature of the pickListProperty field
is used, you are able to locate entries which aren't in the filtered list.
Below is the code which I am using as a test (its almost as good as a stand alone test case).
Code:
public void onModuleLoad() { DynamicForm mainForm = getMainForm(); RootPanel.get().add(mainForm); } private DynamicForm getMainForm() { final DynamicForm form = new DynamicForm(); form.setHeight(105); form.setWidth100(); final ListGrid pickListProperties = new ListGrid(); pickListProperties.setShowFilterEditor(true); pickListProperties.setFilterOnKeypress(true); pickListProperties.setFetchOperation("dummytest3"); //Initialize here for initial restrictions pickListProperties.filterByEditor(); final SelectItem fsId = new SelectItem("FSID") ; ListGridField f1Field = new ListGridField("F1ID"); ListGridField f2Field = new ListGridField("F2ID"); ListGridField f3Field = new ListGridField("F3ID"); ListGridField f4Field = new ListGridField("F4ID"); f3Field.setWidth(100); fsId.setOptionDataSource(DataSource.get("TABLENAME")); fsId.setValueField("F1ID"); fsId.setDisplayField("F2ID"); fsId.setOptionOperationId("dummytest3"); fsId.setPickListWidth(420); fsId.setPickListFields( f1Field, f2Field,f3Field,f4Field); fsId.setPickListProperties(pickListProperties); fsId.setEndRow(true); ButtonItem b1 = new ButtonItem(); b1.setTitle("FS - D1"); //Simulate the user selection of filter rule 1 b1.addClickHandler((new ClickHandler() { @Override public void onClick(ClickEvent event) { SC.say("b1 pressed - DUMMYTEST1"); //Set both filter operations ,ie on the SelectItem and ListGrid fsId.setOptionOperationId("dummytest1"); pickListProperties.setFetchOperation("dummytest1"); } })); ButtonItem b2 = new ButtonItem(); b2.setTitle("FS - D3"); //Simulate the user selection of filter rule 2 b2.addClickHandler((new ClickHandler() { @Override public void onClick(ClickEvent event) { SC.say("B2 pressed - DUMMYTEST3"); //Set both filter operations ,ie on the SelectItem and ListGrid fsId.setOptionOperationId("dummytest3"); pickListProperties.setFetchOperation("dummytest3"); } })); b1.setEndRow(false); b2.setStartRow(false); form.setNumCols(4); //Setup the FORM fields form.setFields(fsId,b1,b2); return form; }
Let me know what I am missing as I suspect I have overlooked something.
Comment