1

I'm working on a page that has a search functionality. The top of the page is for search criteria, the bottom of the page is to display search results in radio buttons.
The user then selects a radio button and clicks next to save the selection.

I only want to display the results after the search button has been pressed. I have been unable to save the values within the panelGroup if I use the "rendered" attribute.

Excerpts of my jsp:

<div>
    <div>
        <h:outputFormat value="Search SEIN"></h:outputFormat>
        <h:inputText value="#{pc_Mresearch.sein}"></h:inputText>
    </div>
    <h:commandButton action="#{pc_Mresearch.doSeinSearch}" value="Search"/>
</div> 

<h:panelGroup rendered="#{pc_Mresearch.searchResultsReturned}">
    <legend class="legend">Results</legend>
    <div id="searchResultsRadioButtons">                    
        <h:selectOneRadio layout="pageDirection" id="radioAcctNum" value="#{pc_Mresearch.employeracct}">             
            <f:selectItems value="#{pc_Mresearch.recentSEINEmployerList}"/>
            <f:selectItem itemLabel="Not Listed" itemValue="0"/>
        </h:selectOneRadio>                 
    </div>              
</h:panelGroup>         
<hx:commandExButton type="submit" value="Next" id="next" action="NextPage"></hx:commandExButton>

Excerpts of pc_Mresearch bean:

public String doSeinSearch() {
    // make web svc call to search by SEIN

    // populate recentSEINEmployerList property to be used by searchResultRadioButtons

    if (recentSEINEmployerList != null) {
        this.searchResultsReturned = true;  //to be used by "rendered" property
    }
    return "Success";
}

I came across an article (http://docs.oracle.com/cd/E19226-01/820-7627/bnarj/index.html) that says

"the rendered attribute is restricted to using rvalue expressions. As explained inValue and Method Expressions http://docs.oracle.com/cd/E19226-01/820-7627/bnahu/index.html , these rvalue expressions can only read data; they cannot write the data back to the data source"

Does anyone have any suggestions on what to use instead of rendered? I'm using JSF 1.2.

Thank you, Ellie

Ellie
  • 11
  • 1

0 Answers0