Adding property that is not present on the form object to the form model ?
Hello
I'm trying to add a property that is not present on the form object to my form model object.
The following code does work to some extend but the default commit button in my view does not get enabled when changes are made to the custom property through the UI binding where as changes to "real" object properties does enable the commit button.
Code:
private JCheckBox createManualTrack;
private boolean createMan = false;
private ValueModel createManual = new ValueHolder(createMan);
protected JComponent createFormControl() {
...
getFormModel().add(
"createManual",
createManual,
new DefaultFieldMetadata(getFormModel(),
new FormModelMediatingValueModel(createManual),
Boolean.class, false, null));
createManualTrack = (JCheckBox) formBuilder.add("createManual")[1];
Any hints?
I can not find any test cases for
Code:
ValueModel add(String propertyName, ValueModel valueModel, FieldMetadata fieldMetadata);
Thanks
carsten