Hi,
u r right. u can use preserveDataModel="true" in
datatable. if it is true then action method surely be
invoked. But the problem is if u want to delete the
row from table and afetr deletion you want to display
the same page then row will be deleted from DB but
page will contain that row. I am looking for the soln.
regards...
Arvind
--- David Delbecq <[EMAIL PROTECTED]> 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="#{theAssignment.activity.name}"
> 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?
>
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/