JSF 2.0 : A navigation case

痞子三分冷 提交于 2019-12-25 06:47:24

问题


I got a page with a form like this :

<h:form>
    <h:commandButton value="click" action="#{searchBean.doSearch}" >
        <f:ajax execute="@form" render="result"></f:ajax>
    </h:commandButton>

    <a4j:outputPanel id="result" >
        <h:commandLink value="click" action="#{searchBean.doShowDetail(searchBean.result)}" rendered="#{searchBean.result != null}" />
    </a4j:outputPanel>
</h:form>   

doShowDetail action redirects to another page in whicth result details are shown. Result is correctly rendered after form submitting, but current page is refreshed. If you reload manually the page then the desired page is displayed.

I use implicit navigation rules. Below the doShowDetail code :

public String doShowDetail(Object result) {
    flash.put("result", result);
    return "details?faces-redirect=true";
}

Am I missing something?

Thx.

来源:https://stackoverflow.com/questions/7920112/jsf-2-0-a-navigation-case

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!