RE: List loaded twice from DB

2006-05-31 Thread Schulte Marcus
d. -Original Message- From: Mark [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 6:22 PM To: Tapestry users Subject: Re: List loaded twice from DB Hi Marcus, Ok, I start to understand now. Are you sure that under production settings (with cache turned on) it will re-initialize the prop

Re: List loaded twice from DB

2006-05-31 Thread Nick Westgate
Hi Mark. Confusion over initial-value used to be a regular topic here for Tapestry beginners, but bot so much now. Resetting the property to null is the default behaviour, so there should be no need to do this. As for the "attach-value" idea, I haven't seen it discussed, but I suspect it may hav

Re: List loaded twice from DB

2006-05-31 Thread Mark
Hi Nick, thanks for this response. The next question is probably to be decided by the Tapestry developers, but maybe somebody else has some insights on this or knows if this has been discussed before: Would it not make more sense to be able to specify a "attach-value" and a "detach-value" in

Re: List loaded twice from DB

2006-05-31 Thread Mark
bsequent cycles will only have 2. btw: I don't disable caching anymore since I discoved the invaluable reset-Service -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 31, 2006 7:28 AM To: Tapestry users Subject: Re: List loaded twice from DB Hi

Re: List loaded twice from DB

2006-05-30 Thread Nick Westgate
Hi Mark. The "initial-value" attribute is poorly named. What it does is initialize your page property when the page is being *returned* to the pool, so that a page pulled from the pool has this "initial" property value. Of course, to facilitate the above, when a page is first constructed it mus

RE: List loaded twice from DB

2006-05-30 Thread Schulte Marcus
ry users > Subject: Re: List loaded twice from DB > > > Hi Ron, > > it sounds like this would work, but isn't this just a workaround for > something that really should not happen this way in the first place? > > Thanks, > > MARK > > Ron Piterman

Re: List loaded twice from DB

2006-05-30 Thread Mark
Hi Ron, it sounds like this would work, but isn't this just a workaround for something that really should not happen this way in the first place? Thanks, MARK Ron Piterman wrote: just an idea: try to implement the 'roomlist' property yourself, as I described in my previous postings, instead

Re: List loaded twice from DB

2006-05-30 Thread Ron Piterman
just an idea: try to implement the 'roomlist' property yourself, as I described in my previous postings, instead of letting tapestry do it. may be this will help. don't forget to implement a pageDetachListener which sets the property to null. I always had good experience when doing it like this

Re: List loaded twice from DB

2006-05-29 Thread Mark
Hi Ron, I don't understand what you mean by "instead of doing it on finishLoad()". I did not do anything with finishLoad(), I don't know why it calls the getList. Here is my .page file: class="com.mark_arnold.sample.rbs1.web.tapestry.page.admin.RoomListPage"> object="spring:rbsRoomAdminS

Re: List loaded twice from DB

2006-05-29 Thread Ron Piterman
use lazy initialization for the list instead of doing it on finishLoad() : public List getXXXList() { if (this.xxxList == null ) this.xxxList = readXXXList(); return this.xxxList; } + pageDetachListener -> this.xxxList = null. Cheers, Ron Mark wrote: Hi, I have a simple CRUD sc

List loaded twice from DB

2006-05-28 Thread Mark
Hi, I have a simple CRUD scenario with a "ListPage" and a "ModifyPage". The ListPage gets all records from the DB by calling the method "getAllRooms()" of a "RoomAdminService" and lists them in a table. For some reason the query "select * from rooms" is executed twice every time the page is acc