SmartClient Version: v11.1p_2017-08-08/PowerEdition Deployment (built 2017-08-08)
I have two ComboBoxItems in the DynamicForm, which are derived from the same datasource. The SQL table is a tree of a two levels, with 3 columns: a pk, branch, leaf. One ComboBox, displays the value of the branch, the other Combo box displays the value of the leaf column.
When the form first draws there is no problem, each ComboBox shows the correct display value for a given pk.
However I want to allow the user to use either the branch ComboBox or leaf ComboBox to change their selections. Let's take the example of the user changing the Leaf ComboBox. The user gets the appropriate drop down list and makes a change to Leaf. However this should or could now change the branch display to some other display value.
I have attempted to use,
a) addChangedHandler on the Leaf ComboBox, and
b) on the branch ComboBox setPickListFilterCriteriaFunction( new com.smartgwt.client.widgets.form.fields.FormItemCriteriaFunction () { } ); to alter the criteria of the branch ComboBox criteria, and
c) Branch.setValue(Leaf.getValue())
d) Branch.setCachePickListResults(false);
to attempt the Branch Display value to update, but it does not. It does do a fetch, but there is no update of the DisplayValue. The Branch ComboBox sets the display with the Value field, i.e. the pk value.
Basically I am trying to set the Branch ComboBox displayValue, but there is no obvious way that I can find to do this. Any suggestions? Is it possible to cause the Branch ComboBox to update it's display value?
I have two ComboBoxItems in the DynamicForm, which are derived from the same datasource. The SQL table is a tree of a two levels, with 3 columns: a pk, branch, leaf. One ComboBox, displays the value of the branch, the other Combo box displays the value of the leaf column.
When the form first draws there is no problem, each ComboBox shows the correct display value for a given pk.
However I want to allow the user to use either the branch ComboBox or leaf ComboBox to change their selections. Let's take the example of the user changing the Leaf ComboBox. The user gets the appropriate drop down list and makes a change to Leaf. However this should or could now change the branch display to some other display value.
I have attempted to use,
a) addChangedHandler on the Leaf ComboBox, and
b) on the branch ComboBox setPickListFilterCriteriaFunction( new com.smartgwt.client.widgets.form.fields.FormItemCriteriaFunction () { } ); to alter the criteria of the branch ComboBox criteria, and
c) Branch.setValue(Leaf.getValue())
d) Branch.setCachePickListResults(false);
to attempt the Branch Display value to update, but it does not. It does do a fetch, but there is no update of the DisplayValue. The Branch ComboBox sets the display with the Value field, i.e. the pk value.
Basically I am trying to set the Branch ComboBox displayValue, but there is no obvious way that I can find to do this. Any suggestions? Is it possible to cause the Branch ComboBox to update it's display value?
Comment