Re: Event or Notice when a ListView's Model changes

2011-12-06 Thread hfriederichs
I'm trying to do this, to send an Event in the DataView's onBeforeRender(), but now I encounter another issue. On the receiving side of the Event, in the onEvent(Component component, IEvent? event), I need a AjaxRequestTarget. Can I create an AjaxRequestTarget and pass it with the Event? I tried

Re: Event or Notice when a ListView's Model changes

2011-12-06 Thread Hans Lesmeister 2
Hi, hfriederichs wrote I'm trying to do this, to send an Event in the DataView's onBeforeRender(), but now I encounter another issue. On the receiving side of the Event, in the onEvent(Component component, IEvent? event), I need a AjaxRequestTarget. Can I create an AjaxRequestTarget

Re: Event or Notice when a ListView's Model changes

2011-12-06 Thread hfriederichs
But when the event is processed, I'm not in an AjaxRequest. Anyway, I have something working, now, I am able to update a version field (by sending an inter-component event in the onBeforeRender() of the ListView that has it's own Form; the Event is processed by another Form at the top of the

Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
Hello, I have a Wicket ListView, who's Model is based on a select on a process-database. Users can initiate a (deploy-)process, and when the process is finished, a row is added in the database, and so also in the ListView's Model's backing List. When this happens, I want to rerender another part

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Andrea Del Bene
Hi, have you tried overriding onModelChanged()? You can fire event in this method. Hello, I have a Wicket ListView, who's Model is based on a select on a process-database. Users can initiate a (deploy-)process, and when the process is finished, a row is added in the database, and so also in

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
Yes, I'm sorry, I wrote /I tried various methods, onChange and the like/ by which I meant onModelChanged(). But onModelChanged() isn't called when a row is added. I think that makes sense, because the backing List on itself hasn't changed. Furthermore, I experimented by replacing the ListView by a

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Martin Grigorov
call manually listview.modelChanged() after the update of its List this will call onModelChanged On Sun, Dec 4, 2011 at 8:37 PM, hfriederichs h.friederi...@ohra.nl wrote: Yes, I'm sorry, I wrote /I tried various methods, onChange and the like/ by which I meant onModelChanged(). But

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
But the List isn't updated by a user's action. There's a decoupling here: the user's action inserts a row that has a 'state-column' that's initialized with, let's call it 'unfinished'. The processes are executed asynchronously by another thread, that, after some minutes, updates the state-column

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Igor Vaynberg
the label that outputs the status can keep its last status, and in onbeforerender can check if the new status coming from the model is different then the old. if it is, it can fire the event. -igor On Sun, Dec 4, 2011 at 12:59 PM, hfriederichs h.friederi...@ohra.nl wrote: But the List isn't

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
I'm sorry if my writing is confusing. But there isn't a label that outputs the state, because the list shows /only/ finished processes. Maybe the following flow explains what happens: - A user chooses an application he wants to deploy to a certain stage, let's say production - When he has chosen,

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Andrea Del Bene
If you override listview's onBeforeRender you could check if finished processes' list contains version displayed by label and if so, you could update it. I'm sorry if my writing is confusing. But there isn't a label that outputs the state, because the list shows /only/ finished processes. Maybe