Re: page activation + components

2008-05-05 Thread Josh Canfield
be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello

Re: page activation + components

2008-05-02 Thread János Jarecsni
here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular

Re: page activation + components

2008-05-02 Thread nicholas Krul
? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular

Re: page activation + components

2008-05-02 Thread János Jarecsni
] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org/tapestry5/tapestry

Re: page activation + components

2008-05-02 Thread Josh Canfield
end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service

Re: page activation + components

2008-05-02 Thread Josh Canfield
? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied

Re: page activation + components

2008-05-02 Thread János Jarecsni
the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each

Re: page activation + components

2008-05-01 Thread Chris Lewis
Josh, Yeah that looks like it would do it, working much like what proposed with pagelinks. Given a choice I would use the pagelink based way because architecturally it works the same (news page collects the id via context), but using pagelinks reduces the round-trips and the need to deal with

Re: page activation + components

2008-04-30 Thread János Jarecsni
Hi, thx for the info! Another idea... is there a HttpRequest like object available to components and pages? If it were, then setting a request attribute would be ok for me. Anyway the per-request service is similar to this, so it will be ok for me. thx again janos 2008/4/29 Andy Huhn [EMAIL

Re: page activation + components

2008-04-30 Thread Kristian Marinkovic
a more concise advice :) g, kris János Jarecsni [EMAIL PROTECTED] 30.04.2008 08:50 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: page activation + components Hi, thx for the info! Another idea

Re: page activation + components

2008-04-30 Thread János Jarecsni
Hi there, finally I put together a minimalistic test to proof the idea. 1. I have a simple component, named SetRequestParameter, its purpose is to receive something from an actionlink (it is on its template) and set that value in a per-request way. 1.1 the template for this component html

Re: page activation + components

2008-04-30 Thread János Jarecsni
PROTECTED] 30.04.2008 08:50 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: page activation + components Hi, thx for the info! Another idea... is there a HttpRequest like object available to components and pages

RE: page activation + components

2008-04-30 Thread Blower, Andy
just for services that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define

Re: page activation + components

2008-04-30 Thread János Jarecsni
: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html, and search for perthread. Thanks, Andy On Tue, 29 Apr 2008

Re: page activation + components

2008-04-30 Thread Filip S. Adamsen
: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html, and search for perthread. Thanks, Andy On Tue, 29 Apr 2008 18:02:52 +0200

Re: page activation + components

2008-04-30 Thread Filip S. Adamsen
This is not what @Retain is for. If you use it, the value won't be cleared out at the end of the request. http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/annotations/Retain.html -Filip Michael Gerzabek skrev: 6) @Retain could do the job. Your String will be available until

Re: page activation + components

2008-04-30 Thread János Jarecsni
and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service

Re: page activation + components

2008-04-30 Thread János Jarecsni
that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope

Re: page activation + components

2008-04-30 Thread Filip S. Adamsen
, it's just for services that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can

Re: page activation + components

2008-04-30 Thread Chris Lewis
to do with user sessions, it's just for services that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page

Re: page activation + components

2008-04-30 Thread János Jarecsni
and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You

Re: page activation + components

2008-04-30 Thread Chris Lewis
PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org/tapestry5/tapestry-ioc

Re: page activation + components

2008-04-30 Thread János Jarecsni
: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org

Re: page activation + components

2008-04-30 Thread János Jarecsni
just for services that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation

Re: page activation + components

2008-04-30 Thread János Jarecsni
sessions, it's just for services that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation

Re: page activation + components

2008-04-30 Thread Filip S. Adamsen
Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html , and search for perthread. Thanks, Andy On Tue, 29 Apr 2008 18:02:52

Re: page activation + components

2008-04-30 Thread Josh Canfield
the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular

Re: page activation + components

2008-04-30 Thread Chris Lewis
- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one

Re: page activation + components

2008-04-30 Thread Chris Lewis
Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org

RE: page activation + components

