You should definitely check out some of the tutorials that are
available.  In particular, I recommend looking at the first 4 chapters
of "Enjoy Web Development with Tapestry 4" for which there is a link
at the tapestry website.  In there, you will find examples of the
various ways you can define a 'listener' (the function that gets
called when you submit a form or click a link).  Tapestry will
discover your listener method so long as it adheres to one of several
different method signatures, one of which receives the IRequestCycle
as a parameter (Offhand, I believe it is "IPage
listenerMethod(IRequestCycle cycle)".  From within the listener, you
can then call cycle.sendRedirect().

--sam


On 5/23/06, Konstantin Ignatyev <[EMAIL PROTECTED]> wrote:
How about something like
 @InjectObject("service:tapestry.globals.HttpServletResponse")
  public abstract HttpServletResponse getHttpResponse();


and then send redirect where you need to

albartell <[EMAIL PROTECTED]> wrote: I am lost in Tapestry documentation today 
(which is becoming a common
occurrence as of late).

First let me describe what I was trying to do. I needed to redirect the user
to a static page outside of my application context after they fill out a
form.  I thought it would be easy enough because I know how to use
@InjectPage to go to another Tapestry page, but I just couldn't find how to
do it from looking at the Tapestry documentation.  I finally decided to use
IRequestCycle.sendRedirect() because I remembered seeing that somewhere in
the past.  So I went in search of how to use IRequestCycle.  Sure I can find
it in the JavaDocs, but where in the heck does one find that you can specify
IRequestCycle as a parm on a java method?

for example I found this in the mail archives:

public void validate(IRequestCycle cycle) {
...
cycle.sendRedirect("http://mysite.com/somepage.html";);
}

I assume it should be in the user guide, but where?  It would rock to have a
"how do I" section on the Tapestry page just showing how to do simple things
that all web developers need and allow the user to dig further into the
framework from that vantage point vs. giving them every single entry point
of API documentation at a top layer.

Aaron Bartell





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

Reply via email to