Hello,
We have a case where we want to use a certain data mask as well as a formatter to have a mask to assist input and to have a different format for viewing. It seems that once a mask is specified the format(ter) is ignored.
Is this intended behavior and if so, can we 'disable' that feature somehow?
With this sample code you can see that the formatter is ignored:
We are not certain but we recall that this used to work on an earlier version.
It seems logical that the mask is only used for editing, not for display purpose.
Please advise.
We are on SNAPSHOT_v8.3d_2012-08-14/Pro Deployment (built 2012-08-14).
thanks
We have a case where we want to use a certain data mask as well as a formatter to have a mask to assist input and to have a different format for viewing. It seems that once a mask is specified the format(ter) is ignored.
Is this intended behavior and if so, can we 'disable' that feature somehow?
With this sample code you can see that the formatter is ignored:
Code:
DynamicForm form = new DynamicForm(); form.setWidth(400); TextItem percentageField = new TextItem("percentageItem", "Percentage"); percentageField.setMask("999\\%"); percentageField.setValue(200d); percentageField.setEditorValueFormatter(new FormItemValueFormatter() { public String formatValue(Object value, Record record, DynamicForm form, FormItem item) { return "111"; } }); form.setFields(percentageField);
It seems logical that the mask is only used for editing, not for display purpose.
Please advise.
We are on SNAPSHOT_v8.3d_2012-08-14/Pro Deployment (built 2012-08-14).
thanks
Comment