2008-04-30 Thread Joel Wiegman
off base... I only skimmed the thread. -Original Message- From: Chris Lewis [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 30, 2008 4:27 PM To: Tapestry users Subject: Re: page activation + components I see how this whole push on/pull off environment will solve the issue

Re: page activation + components

2008-04-30 Thread Chris Lewis
? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define the scope of each service...you can set that particular service to be tied

Re: page activation + components

2008-04-30 Thread Chris Lewis
this the last of it 4) In our embedding page class, News, we have an event handler to be notified of the selection by handling the viewitem event: void onViewitem(long id) { this.currentItem = newsSource.getItemById(id); logger.info(got +

Re: page activation + components

2008-04-30 Thread Josh Canfield
that are not thread safe and cannot be singletons. Have I got the wrong end of the stick here? -Original Message- From: Andy Huhn [mailto:[EMAIL PROTECTED] Sent: 29 April 2008 17:34 To: Tapestry users Subject: Re: page activation + components Hello, You can define

Re: page activation + components

2008-04-30 Thread Chris Lewis
I do hope we've missed a simpler way, but I don't think it's surfaced yet. Regarding parameters, how would that address the issue? NewsQuote displays a collection of items as links that represent selectable items (expressed as links). The action must be taken based on the user's selection, so a

Re: page activation + components

2008-04-30 Thread Josh Canfield
Here's an app that does what I believe is trying to be done: // Page public class News { @Property private Integer _newsId; public void onActivate(Integer newsId) { _newsId = newsId; } public Integer onPassivate() {

Re: page activation + components

2008-04-29 Thread Kristian Marinkovic
hi janos, there are several possibilities: 1) declare a component parameter and pass in the variable 2) put it in a ASO and inject the ASO in all your components (using @ApplicationState) the drawback is that any other page or component will be able to access the ASO 3) put it into the

Re: page activation + components

2008-04-29 Thread Chris Lewis
5) @InjectPage the page and call the getter Kristian Marinkovic wrote: hi janos, there are several possibilities: 1) declare a component parameter and pass in the variable 2) put it in a ASO and inject the ASO in all your components (using @ApplicationState) the drawback is that any

Re: page activation + components

2008-04-29 Thread Michael Gerzabek
6) @Retain could do the job. Your String will be available until the end of the request. János Jarecsni schrieb: Hi there, I have an activatable page, in its onActivate(String param) method I save the param to a normal instance variable of the page class (no persistence!). How can any

Re: page activation + components

2008-04-29 Thread Michael Gerzabek
@Retain private String param; Salue János Jarecsni schrieb: and how a component can get to know the page in which it is included? I mean, I can't @InjectPage, as the component will be included in many kinds of pages. @Kristian: thx for the many ways :) I'll try these, hope that the

Re: page activation + components

2008-04-29 Thread Chris Lewis
Janos, I'm having a hard time understanding a case that a component should know in which page it is embedded, so my suggestion probably wasn't a good one. Activation contexts aren't meant for components but for pages - you should be using component parameters to configure them, and if it's a more

Re: page activation + components

2008-04-29 Thread János Jarecsni
and how a component can get to know the page in which it is included? I mean, I can't @InjectPage, as the component will be included in many kinds of pages. @Kristian: thx for the many ways :) I'll try these, hope that the @Environmental stuff is scalable (I'm trying to bypass session creation as

Re: page activation + components

2008-04-29 Thread János Jarecsni
Hi Chris, I thought of pages as contexts for the components embedded within them. So, in one event handler of a component I would like to set some property or another (in the page object), and the other components in the page, which are also able to access this property may change their

Re: page activation + components

2008-04-29 Thread Chris Lewis
Janos, Without code or a description of your actual goal, I'm finding your situation too hypothetical to really digest. The one thing I can point out is what you said about wanting a component to set a property in the page. If you want to do that, then you have to know the class of the page and

Re: page activation + components

2008-04-29 Thread János Jarecsni
Hi Chris, even so you could help :) I want this kind of generic way of passing around information (component to component communication :)) so I'll look for the solutions Kristian and you outlined. thanks! cheers, janos 2008/4/29 Chris Lewis [EMAIL PROTECTED]: Janos, Without code or a

Re: page activation + components

2008-04-29 Thread János Jarecsni
Hi there, the service approach (as I expected) is session-agnostic (and is page-independent so concurrent users would interfere badly), therefore is not ok. I will now try the Environment approach... if that is session-aware :) thx again janos 2008/4/29 János Jarecsni [EMAIL PROTECTED]: Hi

Re: page activation + components

2008-04-29 Thread Andy Huhn
Hello, You can define the scope of each service...you can set that particular service to be tied to only one session. See http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html, and search for perthread. Thanks, Andy On Tue, 29 Apr 2008 18:02:52 +0200, János Jarecsni [EMAIL PROTECTED]