It is natural:
1 - model load some data from some source
2 - that source was updated, changed, and the data loaded on the model no
more reflect the data on that source
3 - detach the old loaded data on model
4 - next time any object require the data on model, it will no longer have
the old data (t
Or, call detach(), then call modelChanged()?
On Tue, Jan 26, 2010 at 4:02 PM, Jeremy Thomerson
wrote:
> Yes - James is right here - it's a loadable detachable model - so it needs
> to load the data in order to repopulate the list before deleting the item.
>
> My guess is either you need to call t
Yes - James is right here - it's a loadable detachable model - so it needs
to load the data in order to repopulate the list before deleting the item.
My guess is either you need to call the detach so that on the re-render it
gets reloaded, or you need to make sure your delete is being committed to
Doesn't it have to load the model so that it knows what item it's talking to?
On Tue, Jan 26, 2010 at 2:12 PM, Riyad Kalla wrote:
> Seems weird to me as well that 'detach' has to be explicitly called. Also
> still curious why Stephane was seeing the log ordering he did when the link
> was clicked
Seems weird to me as well that 'detach' has to be explicitly called. Also
still curious why Stephane was seeing the log ordering he did when the link
was clicked:
Loading all news
News deleted
I'd expect to see "news deleted" first, from his onClick handler then the
"loa
Thanks Pedro, it's ok now ;-)
I use LoadableDetachableModel to avoid the call to detach() method. It
does not seem that is the right way. Somebody can explain me why ?
Stéphane
Pedro Santos a écrit :
by calling getDefaultModel inside onClick, you get an reference to the link
component mode
by calling getDefaultModel inside onClick, you get an reference to the link
component model. You need to detach the model on your list view. You has an
reference to it on your variable "news". So: news.getDefaultModel().detach()
If you need, you can change that variable modifiers or turn it an inst
The behaviour is the same with the following code :(
public void onClick() {
// TODO : check the refresh issue
getNewsDao().delete(item.getModelObject());
ourLogger.debug("News deleted");
missing line: call detach method just after delete your item.
On Tue, Jan 26, 2010 at 1:41 PM, Pedro Santos wrote:
> Call news.getDefaultModel().detach(), and look for more info about
> detachable models.
>
> http://cwiki.apache.org/WICKET/detachable-models.html
>
> On Tue, Jan 26, 2010 at 1:35
Call news.getDefaultModel().detach(), and look for more info about
detachable models.
http://cwiki.apache.org/WICKET/detachable-models.html
On Tue, Jan 26, 2010 at 1:35 PM, Stéphane Jeanjean <
stephane.jeanj...@softeam.com> wrote:
> Hi,
>
> I don't use Hibernate. My persistence layer uses JDBC.
Hi,
I don't use Hibernate. My persistence layer uses JDBC.
What is strange when I click the delete link, it's the logs order :
Loading all news
News deleted
So it seems that the deletion is done after the data reload :(
Stéphane
Riyad Kalla a écrit :
Stephane,
I'll let someone smarter tha
Stephane,
I'll let someone smarter than me address the wicket issue of removing the
item from the ListView and seeing if that helps -- but is there a chance you
are using Hibernate and the Level 2 ehcache plugin or any 2nd-level caching
with your persistence code? I ask because I've seen code like
Please find my code just below :
public class NewsListPage {
protected static transient NewsDao myNewsDao;
public NewsListPage() {
PageableListView news =
new PageableListView("list", new NewsModel(), 15){
@Override
protected void populateItem(final
You're probably not using models correctly - specifically for your list
view. You could post some code, but make sure that you're reloading the
data for the list view after the onClick is called and the item is deleted.
--
Jeremy Thomerson
http://www.wickettraining.com
On Tue, Jan 26, 2010 at
Hello,
My page displays a list of items, for each of them, an icon is available
to delete it. The action is managed in a Link.onClick() method.
When I click on the link, the page is refreshed but the item is always
in my list, I have to do refresh again manually the page to have a list
wihtout
15 matches
Mail list logo