I've been able to solve my own problem.

To solve the problem:
* Change your listener to return an ILink instead of an IPage.
* Add an injector to get the page service.
* construct a qualified name to the page
* get a link from the page service.

Source code:

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

public ILink doSubmit()
{
        String linkParameter =
getNamespace().constructQualifiedName(getNextPage().getPageName());
return getPageService().getLink(false, linkParameter);
}


-----Original Message-----
From: Curtis Paris [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 23, 2006 5:40 PM
To: [email protected]
Subject: Forwarding to a Page, using an externalized form, Tapestry 4.0

I am trying to solve a little problem.  We have a number of forms, which
upon success, we would like to forward to a known page, but, force it to
be in an externalized form.  We already have friendly URL's enabled.
This is also in Tapestry 4.0, so, many of the Redirect methods are not
there.  We would also like to keep it based on a IPage object for
various reasons.

 

Our listener processes the request, and based on logic, picks the
correct page to send the user to.  We have a bunch of @InjectPage("...")
members in the class.

 

As it's probably well known, when it redirects, we get a direct link,
not an external page.

 

>From a form listener, how would we go about reencoding a named page into
an externalized form?  Ie,

 

@InjectPage("Overview") abstract public getOverviewPage();

 

Public IPage myListener()

{

            Return getOverviewPage();

}

 

 

Curtis Paris

Sr. Software Engineer

[EMAIL PROTECTED]

650 616 6581 office

 

Shopping.com (tm)

Find. Compare. Buy.

www.shopping.com <blocked::outbind://48/www.shopping.com> 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to