You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "t.n.a." <tn...@sharanet.org> on 2005/03/04 01:26:06 UTC
parameter to a tapestry app
Problem: passing a parameter (via, GET or POST) from a, for instance,
php web page as input to a tapestry application.
Now, I've read a bit about defining new services to handle bookmarkable
pages (from what I understand, the problem boils down to making the
first page bookmarkable), I've looked at the vlib example and I just
can't believe it takes more than a couple of lines of code (certainly
not pages and pages of it like in the example!) to do the job.
Anyway, my question is this: what is the minimum sequence of steps
needed to allow a page to receive a single integer parameter?
A simple, small example is all I need...
Regards,
Tomislav
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: parameter to a tapestry app
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
You could create your own ExternalBasePage that implements the
IExternalPage interface, though. Neither memory nor security are the
reason for the current design - its because they were considered
conceptually different by Howard, I suspect.
All pages are externally reachable:
/app?service=page/PageName
There just is not an entry point for receiving parameters. It makes
more sense to me for PageLink and ExternalLink to merge into one link,
with parameters optional. I treat them basically the same in my apps.
What would be the drawback to only a single link that goes to a page
with parameters optional?
Erik
On Mar 4, 2005, at 5:05 AM, t.n.a. wrote:
> Danny Mandel wrote:
>
>> public class SomeExternalPage implements IExternalPage {
>> ....
>
> <snip>
>
>> Then to pass the param:
>> http://host/appname/app?service=external/SomeExternalPage&sp=1
>>
>> Voila!
>>
>> Hope that helps,
>
>
> Works great, thanks!
> But while we're on topic, why wouldn't all pages be externally
> reachable (at least by default)? What's the penalty for
> "externalizing" a page? A bigger memory footprint? Security?
>
> ---------------------------------------------------------------------
> 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: parameter to a tapestry app
Posted by "t.n.a." <tn...@sharanet.org>.
Danny Mandel wrote:
> public class SomeExternalPage implements IExternalPage {
> ....
<snip>
> Then to pass the param:
> http://host/appname/app?service=external/SomeExternalPage&sp=1
>
> Voila!
>
> Hope that helps,
Works great, thanks!
But while we're on topic, why wouldn't all pages be externally reachable
(at least by default)? What's the penalty for "externalizing" a page? A
bigger memory footprint? Security?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: parameter to a tapestry app
Posted by Danny Mandel <dm...@tolweb.org>.
public class SomeExternalPage implements IExternalPage {
public void activateExternalPage(Object[] parameters, IRequestCycle
cycle) {
Integer someParam = (Integer) parameters[0];
setSomeInteger(someParam);
}
public abstract void setSomeInteger(Integer value);
public abstract Integer getSomeInteger();
}
Then to pass the param:
http://host/appname/app?service=external/SomeExternalPage&sp=1
Voila!
Hope that helps,
Danny
t.n.a. wrote:
> Problem: passing a parameter (via, GET or POST) from a, for instance,
> php web page as input to a tapestry application.
> Now, I've read a bit about defining new services to handle
> bookmarkable pages (from what I understand, the problem boils down to
> making the first page bookmarkable), I've looked at the vlib example
> and I just can't believe it takes more than a couple of lines of code
> (certainly not pages and pages of it like in the example!) to do the job.
> Anyway, my question is this: what is the minimum sequence of steps
> needed to allow a page to receive a single integer parameter?
> A simple, small example is all I need...
>
> Regards,
> Tomislav
>
> ---------------------------------------------------------------------
> 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