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
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
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
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
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
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
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
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
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
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
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
11 matches
Mail list logo