[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: can i Redirect a Request in Tapestry 4 ???
From:       Joseph Hannon <jah.volcano () gmail ! com>
Date:       2005-09-30 16:06:44
Message-ID: f5242c60509300906uf7ffb0exd899fae5160d0abe () mail ! gmail ! com
[Download RAW message or body]


I tested Howard's example again on Tapestry 4 beta 8 and made sure my
listener, 'orderListener', was taking an IPage, which I wasn't doing before.
I am assuming Howard's 'redirect' method name could be called 'foo'. At
least the exception was different this time. This is what I saw:

Exception invoking listener method orderListener of component PlaceOrder: No
listener method named 'orderListener' suitable for no listener parameters
found in $PlaceOrder_29@881cb3[PlaceOrder].
binding: org.apache.tapestry.binding.ListenerMethodBinding@1bbd583[parameter
listener, component=PlaceOrder, methodName=orderListener,
location=context:/WEB-INF/PlaceOrder.page, line 22, column 64]

How do I tell Tapestry that my listener takes an IPage? I am I calling the
listener correctly? Will you show me a piece of code that would call this
listener with an IPage param?

Page:

<component id="form" type="Form">
<binding name="listener" value="listener:orderListener"/>
</component>

Class:

@InjectObject("engine-service:page")
public abstract IEngineService getPageService() ;

public ILink orderListener (IPage page)
{
return getPageService().getLink(getRequestCycle(), false, getPageName()) ;
}

Thanks,
Joseph

On 9/28/05, Leonardo Quijano Vincenzi <leonardo@dtqsoftware.com> wrote:
>
> Checkout what Howard wrote below. That's basically it.
>
> Though we'd like the framework to facilitate the redirect work (right
> now it's like going against the framework).
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> DTQ Software
>
> Joseph Hannon escribió:
>
> >It appears that returning an ILink is working for you. I would like to do
> >whatever you have done so I can return an ILink. Please see list subject
> >'RedirectException issues' for more information about an exception I am
> >getting attempting to return an ILink. How did you get your stuff
> working?
> >What specific version of Tapestry are you using? Does anything need to be
> >setup in Hivemind to enable returning ILinks.
> >
> >Thanks,
> >Joseph
> >
> >On 9/5/05, Leonardo Quijano Vincenzi <leonardo@dtqsoftware.com> wrote:
> >
> >
> >>I was looking the other day some article about Redirect-After-Post in
> >>Tapestry. But I don't think it was updated to Tapestry 4.
> >>I guess *this* is the way to do that, or are the any special
> >>considerations?
> >>
> >>--
> >>
> >>Ing. Leonardo Quijano Vincenzi
> >>Director Técnico
> >>DTQ Software
> >>
> >>Howard Lewis Ship escribió:
> >>
> >>
> >>
> >>>Which can be shortened to:
> >>>
> >>>
> >>>@InjectObject("engine-service:page")
> >>>public abstract IEngineService getPageService();
> >>>
> >>>public ILink redirect(IPage page)
> >>>{
> >>>IRequestCycle cycle = getRequestCycle();
> >>>
> >>>return getPageService().getLink(cycle, false, getPageName());
> >>>}
> >>>
> >>>On 9/5/05, Pete <pertl@gmx.org> wrote:
> >>>
> >>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic