Re: ListPanel - update model

2015-02-15 Thread Martin Grigorov
On Sun, Feb 15, 2015 at 6:48 PM, Chris wrote: > Hi, > > when using > > pModel = new ListModel(){ >@Override >public List getObject() { > return someService.calculate(); >} > }; > > I experience that in this case #someService.calculate() is called several > times consecutively wh

Re: ListPanel - update model

2015-02-15 Thread Chris
Hi, when using pModel = new ListModel(){ @Override public List getObject() { return someService.calculate(); } }; I experience that in this case #someService.calculate() is called several times consecutively when loading the page. Why is this the case? Setting the model in the

Re: ListPanel - update model

2015-02-15 Thread Francois Meillet
Hi Chris, The ListModel keeps a reference on the model created at the first occurence of that line pModel = new ListModel(someService.caculate()); The simplest thing you could do is to reset the listpanel's model, but this is not a good practice. listPanel.setDefaultModel(model); add(new AjaxF

Re: ListPanel - update model

2015-02-15 Thread Martin Grigorov
Hi, On Feb 14, 2015 11:24 PM, "Chris" wrote: > > Hi all, > > I would like to update a list model when the user clicks on a certain link. However, when the listPanel is rendered after clicking on the link, the model seems not to be updated and still contains the old values. > > How to fix this? >

ListPanel - update model

2015-02-14 Thread Chris
Hi all, I would like to update a list model when the user clicks on a certain link. However, when the listPanel is rendered after clicking on the link, the model seems not to be updated and still contains the old values. How to fix this? PAGE: IModel> pModel; public SomePage() { pMo