You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by pkc <pk...@gmail.com> on 2012/03/22 15:31:38 UTC

How to update a label BEFORE a form is submitted?

Still looking for help on how to update page components before a long running
page submit.  I don't seem to see the light on chaining events from same
button so if someone can provide an example it would be greatly appreciated.  

1) User presses submit button
2) A label gets updated saying "button pressed!"
3) Then the submit is processed

Seems I can do this with the ajax self updating timer behavior or mixing
client-side javascript with wicket components but that just doesn't seem
right for my scenario. Any working example of any sort will help though.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-label-BEFORE-a-form-is-submitted-tp4495663p4495663.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to update a label BEFORE a form is submitted?

Posted by pkc <pk...@gmail.com>.
Thanks Martin.  I am back on track after looking at those link examples and
the source code for AjaxIndicatorAppender.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-label-BEFORE-a-form-is-submitted-tp4495663p4507917.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: How to update a label BEFORE a form is submitted?

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Check IAjaxCallDecorator.
With a decorator you can change the label with pure JavaScript and
after that let Wicket do its Ajax call.
http://www.wicket-library.com/wicket-examples/ajax/links -> Success
link shows an alert(). Just change that JS to update a label.

On Thu, Mar 22, 2012 at 4:31 PM, pkc <pk...@gmail.com> wrote:
> Still looking for help on how to update page components before a long running
> page submit.  I don't seem to see the light on chaining events from same
> button so if someone can provide an example it would be greatly appreciated.
>
> 1) User presses submit button
> 2) A label gets updated saying "button pressed!"
> 3) Then the submit is processed
>
> Seems I can do this with the ajax self updating timer behavior or mixing
> client-side javascript with wicket components but that just doesn't seem
> right for my scenario. Any working example of any sort will help though.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-a-label-BEFORE-a-form-is-submitted-tp4495663p4495663.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org