pageLoaded() is something that may only happen once for many, many requests.

You might want to move it to pageAttached which will move it to per-request.
Also, check out the @Cached annotation that you could apply to the
getAllCategories() function if it is used more than once in a request.


> -----Original Message-----
> From: Peter Beshai [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 08, 2008 11:01 AM
> To: Tapestry User Mailing List
> Subject: Re: [T5] Need AppPropertyEditBlocks to reload page-load values
> 
> My current workaround it to just grab from the database on every
> getAllCategories() call and get rid of the pageLoaded method. I'd be
> interested to hear if there are any different approaches.
> 
> Peter Beshai
> 
> On Tue, Apr 8, 2008 at 10:51 AM, Peter Beshai <[EMAIL PROTECTED]>
> wrote:
> 
> > I have a block in my AppPropertyEditBlocks that grabs a list of data
> from
> > the database, which works fine. The problem happens if I modify what
> should
> > be in that list (say I add another row to the db), the edit block
> doesn't
> > update it's list. I currently am populating the list in the pageLoaded
> > method:
> >
> > void pageLoaded()
> > {
> >     _allCategories = _categoryDAO.findAll();
> > }
> >
> > Any idea what I can do to fix this?
> >
> > Peter Beshai
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to