You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Erich Oliphant <er...@vantixweb.com> on 2004/05/13 20:01:10 UTC
Tapestry equiv of request params
Hi,
I am trying to figure out the Tapestry convention for passing params
between pages. For instance, I am calling cycle.activate() from a
listener. I want to pass value from the current listener to the
activated page. It's not really a Visit/session level param, it should
only hang around until the activated page is done with it.
Thanks In Advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry equiv of request params
Posted by Robert Zeigler <rd...@u.arizona.edu>.
You'll probably want to do something like:
MyPage page = (MyPage)cycle.getPage("MyPage");
page.setMyProperty("myvalue");
cycle.activate(page);
Robert
Erich Oliphant wrote:
> Hi,
> I am trying to figure out the Tapestry convention for passing params
> between pages. For instance, I am calling cycle.activate() from a
> listener. I want to pass value from the current listener to the
> activated page. It's not really a Visit/session level param, it
> should only hang around until the activated page is done with it.
>
> Thanks In Advance.
>
>
> ---------------------------------------------------------------------
> 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: Tapestry equiv of request params
Posted by tmjee <tm...@hotmail.com>.
I guess the property declared page specification will looks something like
<page-specification ...>
<property name="SUCCESS" value="somePageName" />
.....
</page-specification>
Please correct me if I am wrong. Thanks
regards
----- Original Message -----
From: "Jonny Wray" <jo...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, May 13, 2004 10:12 AM
Subject: Re: Tapestry equiv of request params
>
> This is one of the areas that Tapestry shines, but takes a little while
> getting your head around coming from the request/response world (or at
> least it did for me).Pages are fully fledged objects, and thus their
> properties are set just like any other:
>
> Here's an example from one of my listeners:
>
> IPage page = cycle.getPage(getSpecification().getProperty(SUCCESS));
> page.setProperty("searchResults", results);
> cycle.activate(page);
>
> SUCCESS is page level property indicating which page to go to.
>
> searchResults is the ognl accessor for a property on that page (ie
> there is a setSearchResults method).
>
> results is the actual object I want to pass to the page.
>
> Jonny
>
> --- Erich Oliphant <er...@vantixweb.com> wrote:
> > Hi,
> > I am trying to figure out the Tapestry convention for passing params
> > between pages. For instance, I am calling cycle.activate() from a
> > listener. I want to pass value from the current listener to the
> > activated page. It's not really a Visit/session level param, it
> > should
> > only hang around until the activated page is done with it.
> >
> > Thanks In Advance.
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: OOPS: Re: Tapestry equiv of request params
Posted by Erich Oliphant <er...@vantixweb.com>.
Thanks for the tips guys!
Jamie Orchard-Hays wrote:
>This needs to be cast:
>MyPage page = (MyPage)cycle.getPage("MyPage");
>
>
>----- Original Message -----
>From: "Jamie Orchard-Hays" <ja...@dang.com>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Thursday, May 13, 2004 2:42 PM
>Subject: Re: Tapestry equiv of request params
>
>
>
>
>>I like to cast the page so that Intellij can complete the page's
>>
>>
>properties
>
>
>>and let me know about errors:
>>
>>MyPage page = cycle.getPage("MyPage");
>>//page.setProperty("searchResults", results);
>>//above line becomes:
>>page.setSearchResults(results);
>>cycle.activate(page);
>>
>>
>>----- Original Message -----
>>From: "Jonny Wray" <jo...@yahoo.com>
>>To: "Tapestry users" <ta...@jakarta.apache.org>
>>Sent: Thursday, May 13, 2004 2:12 PM
>>Subject: Re: Tapestry equiv of request params
>>
>>
>>
>>
>>>This is one of the areas that Tapestry shines, but takes a little while
>>>getting your head around coming from the request/response world (or at
>>>least it did for me).Pages are fully fledged objects, and thus their
>>>properties are set just like any other:
>>>
>>>Here's an example from one of my listeners:
>>>
>>>IPage page = cycle.getPage(getSpecification().getProperty(SUCCESS));
>>>page.setProperty("searchResults", results);
>>>cycle.activate(page);
>>>
>>>SUCCESS is page level property indicating which page to go to.
>>>
>>>searchResults is the ognl accessor for a property on that page (ie
>>>there is a setSearchResults method).
>>>
>>>results is the actual object I want to pass to the page.
>>>
>>>Jonny
>>>
>>>--- Erich Oliphant <er...@vantixweb.com> wrote:
>>>
>>>
>>>>Hi,
>>>>I am trying to figure out the Tapestry convention for passing params
>>>>between pages. For instance, I am calling cycle.activate() from a
>>>>listener. I want to pass value from the current listener to the
>>>>activated page. It's not really a Visit/session level param, it
>>>>should
>>>>only hang around until the activated page is done with it.
>>>>
>>>>Thanks In Advance.
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>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
>
>
>
>
OOPS: Re: Tapestry equiv of request params
Posted by Jamie Orchard-Hays <ja...@dang.com>.
This needs to be cast:
MyPage page = (MyPage)cycle.getPage("MyPage");
----- Original Message -----
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, May 13, 2004 2:42 PM
Subject: Re: Tapestry equiv of request params
> I like to cast the page so that Intellij can complete the page's
properties
> and let me know about errors:
>
> MyPage page = cycle.getPage("MyPage");
> //page.setProperty("searchResults", results);
> //above line becomes:
> page.setSearchResults(results);
> cycle.activate(page);
>
>
> ----- Original Message -----
> From: "Jonny Wray" <jo...@yahoo.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, May 13, 2004 2:12 PM
> Subject: Re: Tapestry equiv of request params
>
>
> >
> > This is one of the areas that Tapestry shines, but takes a little while
> > getting your head around coming from the request/response world (or at
> > least it did for me).Pages are fully fledged objects, and thus their
> > properties are set just like any other:
> >
> > Here's an example from one of my listeners:
> >
> > IPage page = cycle.getPage(getSpecification().getProperty(SUCCESS));
> > page.setProperty("searchResults", results);
> > cycle.activate(page);
> >
> > SUCCESS is page level property indicating which page to go to.
> >
> > searchResults is the ognl accessor for a property on that page (ie
> > there is a setSearchResults method).
> >
> > results is the actual object I want to pass to the page.
> >
> > Jonny
> >
> > --- Erich Oliphant <er...@vantixweb.com> wrote:
> > > Hi,
> > > I am trying to figure out the Tapestry convention for passing params
> > > between pages. For instance, I am calling cycle.activate() from a
> > > listener. I want to pass value from the current listener to the
> > > activated page. It's not really a Visit/session level param, it
> > > should
> > > only hang around until the activated page is done with it.
> > >
> > > Thanks In Advance.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
> ---------------------------------------------------------------------
> 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: Tapestry equiv of request params
Posted by Jamie Orchard-Hays <ja...@dang.com>.
I like to cast the page so that Intellij can complete the page's properties
and let me know about errors:
MyPage page = cycle.getPage("MyPage");
//page.setProperty("searchResults", results);
//above line becomes:
page.setSearchResults(results);
cycle.activate(page);
----- Original Message -----
From: "Jonny Wray" <jo...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, May 13, 2004 2:12 PM
Subject: Re: Tapestry equiv of request params
>
> This is one of the areas that Tapestry shines, but takes a little while
> getting your head around coming from the request/response world (or at
> least it did for me).Pages are fully fledged objects, and thus their
> properties are set just like any other:
>
> Here's an example from one of my listeners:
>
> IPage page = cycle.getPage(getSpecification().getProperty(SUCCESS));
> page.setProperty("searchResults", results);
> cycle.activate(page);
>
> SUCCESS is page level property indicating which page to go to.
>
> searchResults is the ognl accessor for a property on that page (ie
> there is a setSearchResults method).
>
> results is the actual object I want to pass to the page.
>
> Jonny
>
> --- Erich Oliphant <er...@vantixweb.com> wrote:
> > Hi,
> > I am trying to figure out the Tapestry convention for passing params
> > between pages. For instance, I am calling cycle.activate() from a
> > listener. I want to pass value from the current listener to the
> > activated page. It's not really a Visit/session level param, it
> > should
> > only hang around until the activated page is done with it.
> >
> > Thanks In Advance.
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry equiv of request params
Posted by Jonny Wray <jo...@yahoo.com>.
This is one of the areas that Tapestry shines, but takes a little while
getting your head around coming from the request/response world (or at
least it did for me).Pages are fully fledged objects, and thus their
properties are set just like any other:
Here's an example from one of my listeners:
IPage page = cycle.getPage(getSpecification().getProperty(SUCCESS));
page.setProperty("searchResults", results);
cycle.activate(page);
SUCCESS is page level property indicating which page to go to.
searchResults is the ognl accessor for a property on that page (ie
there is a setSearchResults method).
results is the actual object I want to pass to the page.
Jonny
--- Erich Oliphant <er...@vantixweb.com> wrote:
> Hi,
> I am trying to figure out the Tapestry convention for passing params
> between pages. For instance, I am calling cycle.activate() from a
> listener. I want to pass value from the current listener to the
> activated page. It's not really a Visit/session level param, it
> should
> only hang around until the activated page is done with it.
>
> Thanks In Advance.
>
>
> ---------------------------------------------------------------------
> 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