Re: Bookmarkable urls and page redirection
"Natesh Babu Lakshmanan" <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the quick reply and I implemented the functionality like the
following :
In ExternalPageCallback.java, performCallback method is :
public void performCallback(IRequestCycle cycle) throws
RequestCycleException
{
((IExternalPage)cycle.getPage(externalPageName)).activateExternalPage(parameters,
cycle);
}
Following is the change in Validate method for bookmarkable pages :
logon.setCallback(new ExternalPageCallback(this,
cycle.getServiceParameters()));
It works now! Thanks a lot!!!
>From: "Howard M. Lewis Ship" <[email protected]>
>To: "Natesh Babu Lakshmanan"
><[email protected]>,<[email protected]>
>Subject: Re: [Tapestry-developer] Bookmarkable urls and page redirection
>Date: Mon, 16 Dec 2002 21:11:41 -0500
>
>logon.setCallback(new PageCallback(this));
>
>Please check the JavaDoc (or code) for PageCallback; you'll see it is
>roughly the equivalent of using the page service, not the external service.
>
>Tapestry should include an ExternalCallback as well, but since it doesn't
>you'll have to write your own (and, perhaps, add a suggestion to add it).
>
>An ExternalCallback should store the name of the page, and the array of
>parameters and can then get the page from the cycle, cast it to
>IExternalPage, and invoke the callback method on it.
>
>
>----- Original Message -----
>From: "Natesh Babu Lakshmanan" <[email protected]>
>To: <[email protected]>
>Sent: Monday, December 16, 2002 8:37 PM
>Subject: [Tapestry-developer] Bookmarkable urls and page redirection
>
>
> >
> > I have a page which has 'activateExternalPage' implemented to make it
> > bookmarkable. But at the same time, this pages extends 'Protected'. So,
>when
> > user clicks the url and if he is not logged in, he will be first shown
>the
> > log on page and after successful log on, 'bookmarked' page will be
> > displayed. But, after log on, it seems 'activateExternalPage' is not
>invoked
> > and the page is displayed directly. Some member variables are populated
>in
> > 'activateExternalPage' method. But due to this behavior, those variables
>are
> > not populated properly.
> >
> > Following is the validate method in Protected page:
> > public void validate(IRequestCycle cycle) throws
>RequestCycleException
> > {
> > Visit visit = (Visit) getVisit();
> >
> > if (visit != null && visit.isUserLoggedIn())
> > return;
> >
> > // User not logged in ... redirect through the Login page.
> >
> > Logon logon = (Logon) cycle.getPage("Home");
> >
> > logon.setCallback(new PageCallback(this));
> >
> > throw new PageRedirectException(logon);
> > }
> >
> >
> > Could anyone help on this?
> > Thanks in advance,
> > Natesh
> >
> >
> >
> >
> >
> >
> > _________________________________________________________________
> > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:
> > With Great Power, Comes Great Responsibility
> > Learn to use your power at OSDN's High Performance Computing Channel
> > http://hpc.devchannel.org/
> > _______________________________________________
> > Tapestry-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/tapestry-developer
> >
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/