• Post Reply Bookmark Topic Watch Topic
  • New Topic

a4j:jsFunction outcome redirect

 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all.

I'm adding AJAX support to a JSF 1.2 project through a4j.
When creating a jsp using the tag <a4j:jsFunction>, I'd like to execute some backing bean's method.

So far so good, but I'd like that the return from this method was used as an outcome to redirect to another page declared as faces-config.xml navigation rule.

When this method is executed and the string is returned, nothing happens on client. No redirect happens.

These snipped of codes that follows depicts my using of a4j:

JSP:


The backing bean:


Could anybody help me with this?
I wouldn't like to use a workarround to solve this...

Thanks.
 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved.

It's necessary to define the navigation case with <redirect/> clause on faces-config.xml.


From richfaces document about commandLink

Note:
Common JSF navigation could be performed after Ajax submit and partial rendering, but Navigation Case must be defined as <redirect/> in order to avoid problems with some browsers.


to read more about it click here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!