如果使用渲染属性,则无法保存到后bean。JSF1.2
我正在开发一个具有搜索功能的页面。页面顶部显示搜索条件,页面底部显示单选按钮中的搜索结果。 然后,用户选择一个单选按钮并单击“下一步”保存选择 我只想在按下搜索按钮后显示结果。如果使用“渲染”属性,则无法保存panelGroup中的值 我的jsp摘录:如果使用渲染属性,则无法保存到后bean。JSF1.2,jsf,jsf-1.2,Jsf,Jsf 1.2,我正在开发一个具有搜索功能的页面。页面顶部显示搜索条件,页面底部显示单选按钮中的搜索结果。 然后,用户选择一个单选按钮并单击“下一步”保存选择 我只想在按下搜索按钮后显示结果。如果使用“渲染”属性,则无法保存panelGroup中的值 我的jsp摘录: <div> <div> <h:outputFormat value="Search SEIN"></h:outputFormat> <h:inputTe
<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>
我看到一篇文章说
渲染属性仅限于使用右值表达式。正如inValue和Method表达式所解释的,这些右值表达式只能读取数据;他们无法将数据写回数据源
有人对使用什么来代替渲染有什么建议吗?我正在使用JSF1.2
谢谢,,
艾莉
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";
}