Deleting Cookies

2012-12-06 Thread Corbin, James
I have a ListView that renders items that are populated from user cookie data. The ListView contains a clear action that is supposed to delete the cookies then refresh the ListView so it reflects that the cookie data was removed. I have code that executes the deletion of the cookies (works),

Re: Deleting Cookies

2012-12-06 Thread Sebastien
Hi, Be sure to use a LoadableDetachableModel Also, maybe you set ListView#*setReuseItems* to true (because the ListView is in a form)? You can set it to false if you have no validation and then you will get fresh data (see ListView javadoc) Hope this helps, Sebastien. On Thu, Dec 6, 2012 at

Re: Deleting Cookies

2012-12-06 Thread Corbin, James
The ListView is not in a form, which is why I am leaving the default for setReuseItems to false. I am using a LoadableDetachableModel and verified the load that rereads the cookies, does in fact get called after I delete them (reset method call below). If I break in the load of the detachable

Re: Deleting Cookies

2012-12-06 Thread Sebastien
Well, I think it is because this is the same listview that is redisplayed, not the new one. The cause is that you did not add the new listview to its parent. But, I would have done a little bit differently because: 1/ You do not have to recreate the listview in ajaxlink's onclick. just clear

Re: Deleting Cookies

2012-12-06 Thread Corbin, James
Hi Sebastian, Thanks for your feedback. I wasn't recreating (semantics?) the Listview, I was just refreshing it via ajax so it updates with the model changes. What do you mean by reattach the listview's parent-container? Do you mean remove the listview and re-add it in the onbeforerender? J.D.

Re: Deleting Cookies

2012-12-06 Thread Sebastien
Oops, you are right: I misread. I though you was recreating the listview, sorry for he confusion! Also, reattach the listview's parent-container simply means what you already do by: target.add(RecentlyViewedItemsPanel.this.get(itemContainer)); (this is because it is not possible to reattach the

Re: Deleting Cookies

2012-12-06 Thread Joachim Schrod
Corbin, James wrote: The ListView is not in a form, which is why I am leaving the default for setReuseItems to false. I am using a LoadableDetachableModel and verified the load that rereads the cookies, does in fact get called after I delete them (reset method call below). If I break in the