Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-9341

Fix field variables resolution in sub widget templates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.6-RC1, 5.6
    • Component/s: Layouts & Widgets

      Description

      Steps to reproduce:

      • define a complex property, mutlivalued, with 2 different fields
      • define default widgets for this property, but change the complex property subwidgets to use a widget template
        The widget template maps the 2 fields and references them using # {field_0} and #{field_1} as usual

        => the layout cannot be submitted correctly and crashes with an error like:

        Caused by: javax.el.PropertyNotFoundException: /widgets/2fields_widget_template.xhtml @17,63 value="#{field_0}

        ": /widgets/complex_widget_template.xhtml @84,67 value="#

        {field['firstName']}": Target Unreachable, identifier 'field' resolved to null
        at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)

        or if the sub field value was already set:

        Caused by: javax.el.ELException: /widgets/2fields_widget_template.xhtml: /widgets/complex_widget_template.xhtml @84,67 value="#{field['firstName']}

        ": Property 'firstName' not found on type java.lang.String
        at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)

      This makes it impossible to use widget templates for sub fields.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                atchertchian Anahide Tchertchian
                Reporter:
                atchertchian Anahide Tchertchian
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: