On Wed, 18 Feb 2009, Daniel Ferreira Castro wrote:
> AjaxFormComponentUpdatingBehavior("onchange") and
> AjaxFormComponentUpdatingBehavior("onsubmit") to the DropDown Box that I
> want to be updated after the form post.
> But didn't work yet.
"onsubmit" probably doesn't exist for <select>. Have you
looked at the ajax debug console (available when running
Wicket in development mode, e.g.
-Dwicket.configuration=DEVELOPMENT )?
> getHibernateTransaction();
That sounds strange, by the way.
> * //My failed attemp to use the Ajax event to update the form*
> categoriaForm.getCategoriaPai().add(new
> AjaxFormComponentUpdatingBehavior("onchange") {
> private static final long serialVersionUID =
> 1998330379948659165L;
>
> protected void onUpdate(AjaxRequestTarget target) {
> target.addComponent(categoriaForm.getCategoriaPai());
> }
> });
You're just updating categoriaPai with the values from the
server, whenever its selection is changed, without ever
submitting them to the server.
AjaxFormComponentUpdatingBehavior does not submit the whole
form -- for that you need to use some *submitting*behavior.
Look at the source code of the different Ajax*Form*Behavior
to see better what they do.
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]