What about detach method. Is it also depricated? i am not sure but have a
look at detach method. It does the same job.


Muralidhar Y
Software Engineer,
Adastrum technologies-Nikai groups,
EmiratesGroup-I.T Division,
Dubai, UAE.
Mobile : 00971-50-2256149.
http://www.adastrumtech.com
http://www.mercator.aero  
(Keep Smiling. Be happy All The Time.)

-----Original Message-----
From: Nick Stuart [mailto:[EMAIL PROTECTED] 
Sent: 17 September 2005 16:32
To: Tapestry users; [EMAIL PROTECTED]
Subject: Re: jwc files and annotations

In tapestry 4 you should use the pageBeginRender method and implement the
PageBeginRenderListener. You should be able to initialize any page
properties you want here.

There is also a coresponding pageEndRender and PageEndRenderListener but I
dont think its used quite as much, but its there.

-Nick 

On 9/17/05, Tomáš Drenčák <[EMAIL PROTECTED]> wrote:
> Yes initialize method is good and even its name sounds like it's 
> initializing smth. I have used it in tapestry 3 but now it is 
> deprecated. Is there an alternative method to initialize?
> 
> 2005/9/17, Muralidhar Y. <[EMAIL PROTECTED]>:
> >
> > hi some times I got error when I am not passing IRequestCycle as 
> > parameter to listener method.
> >
> > To initialize the parameters there is initialize method you also can 
> > have a look at detach method and see.page begin render is , if you 
> > want to do something before any component renders itself. Page 
> > validate is if you want to do any validations like user is 
> > authenticated or not and any other page validations you can use it.
> >
> >
> > Muralidhar Y
> > Software Engineer,
> > Adastrum technologies-Nikai groups,
> > EmiratesGroup-I.T Division,
> > Dubai, UAE.
> > Mobile : 00971-50-2256149.
> > http://www.adastrumtech.com
> > http://www.mercator.aero
> > (Keep Smiling. Be happy All The Time.)
> >
> > -----Original Message-----
> > From: Alan Chandler [mailto:[EMAIL PROTECTED]
> > Sent: 16 September 2005 22:49
> > To: [email protected]
> > Subject: Re: jwc files and annotations
> >
> > On Friday 16 September 2005 18:29, Tomáš Drenčák wrote:
> > > Thanks a lot.
> > >
> > > Another question... You are using pageValidate to set up 
> > > thisPerson property. I'm still little bit confused about page
initialization.
> > > What are pageBeginRender, pageValidate and prepareForRender for? 
> > > Where to initialize e.g. thisPerson from passed personId 
> > > parameter? I've used pageBeginRender, lazy initialization, but 
> > > which method is specially designed for this purpose?
> >
> >
> > I must admit, this was a bit trial and error.
> >
> > I pass the personId parameter via the following code in another
component.
> >
> >
> >         @InjectPage("Details")
> >         public abstract Details getDetailsPage();
> >
> >         public IPage doShowDetails(int personId) {
> >             Details details = getDetailsPage();
> >             details.setPersonId(personId);
> >             return details;
> >         }
> > }
> >
> > Where this code gets set up in the html template for this component 
> > as
> >
> > <div class="surname">
> >         <span jwcid="@DirectLink"
> >                 listener="listener:doShowDetails"
> >                 parameters="ognl:person.id"
> >                 ><span jwcid="@Insert"
> >                         value="ognl:person.surname"
> >                         >Chandler</span></span> </div>
> >
> >
> > I think PageBeginRender failed  (thinking back to when I orginally had
it
> > here) because there seems to be a validation phase of the page before
then,
> > and I had not set up the record, and had null pointer exceptions.
> >
> > I think the page initialisation failed because the setPersonId call
hadn't
> > happened (maybe - difficult to remember now) the initialisation got
called
> > when I did the first call to getDetailsPage in the listener above.
> >
> > --
> > Alan Chandler
> > http://www.chandlerfamily.org.uk
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to