You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by theAnthony <an...@gmail.com> on 2012/05/02 11:49:50 UTC

Form having error cannot be modified via Ajax

Hi,

In my application, I'm developing a dynamic page with a table of currencies
per dates and on the side I have a form with a 'from' date and 'to' date.
Clicking on a cell of the table changes the value of the dates in the form.

This works all fine as long as the form is valid. But if the form has
errors, then clicking on one of the cell doesn't change the content of the
form.
I can see in the Wicket Ajax Debug that the new HTML content is passed,
there is no error there nor in the console of the browser ...

So, I was wondering if Wicket would block the refresh of forms with errors
for some reason or if there would be anything else worth looking at ?

Thanks for your help !

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-having-error-cannot-be-modified-via-Ajax-tp4602753.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: Form having error cannot be modified via Ajax

Posted by Igor Vaynberg <ig...@gmail.com>.
call form.clearinput() after you change its model. otherwise form
components will use their cached values instead of pulling from the
form.

-igor

On Wed, May 2, 2012 at 7:19 AM, theAnthony <an...@gmail.com> wrote:
> Indeed, I'm using an AjaxEventBehavior listening for "onclick", in the
> onEvent method, I send an event which is  intercepted by the form where the
> model of the form is changed and the elements to be refreshed are added to
> the AjaxRequestTarget.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-having-error-cannot-be-modified-via-Ajax-tp4602753p4603350.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
>

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


Re: Form having error cannot be modified via Ajax

Posted by theAnthony <an...@gmail.com>.
Indeed, I'm using an AjaxEventBehavior listening for "onclick", in the
onEvent method, I send an event which is  intercepted by the form where the
model of the form is changed and the elements to be refreshed are added to
the AjaxRequestTarget.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-having-error-cannot-be-modified-via-Ajax-tp4602753p4603350.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: Form having error cannot be modified via Ajax

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
Hi,

what are you using to change form's values when user clicks on table (an 
Ajax behavior ?) ?
> Hi,
>
> In my application, I'm developing a dynamic page with a table of currencies
> per dates and on the side I have a form with a 'from' date and 'to' date.
> Clicking on a cell of the table changes the value of the dates in the form.
>
> This works all fine as long as the form is valid. But if the form has
> errors, then clicking on one of the cell doesn't change the content of the
> form.
> I can see in the Wicket Ajax Debug that the new HTML content is passed,
> there is no error there nor in the console of the browser ...
>
> So, I was wondering if Wicket would block the refresh of forms with errors
> for some reason or if there would be anything else worth looking at ?
>
> Thanks for your help !
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-having-error-cannot-be-modified-via-Ajax-tp4602753.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
>


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