dev@jsftemplating.java.net

help with navigate() or redirect()

From: Anissa Lam <Anissa.Lam_at_Sun.COM>
Date: Mon, 04 Sep 2006 17:32:47 -0700

I need some help with doing navigate() or redirect()

      <dynamicTreeNode
         ...
         ... >
          <!childCommand
                   setAttribute(key="click" value="$this{component}");
                   
*redirect(page="resources/jdbcResourceEdit.jsf?name=#{click.text}" );*
            />
           </dynamicTreeNode>


When the dynamic Tree Node is pressed, i need to display another page
with request parameter specified. If i use navigate() the request
parameter is not available at the resulting page.
If i use redirect(), it works fine but will only work *once.* If i
press other dynamic tree node, i will get a 500 Error in the
browser. If i reload the tree, the redirect() will work for one time
again.
Here is the stack trace :
[#|2006-09-04T14:32:11.362-0700|SEVERE|sun-appserver-ee9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpWorkerThread-8080-1;_RequestID=41a7d89c-1b97-444b-9745-ddf2c658a581;|StandardWrapperValve[FacesServlet]:
PWC1406: Servlet.service() for servlet FacesServlet threw exception
java.lang.IllegalStateException
    at
org.apache.coyote.tomcat5.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:433)
    at
com.sun.faces.context.ExternalContextImpl.redirect(ExternalContextImpl.java:424)
    at
com.sun.jsftemplating.handlers.NavigationHandlers.redirect(NavigationHandlers.java:150)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:335)
    at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:332)
    at
com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:312)
    at
com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:132)
    at
com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:80)
    at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)

Any suggestion on what i maybe missing in using redirect () ?

thanks
Anissa