You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ra...@wipro.com on 2005/04/21 15:15:13 UTC

commandLink with target in JSF

Hi I am using commandLinks with target.

if I use one commandLink with a target like this:

<h:commandLink id="link" action="goto1" target="xyz"
onmouseup="document.forms[this.id.substring(0,this.id.lastIndexOf(':'))]
.target =this.target">
<h:outputText value="GO1"/>
</h:commandLink>

it's working fine....

But if i use two commandLinks simeltaniousely like this:

<h:commandLink id="link" action="goto1" target="xyz"
onmouseup="document.forms[this.id.substring(0,this.id.lastIndexOf(':'))]
.target =this.target">
<h:outputText value="GO1"/>
</h:commandLink>


<h:commandLink id="link1" action="goto2" target="xyz"
onmouseup="document.forms[this.id.substring(0,this.id.lastIndexOf(':'))]
.target =this.target">
<h:outputText value="GO2"/>
</h:commandLink>

I can clink only one commandLink. If i try to click the second one, I am
getting an error like this:

exception

javax.servlet.ServletException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)


root cause

java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade
.java:3 50)
com.sun.faces.context.ExternalContextImpl.redirect(ExternalContextImpl.j
ava:333 )
com.sun.faces.application.NavigationHandlerImpl.handleNavigation(Navigat
ionHand lerImpl.java:113)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListene
rImpl.j ava:89)
javax.faces.component.UICommand.broadcast(UICommand.java:312)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:266)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:380)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplication
Phase.j ava:75)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)






Any ideas on the above error is highly appreciable...

regards,
Ram







Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.