0 Replies Latest reply on Jun 24, 2011 3:58 PM by Sean Jensen

    search using <h:selectOneListbox>

    Sean Jensen Newbie

      I'm trying to modify the search panel on one of my pages using Seam 2.2.1.Final with jboss 5.1.0.GA.  I've copied the generated page so that I can derive functionality without rewriting everything.  I've changed the inputtext box in my search panel to a selectOneListbox and would like to use the selected value in my search.  However I'm getting an error that says:

      'regionIdcode' parameter is invalid: Target Unreachable, 'region' returned null on 'org.domain.fair.entity.InvOrgCode'

      My OrgCodeList.page.xml file code looks like this:

         <param name="from"/>
         <param name="regionIdcode" value="#{invOrgCodeList.invOrgCode.region.regionId}"/>
         <param name="orgCode" value="#{invOrgCodeList.invOrgCode.orgCode}"/>
         <param name="title" value="#{invOrgCodeList.invOrgCode.title}"/>

      My OrgCodeList.xhtml file looks like this:

      <s:decorate template="layout/display.xhtml"> 
      <ui:define name="label">Region:</ui:define>
      <h:selectOneListbox style="color:black" value="#{invOrgCodeList.invOrgCode.region}" size="1">
      <s:selectItems
           value="#{regionList.resultList}"
           itemValue="#{region}"
           var="region"
           label="#{region.code}"
           noSelectionLabel="Select One" />
      <s:convertEntity />
      </h:selectOneListbox>
      </s:decorate>

      My InvOrgCode.java class has these declared with all the appropriate getters and setters.

      private BigDecimal invOrgCodeId; 
      private Region region;
      private String fiscalYear;
      private String orgCode;
      private String title;
      private Set<FairUser> fairUsers = new HashSet<FairUser>(0);
      private Set<InvPosition> invPositions = new HashSet<InvPosition>(0);

      I'm learning so I don't mind a bit of research but I'm also under a deadline so I need a practical solution as soon as I can work it out.