[
https://issues.jboss.org/browse/DROOLS-1940?page=com.atlassian.jira.plugi...
]
Michael Anstis resolved DROOLS-1940.
------------------------------------
Resolution: Out of Date
Properties can be made read-only using the {{@FormField(readonly = true)}} annotation.
[DMN Editor] Dynamic Form "read only" not working
-------------------------------------------------
Key: DROOLS-1940
URL:
https://issues.jboss.org/browse/DROOLS-1940
Project: Drools
Issue Type: Bug
Components: DMN Editor
Reporter: Michael Anstis
Assignee: Pere Fernández Pérez
Priority: Major
Labels: drools-tools
I don't know whether it's related to my problems with a object hierarchy and
{{@FormField}} re-use; but fields annotated {{@FieldReadOnly}} do not appear as read-only
in the "Properties Panel". For example:-
{code}
@FieldDefinition(labelMode = LabelMode.OVERRIDE_I18N_KEY)
public class Id implements DMNProperty {
...
@ReadOnly
@FieldReadOnly
public static final Boolean readOnly = true;
...
}
public abstract class DMNModelInstrumentedBase implements DMNDefinition {
//No @FormFields etc
}
public abstract class DMNElement extends DMNModelInstrumentedBase {
@Property
@FormField
protected Id id;
....
}
public abstract class NamedElement extends DMNElement {
....
}
@FormDefinition(policy = FieldPolicy.ONLY_MARKED)
public class InformationItem extends NamedElement implements DMNPropertySet {
....
}
{code}
The "Propeties" widget for "Id" can still be edited; although changes
are not persisted (i.e. if I change the "Id" to "xyz" and then click
on a different node and back to the one I changed the "Id" property is not
"xyz"). I would however expected the {{TextBox}} to have been read-only and the
value not editable.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)