You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by pe...@gmx.org on 2005/09/20 12:18:55 UTC
returning ILink in listener causes redirect exception
Hi java-dudes :-)
my login page listener is declared like this:
public ILink login()
{
// authenticate
// if failed:
return null;
// if ok:
return redirect(targetPageName); // causes problem!
}
@InjectObject("engine-object:page)
public abstract IEngineService getPageService();
private ILink redirect(String pageName)
{
return getPageService().getLink(getRequestCycle(), false, pageName);
}
Even though the generated ILink looks ok and the target page exists
I get an exception screen:
>> org.apache.tapestry.RedirectException <<
This makes no sense to me...
http://jakarta.apache.org/tapestry/UsersGuide/listenermethods.html
the listener is invoked inside a form like this:
<form jwcid="@Form" success="listener:login">
....
</form>
Any clue / hint / advice / tip / comment is greatly appreciated! :-))
Could this possibly be a bug?
Best regards
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: returning ILink in listener causes redirect exception
Posted by Peter Ertl <pe...@gmx.org>.
I found the solution on my own...
Actually this is a tapestry bug:
http://issues.apache.org/jira/browse/TAPESTRY-647
> --- Ursprüngliche Nachricht ---
> Von: pertl@gmx.org
> An: tapestry-user@jakarta.apache.org
> Betreff: returning ILink in listener causes redirect exception
> Datum: Tue, 20 Sep 2005 12:18:55 +0200 (MEST)
>
>
> Hi java-dudes :-)
>
> my login page listener is declared like this:
>
> public ILink login()
> {
> // authenticate
> // if failed:
> return null;
> // if ok:
> return redirect(targetPageName); // causes problem!
> }
>
> @InjectObject("engine-object:page)
> public abstract IEngineService getPageService();
>
> private ILink redirect(String pageName)
> {
> return getPageService().getLink(getRequestCycle(), false, pageName);
> }
>
> Even though the generated ILink looks ok and the target page exists
> I get an exception screen:
>
> >> org.apache.tapestry.RedirectException <<
>
> This makes no sense to me...
>
> http://jakarta.apache.org/tapestry/UsersGuide/listenermethods.html
>
> the listener is invoked inside a form like this:
>
> <form jwcid="@Form" success="listener:login">
> ....
> </form>
>
> Any clue / hint / advice / tip / comment is greatly appreciated! :-))
>
> Could this possibly be a bug?
>
> Best regards
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org