Thanks,
integrated with the 25-05-2011 build and this works like a charm!
Announcement
Collapse
No announcement yet.
X
-
We've gone ahead and added a new attribute formatOnFocusChange to TextItem to handle this case - please give it a try and let us know if it works for you and if it meets your needs.
It'll be present in the next nightly build.
Thanks
Isomorphic Software
Leave a comment:
-
The formatter is not going to be invoked unless the value has logically changed. We'll look at what it would take to add a flag saying the formatter should be invoked on focus/blur.
Leave a comment:
-
No, not a hint, but
the item shows value "3 kilo" or "twenty banana crates" as value (output from FormItemValueFormatter.formatValue) until the item receives focus, at that point (and not when the user is typing) it should change into "3" or "twenty crates" or whatever value. The FormItemValueFormatter.formatValue can handle this, but it doesn't seem to be called when the item receives focus.
Is there something better to get this behavior?
thanks,
Leave a comment:
-
What different value? If you're trying to implement a hint that vanishes when the field gets focus, use showHintInField.
Leave a comment:
-
EditorValueFormatter and focus behavior
Hi guys!
I have a FormItem on a DynamicForm and I've set it with the following editorType:
I would like to show a different value to the user when the formitem has the focus.Code:public class CustomEditorType extends TextItem { public CustomEditorType() { super(); this.setEditorValueFormatter(new FormItemValueFormatter() { public String formatValue(Object value, Record record, DynamicForm form, FormItem item) { boolean hasFocusInOurApp = item.getShowIcons(); if (hasFocusInOurApp) { return "1"; } else { return "2"; } } }); } }
The problem is that this value formatter is only called on a redraw.
How can this case be solved without a redraw?
Thank you in advance for any help you can provide.Tags: None
Leave a comment: