myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Friedrich <trini...@eekboom.com>
Subject Re: help me decide when to populate my datatable?
Date Wed, 05 Mar 2008 22:52:36 GMT
IMHO the best way to deal with this is to use either JBoss Seam or
Apache Orchestra and put the bean in conversation or page scope
(though there aren't always natural boundaries to such a conversation,
so that may turn out to be not that easy, too).

david delbecq wrote:
> 
> simon a écrit :
>> Yes, it's a common issue.
>>
>> In JSF 1.2 it is possible to detect whether a postback is in progress.
>> In your case, if you know that there are no editable fields then you
>> could then just return null, or an empty list. Of course you then need
>> to go back to really fetching data in the render phase, but the setters
>> methods for your search criteria should be able to trigger that.
>>
>> I agree it's ugly, and there should really be a nicer solution. I don't
>> know of one though.
>>   
> If i remember well, tomahawk datatable has preserveModel. This one 
> ensure that the model during apply request values and all other phases 
> before render is the same as the one done during previous render. The 
> value Expression is not used until you again reach render phase. 
> However, that mean the model used during render is stored in session, 
> with all implications of such behaviour (session values should be made 
> serializable, memory is use to preserve this states, hibernate session 
> might get disconnected and lazy loading fails, etc)


Mime
View raw message