0 Replies Latest reply on Oct 2, 2008 5:09 PM by Val Sw

    Single xhtml, displaying multiple entity form fields

    Val Sw Expert
      I am new to seam and need your help for issues I am facing (may be these are minor issue), I will be really thankful if you can help me on the issues as below :

      Deatils :
      a) We have a single study.xhtml page, where user can insert form fields corresponding to 3 entities (namely Study, QExp, Region)
      User fills the form and values are persisted correctly.

      However, when user goes to studyList.xhtml, it only displays study deatils field, QExp and Regions are null, probably it calls StudyList.java which returns only study.

      I tried changing in StudyList.java to
      -----------------------
      return "select study,qExp from Study study, QExp qExp";
      -----------------------
      But it gives error as "javax.el.ELException: /studyList.xhtml: For input string: "hjid""
      log:
      -------------------
      10:24:44,862 INFO  [STDOUT] Hibernate:
          select
              study0_.HJID as HJID0_0_,
              quantexper1_.HJID as HJID1_1_,
              study0_.STUDYID as STUDYID0_0_,
              study0_.STUDYNAME as STUDYNAME0_0_,
              study0_.NUMBEROFEXPERIMENTS as NUMBEROF4_0_0_,
              study0_.STUDYDATE as STUDYDATE0_0_,
              study0_.LASTUPDATEDTIMESTAMP as LASTUPDA6_0_0_,
              qexp1_.LASTUPDATEDTIMESTAMP as LASTUPDA2_1_1_,
              qexp1_.EXPERIMENTTYPE as EXPERIME3_1_1_,
              qexp1_.ENTRYPOINT as ENTRYPOINT1_1_,
              qexp1_.AFFINITYCOMPOUND as AFFINITY5_1_1_,
              qexp1_.PURIFICATIONPOOLID as PURIFICA6_1_1_,
              qexp1_.EXPERIMENTNAME as EXPERIME7_1_1_,
              qexp1_.EXPERIMENTTABLENAME as EXPERIME8_1_1_,
              qexp1_.PROTXML as PROTXML1_1_,
              qexp1_.QUANTEXPERIMENTDATE as QUANTEX10_1_1_
          from
              MET_STUDY study0_,
              MET_Q_EXP qexp1_
      10:24:45,221 ERROR [STDERR] Oct 2, 2008 10:24:45 AM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/studyList.xhtml]
      javax.el.ELException: /studyList.xhtml: For input string: "hjid"
      ..............................................
      -------------------
      @Name("studyList")
      public class StudyList extends EntityQuery
      {
          @Override
          public String getEjbql()
          {
              return "select study from Study study";
          }
      }

      study.xhtml
      -----------
      <s:decorate id="studyNameDecoration" template="layout/edit.xhtml">
           <ui:define name="label">Study Name</ui:define>
           <h:inputText id="name" required="true"
                     value="#{studyHome.instance.studyName}"/>
      </s:decorate>

      This is null
      <s:decorate id="entryPointDecoration" template="layout/edit.xhtml">
           <ui:define name="label">Entry Point</ui:define>
           <h:inputText id="name" required="true"
                     value="#{qExpHome.instance.entryPoint}"
                     label="#{qExptHome.instance.entryPoint}"/>
      </s:decorate>