Ok thank you, that worked fine ...
Now, in another panel, I'm trying to show the user the progress that's being
made while a process is running, something like "Job 1 out of 7 running"
then ""Job 2 out of 7 running", etc.
Here's what I did (based on what I read in the link you gave me) :
- Create a simple POJO class JobStatus
- declare a label with an AjaxSelfUpdatingTimerBehavior in my panel
final Label msgStatus = new Label("msgStatus", new
PropertyModel(jobStatus, "status"));
msgStatus.setOutputMarkupId(true);
frmStatus.add(msgStatus);
msgStatus.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)));
- in the onSubmit code of the button that submits the job in the panel
jobStatus.setStatus("Job 1 out of 7 running"); then a little further
jobStatus.setStatus("Job 2 out of 7 running"); etc.
The status is not updated on screen ... any idea what I'a forgetting this
time ?
Jeremy Thomerson-5 wrote:
>
> Yes - you're not understanding models. You created a Label with a static
> String - the current time at the time of creation. You need to use a
> model,
> which is a "data finder".... something like:
>
> new Label("msgStatutTransfert", new AbstractReadOnlyModel<Date>() {
> public Date getObject() {
> return new Date();
> }
> });
>
> Also, read: http://cwiki.apache.org/WICKET/working-with-wicket-models.html
> and buy Wicket in Action.
>
--
View this message in context:
http://www.nabble.com/Label-with-AjaxSelfUpdatingTimerBehavior-not-refreshing-tp20490454p20506788.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]