You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Larry Sherrill <la...@yahoo.com> on 2006/04/14 16:27:15 UTC
Passing Parameters to Home
I have two sets of users at two different sites using
a single web app. I need to know the location when
they hit the home page. (It is low security situation,
there is no login.)
By example of what I mean, if this were jsps I would
have the user bookmark:
http://asdf/myapp.jsp?site=siteone
http://asdf/myapp.jsp?site=sitetwo
If it were rails I would use a router:
http://asdf/myapp/siteone
http://asdf/myapp/sitetwo
I would then grab the site and put it in the session.
How would I achieve equivalent functionality in
Tapestry? I read that Home does not take parameters so
how does one do this?
I would appreciate any suggestions you may have.
Thanks,
Larry
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Passing Parameters to Home
Posted by Andreas Andreou <an...@di.uoa.gr>.
Make the page implement IExternalPage
http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/IExternalPage.html
Also, take a look at
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/ExternalLink.html
Larry Sherrill wrote:
>I have two sets of users at two different sites using
>a single web app. I need to know the location when
>they hit the home page. (It is low security situation,
>there is no login.)
>
>By example of what I mean, if this were jsps I would
>have the user bookmark:
>
>http://asdf/myapp.jsp?site=siteone
>http://asdf/myapp.jsp?site=sitetwo
>
>If it were rails I would use a router:
>
>http://asdf/myapp/siteone
>http://asdf/myapp/sitetwo
>
>
>I would then grab the site and put it in the session.
>
>How would I achieve equivalent functionality in
>Tapestry? I read that Home does not take parameters so
>how does one do this?
>
>I would appreciate any suggestions you may have.
>
>Thanks,
>Larry
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>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
Re: Passing Parameters to Home
Posted by Larry Sherrill <la...@yahoo.com>.
Thank you, that helped a lot. I actually put a couple
of jsps (one for each site) with a one line
redirection in it so that the customer could book mark
a short url while still taking advantage of the
external link.
So the user bookmarks this:
http://somesite/myapp/siteone.jsp
The jsp contains:
<%
response.sendRedirect("/myapp/qs?page=Home&service=external&sp=Ssiteone");
%>
Thanks again,
Larry
--- Onno Scheffers <on...@piraya.nl> wrote:
> Larry Sherrill schreef:
>
> >How would I achieve equivalent functionality in
> >Tapestry? I read that Home does not take parameters
> so
> >how does one do this?
> >
> >
> You could make your Home class implement
> IExternalPage and then
> implement the method
> public void activateExternalPage(Object[] params,
> IRequestCycle cycle) {
> ...}
> to read the parameters from the Object-array.
> You can create links to this page by using the
> ExternalLink component.
>
> Hope this helps.
>
> Regards,
>
> Onno
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Passing Parameters to Home
Posted by Onno Scheffers <on...@piraya.nl>.
Larry Sherrill schreef:
>How would I achieve equivalent functionality in
>Tapestry? I read that Home does not take parameters so
>how does one do this?
>
>
You could make your Home class implement IExternalPage and then
implement the method
public void activateExternalPage(Object[] params, IRequestCycle cycle) {
...}
to read the parameters from the Object-array.
You can create links to this page by using the ExternalLink component.
Hope this helps.
Regards,
Onno
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org