|Showing "special" values in number fields/smart fields [message #1400610]
||Mon, 14 July 2014 12:58
| Urs Beeli
Registered: October 2012
Location: Bern, Switzerland
In our application we have forms that are used to display the values of single objects. For this, we have added IntegerFields, StringFields, LongFields, SmartFields and Checkboxes to the form.|
However, the user also has the possibility to select multiple entries from a table and then display the same form for a consolidation of the values of all those entries. If a certain field has the same value for all entities, the corresponding field will display this value. If a field has differing values across those entries, an asterisk needs to be displayed in this field.
Obviously the case where an identical value needs to be shown is trivial (same as displaying values for a single entity). Covering the asterisk (*) case for a StringField is also trivial.
For the checkbox we wrote our own TriState checkbox control.
However, I don't quite see what the best way would be to display the asterisk for Integer/LongFields and for SmartFields.
For SmartFields I guess I could define a marker value that I could use with setValue() and then cover as a special case in the LookupCalls.getDataByKey() method.
How would this best be done for NumberFields? I could replace them with a StringField but as we also want to be able to enter data (overwriting the * to force a certain value on all instances of the field) this would mean I would need to add a lot of the validation functionality to this field that a NumberField already offers.
Is there a way to call IntegerField.setText() similar to the way execDecorateCell() works on table columns?
Powered by FUDForum
. Page generated in 0.03167 seconds