5 Replies Latest reply on Feb 4, 2011 12:27 PM by Coen Damen

    Seam 2.1.2 problem with rich:tabPanel in XXXEdit.xhtml

    Ahmad Adly Newbie

      Hi, I used Seam 2.1.1.GA and post some topics on it. From 2 days ago, I have downloaded Seam 2.1.2 and Create a sample project to see what is new in it, and should we migrate to it or no.
      But I faced a problem with one-to-many relations in Edit page. My scenario is:
      I have Organization entity with relation many-to-one with OrganizationType and Industry entities



      OrganizationType --------------< Organization >-------------- Industry

      When I generated the entities using seam-gen tool, I got in OrganizationEdit.xhtml rich:tabPanel with 2 tabs





      <rich:tab label="Organization type *" labelClass="required">
      .....
          <s:button id="#{organizationHome.instance.organizationType != null ? 'changeParent' : 'selectParent'}" value="#{organizationHome.instance.organizationType != null ? 'Change' : 'Select'} organizationType" view="/OrganizationTypeList.xhtml">
              <f:param name="from" value="OrganizationEdit"\>
          </s:button>
      ......
      </rich:tab\>



      and


      <rich:tab label="Industry *" labelClass="required">
      .....
          <s:button id="#{organizationHome.instance.industry != null ? 'changeParent' : 'selectParent'}" value="#{organizationHome.instance.industry != null ? 'Change' : 'Select'} industry"
                             view="/IndustryList.xhtml">
              <f:param name="from" value="OrganizationEdit"/>
          </s:button>
      ......
      </rich:tab\>



      This causes runtime error with that message




      java.lang.IllegalStateException: duplicate Id for a component changeParent

      It sounds like a bug in seam-gen template, am I right? can any one help?


      Thanks in advance.