Thanks a lot. It works.
Mind Bridge wrote:
I presume that in pageBeginRender() you have something like this:
// initialize when page starts to render
_userList = ....
and getUsers() is something like this:
public List getUsers() {
return _userList;
}
To make the initialization lazy, remove the code from
pageBeginRender() and simply do:
public List getUsers() {
if (_userList == null) {
// this code was pageBeginRender() before:
_userList = ...;
}
return _userList;
}
In addition, set _userList to null at the end of render cycle to avoid
problems with pooling. (I presume you do that already).
There are of course other alternatives, especially with Tapestry 4,
but I need to see your code to help more specifically.
-mb
Radim Burget wrote:
Mind Bridge wrote:
The sorting listener is invoked before the page rendering starts. As
a result, getUsers() is called before pageBeginRender(). If you
initialize your variables there, you are going to get that problem.
I would suggest a lazy intialization in getUsers() -- that should
resolve the issue.
Could you please be more concrete? I do not understand. How can I
make a lazy initialization of getUsers() ?
Hi,
I am trying to google answer on how to disable caching in
contrib:table component to be working with sorting and page listing
but without success. Here is my Home.page tab definition:
<component id="table" type="contrib:Table">
<binding name="source" value="users"/>
<binding name="columns" value="Full
Name:fullName,Email:email, Phone Number:phoneNumber, !action"/>
<binding name="columnsClass" value="literal:title"/>
<binding name="pageSize" value="2"/>
</component>
(Tapestry 4.0beta-4)
On sorting or page listing is thrown exception:
Either the tableModel parameter or both source and columns
parameters must be specified by component
SelectAccount/table.tableView
If I make values cached with:
<binding name="tableSessionStateManager" value="new
org.apache.tapestry.contrib.table.model.common.FullTableSessionStateManager()"/>
everything is ok. But I need to not to cache data, because they are
changed quite often.
Could anyone help me?
Thanks in advance
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]