myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From delbd <>
Subject Re: datatable and htmlcommandlink?
Date Sat, 16 Sep 2006 11:43:35 GMT
So then my problem is how to have the datatable contains old datas
before action and new datas after action...

Mike Kienenberger a écrit :
> h:dataTable value="#{sharkEngine.acceptedAssignments}" must remain
> constant  from renderResponse of the first request through
> invokeAction of the second request.
> I handle this by using <t:saveState
> value="#{sharkEngine.acceptedAssignments}">
> On 9/15/06, David Delbecq <> wrote:
>> Hello,
>> I have a datatable that iterate over some database values. Those values
>> are subject to change, especially in quantity. The datatable is rendered
>> like this:
>>     <h:dataTable value="#{sharkEngine.acceptedAssignments}"
>> var="theAssignment">
>>         <h:column>
>>             <h:commandLink immediate="true"
>> value="#{}"
>> action="#{sharkEngine.action.showActivity}"
>> actionListener="#{sharkEngine.action.commandListener}">
>>                 <f:param name="activityToShow"
>> value="#{theAssignment.activity.key}"  />
>>             </h:commandLink>
>>         </h:column>
>>     </h:dataTable>
>> This basically renders a list of links that need to contain one
>> information: "activityToShow". Technically,
>> #{sharkEngine.action.showActivity} will need nothing more to setup
>> session and show the edition form. However, between display of table and
>> click by user, the database list referenced by datatable is subject to
>> change  (because whatever happens, we must reflect db changes to user).
>> Here is the problem:
>> If 3 items are showned to user (let's say a,b,c), the user clicks on the
>> last one (c) but by that time the entry a has been removed from
>> database, the action does not take place?!?
>>  I suspect this is because the 3rd line of datatable has been removed,
>> but how do i handle this. The user won't accept that nothing happens
>> while he clicks on an entry, obviously. JSF is silent on why it did not
>> execute the action and <h:messages/> shows nothing too.
>> What is the good way to create such list of links?

View raw message