The following is generated using <h:selectOneRadio>
_X_ To Page 1
___ To Page 2
___ To Page 3
[Next] button
If a user clicks [Next] button, JSF action will be called and simply return a string as <from-output> which defined in <navigation-case>. This <from-output> will lead user to the page he selected (navigate). I understand I can use Java code to do that but I hope <navigation-case> can be used that way :)
Thanks again.
On 2/17/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
Are you triggering the navigation rule directly from your page?
If so, use <h:outputLink> instead.
If you're triggering it from java code, you might be better off
writing the redirect in java code instead.
On 2/17/06, Qiang Yu <[EMAIL PROTECTED]> wrote:
> On 2/17/06, Qiang Yu <[EMAIL PROTECTED]> wrote:
> > Hello all,
> > I am not sure whether it is appropriate to specify parameters in
> > navigation-cases but I am trying to use it in my project:
> > ...
> > <navigation-case>
> > <from-outcome>Bacillus_anthracis</from-outcome>
> > <to-view-id>/common/misc/redirect.jsp?to=http://www.google.com</to-view-id>
> > <redirect/>
> > </navigation-case>
> > ...
> >
> > The redirect.jsp is pretty much simple:
> >
> > <%@ page language="java" pageEncoding="UTF-8"%>
> > <%
> > String location = request.getParameter("to");
> > response.sendRedirect("http://www.google.com");
> sorry, here it should be response.sendRedirect(to);
> 'to' would be changed from " http://www.google.com" to "http://www.google.jsf"
>
>
>
>
> > //response.getWriter().write(location);
> > %>
> >
> > and I found myfaces changed location from http://www.google.com to
> > http://www.google.jsf, which makes redirection impossible (though I
> > solved this problem using some tricks)
> >
> > But my question is
> > 1. Is it doable/allowable to supply parameters in navigation-cases?
> > 2. If it is, why myfaces should modidy the parameter?
> >
> > I am using myeclipse 1.1.1
> >
> > Thanks a lot and have a great weekend :)
> >
>

