myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david delbecq <delbd+jaka...@oma.be>
Subject Re: help me decide when to populate my datatable?
Date Wed, 05 Mar 2008 22:42:55 GMT

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