I have a SelectItem that displays a list of columns from a ListGrid. The valueField is the name of the column, while the displayField is the title of the column. So, for instance:
value: "OPERATOR"
display value: "Operator Name"
Now, suppose I set the defaultValue to "Operator Name". Then, the SelectItem will display the value I want, but when I getValue() on the SelectItem I get "Operator Name" when I want "OPERATOR". Or, I can set the defaultValue to "OPERATOR", which returns the correct form value, but then the SelectItem displays "OPERATOR" when I want to display "Operator Name". What approach would Isomorphic recommend to remedy this problem?
I thought of using setValue() to choose a value from the item's pick list (thereby getting the correct value and display value), but the pick list apparently doesn't load until I first click on the dropdown to display the select list. It seems to me I could solve this problem by forcing the pick list to load when the DynamicForm loads, and then selecting the correct record from it. But how do I do that?
value: "OPERATOR"
display value: "Operator Name"
Now, suppose I set the defaultValue to "Operator Name". Then, the SelectItem will display the value I want, but when I getValue() on the SelectItem I get "Operator Name" when I want "OPERATOR". Or, I can set the defaultValue to "OPERATOR", which returns the correct form value, but then the SelectItem displays "OPERATOR" when I want to display "Operator Name". What approach would Isomorphic recommend to remedy this problem?
I thought of using setValue() to choose a value from the item's pick list (thereby getting the correct value and display value), but the pick list apparently doesn't load until I first click on the dropdown to display the select list. It seems to me I could solve this problem by forcing the pick list to load when the DynamicForm loads, and then selecting the correct record from it. But how do I do that?
Comment