Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
We created our own RadioGroup field, which has an extra property. The custom RadioGroup extends the default RadioGroup (on a CND level). It seems that when you extend a field, this is not correctly handled by the PropertiesPlugin. Instead that the custom fields and panels of the custom radio fields are being used, the standaard RadioGroup fields and panels are used.
In the PropertiesPlugin there is a check to determine which field which performs a check on the nodetype of the field definition should be used. Instead of matching the actual node type, it checks whether the node is of a certain type. For types extending another field (which is not excluded) it means that is also match with the super type, resulting in the wrong field definition being used.
See PropertiesPlugin.java:
https://forge.onehippo.org/svn/easy-forms/easy-forms/trunk/cms/src/main/java/org/onehippo/forge/easyforms/properties/PropertiesPlugin.java
In method #getPropertiesPanel:
if (selectedNode.isNodeType(field.getNodeName())) {
Should probably be replaced by:
if (selectedNode.getPrimaryNodeType().getName().equals(field.getNodeName())) {
The match on supertypes makes the standard type always match, so if you have you're own derived implementation that one is never matched.