English 中文(简体)
JSF redirect doesn t work
原标题:
  • 时间:2010-04-17 17:48:07
  •  标签:
  • jsf-2

I have a problem with redirecting a page in my JSF application. My navigation rule look like this :

<navigation-rule>
    <from-view-id>/index.xhtml</from-view-id>
    <navigation-case>
        <from-action>#{registerBean.registerUser}</from-action>
        <from-outcome>success</from-outcome>
        <to-view-id>/confirmation.xhtml</to-view-id>
        <redirect/>
    </navigation-case>
</navigation-rule>

In my case the redirect tag doesn t work, the URL remains unchanged, and when I refresh the page the registerUser action is executed again. I just have no idea what I m doing wrong; I m not very experienced with JSF. Can anyone please tell why the redirect tag doesn t work? Thanks. (I m using JSF 2.0 and NetBeans IDE)

最佳回答

Are you sure your page is processing without errors? Check your FacesMessages, see if there are any errors queued - these would prevent navigation to the next page.

问题回答

暂无回答




相关问题
JSF redirect doesn t work

I have a problem with redirecting a page in my JSF application. My navigation rule look like this : <navigation-rule> <from-view-id>/index.xhtml</from-view-id> <...

Get JSF managed bean by name in any Servlet related class

I m trying to write a custom servlet (for AJAX/JSON) in which I would like to reference my @ManagedBeans by name. I m hoping to map: http://host/app/myBean/myProperty to: @ManagedBean(name="myBean"...

JSF2 - what scope for f:ajax elements?

I have this form: <h:form> <h:outputText value="Tag:" /> <h:inputText value="#{entryRecorder.tag}"> <f:ajax render="category" /> </h:inputText> ...

Modifying JSF Component Tree in PhaseListener

I m having an issue. I ve implemented a PhaseListener, which is meant to add a style class to any UIInput components in the tree that have messages attached to them, and removes the style class if it ...

JSF 2 - clearing component attributes on page load?

The real question: Is there a way to clear certain attributes for all components on an initial page load? Background info: In my application, I have a JSF 2.0 frontend layer that speaks to a service ...

JSF2 - backed by EJB or ManagedBean?

As I am learning JSF2, I realized I am not sure what the backing components should be. From design point of view, what is the difference between EJBs and @ManagedBeans? In the end I am going to use ...

热门标签