Uploaded image for project: '[Read Only] - Hippo Plugins'
  1. [Read Only] - Hippo Plugins
  2. HIPPLUG-695

Easy Forms: When extending fields, the custom field is not handled correctly by the PropertiesPlugin

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • easy-forms-2.12.12
    • 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.

      Attachments

        Activity

          People

            jhoffman Jeroen Hoffman
            jhoffman Jeroen Hoffman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: