Yes - you are right. I was flushing the hibernate cache a bit too late.

I am thinking calling getUserList() twice sounds a bit wasteful. It probably
won't hit the database again with hibernate caching, but I am thinking for
these mega objects maybe the value="#{userBean.userList}" binding is perhaps
not a good idea. Setting the binding with user code would be better where
performance is a concern. It is something to think about.

Thanks again.

Regards,
Yee

-----Original Message-----
From: Mathias Brökelmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 1 November 2005 3:37 AM
To: MyFaces Discussion
Subject: Re: Problem: DataTable binds too early...

the datatable will call getUserList() a second time when the new
response is rendered. It is the user who has to return the right
list/datemodel on the second time without the deleted entries in the
list.

2005/10/31, Yee CN <[EMAIL PROTECTED]>:
>
>
>
> Hi,
>
>
>
> I am facing the following problem, and I hope someone can show me how to
> achieve this in JSF.
>
>
>
> Scenario – A jsf page with a <t:dataTable> of users. One column is a
delete
> button, which deletes a row, and navigate back to the same page.
>
>
>
> Problem: When the delete button is pressed, the order of execution seems
to
> be the following:
>
> -          The page does a postback
>
> -          The backing bean is constructed
>
> -          Restoring view: <t:dataTable> invoke getUserList() and
populates
> the table
>
> -          Applicaton action: deleteUserAction() is invoked
>
>
>
> The result is that the data table is showing the deleted user!
>
>
>
> As a point of reference, in ASP.NET the binding to data table is done
> explicitly in code so the programmer can decide the timing of binding the
> data table. How do I achieve the same in jsf?
>
>
>
> Thanks in advance
>
>
>
> Yee
>
>


--
Mathias

Reply via email to