Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4273

edit.xhtml.ftl template cause duplicate id changeParent and selectParent

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.2.GA
    • Fix Version/s: None
    • Component/s: Tools
    • Labels:
      None
    • Environment:

      SEAM_HOME/seam-gen/view/edit.xhtml.ftl

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Edit your SEAM_HOME/seam-gen/view/edit.xhtml.ftl file with the described correction

      Show
      Edit your SEAM_HOME/seam-gen/view/edit.xhtml.ftl file with the described correction

      Description

      When a MyEntityEdit.xhtml page with more than one foreign key is generated, the "Select" / "Change" button is generated with an id "changeParent" or "selectParent" for each foreign key.
      This causes "duplicate id" errors when displaying the page.

      The button id must be changed to be unique, e.g. by suffixing with the property name.

      The line 136:

      <s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent' : 'selectParent'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"

      must be replaced by:

      <s:button id="${'#'}{${homeName}.instance.${property.name} != null ? 'changeParent${property.name?cap_first} ' : 'selectParent${property.name?cap_first}'}" value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"

      I did not find references to the button id elsewhere, so it seems that no side effect will appear.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jkronegg Julien Kronegg
              • Votes:
                4 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: