Re: RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-12 Thread Sven Meier
Have you tried changing AjaxRequestAttributes#setAllowDefault(true) and 
#setEventPropagation(BUBBLE) ?


Otherwise please create a quickstart so we can debug the problem.

Regards
Sven

On 06/12/2013 03:43 PM, divad91 wrote:

Anyone notice the same problem ?
AjaxFormChoiceComponentUpdatingBehavior seems to unbind onclick event.

David




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216p4659419.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-12 Thread divad91
Thanks Sven, I had not tested the setEventPropagation(BUBBLE), only the
setAllowDefault(true).

It's working perfectly right now !

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
  attributes.setAllowDefault(true);
  attributes.setEventPropagation(EventPropagation.BUBBLE);
  super.updateAjaxAttributes(attributes);
}

Thanks
David



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216p4659426.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-04 Thread divad91
Thank you for your response.

By overriding the updateAjaxAttributes and adding
attributes.setAllowDefault(true), my javascript validation works but my
behavior (ajax call) is not triggered.

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
attributes.setAllowDefault(true);
}

If I call the super class updateAjaxAttributes and I add the
setAllowDefault(true) method, it wont change anything. My field stay in
error after the ajax call

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
attributes.setAllowDefault(true);
}

David




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216p4659227.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-04 Thread divad91
The ajax response are the same if I compare with a Wicket 6.6.0 application
version.
Looks like the AjaxFormChoiceComponentUpdatingBehavior is blocking the
jQuery Validation to unhighlight my field before the ajax call is triggered.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216p4659228.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-04 Thread divad91
The problem is really related with the onClick event.

I copied the class AjaxFormChoiceComponentUpdatingBehavior in my project
(hijacking) and changed the event click by onchange. The validation and
the ajax call are working perfectly.

Jquery validation bind a click event on my radioChoice. 
Adding a AjaxFormChoiceComponentUpdatingBehavior on my RadioChoice will
unbind or just don't execute my jQuery validation click event. Result, even
when my radio is checked, my field stays in error.

Is this a bug ? I know there was problem when adding multiple wicket
behavior on a field (only the last one added was executed) but in my case, I
only have 1 wicket behavior. 
All other events are added by Jquery validation.
Any idea ? 

Thanks
David



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216p4659229.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-03 Thread divad91
Hi,

Im not sure if my problem is related to wicket or jQuery but since I
upgraded from wicket 6.6.0 to 6.8.0, my required validation on RadioChoice
is not working anymore.

The problems occurs on every RadioChoice with an
AjaxFormChoiceComponentUpdatingBehavior behavior.
If I removed the behavior, my validation works perfectly. When the behavior
is on my radioChoice, my ajax listener is called but my field stays in
error.

I didn't change anycode. I just upgraded from 6.6.0 to 6.8.0.

I am using jQuery Validation Plugin 1.11.1 for validation.
Do we still need to use AjaxFormChoiceComponentUpdatingBehavior on
RadioChoice ? Does anyone encounter  a similar problem ?

Thanks
David




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: RadioChoice AjaxFormChoiceComponentUpdatingBehavior and validation

2013-06-03 Thread Igor Vaynberg
you might have to override updateAttributes on the behavior and say
attributes.allowdefault(true)

-igor

On Mon, Jun 3, 2013 at 11:28 AM, divad91 diva...@hotmail.com wrote:
 Hi,

 Im not sure if my problem is related to wicket or jQuery but since I
 upgraded from wicket 6.6.0 to 6.8.0, my required validation on RadioChoice
 is not working anymore.

 The problems occurs on every RadioChoice with an
 AjaxFormChoiceComponentUpdatingBehavior behavior.
 If I removed the behavior, my validation works perfectly. When the behavior
 is on my radioChoice, my ajax listener is called but my field stays in
 error.

 I didn't change anycode. I just upgraded from 6.6.0 to 6.8.0.

 I am using jQuery Validation Plugin 1.11.1 for validation.
 Do we still need to use AjaxFormChoiceComponentUpdatingBehavior on
 RadioChoice ? Does anyone encounter  a similar problem ?

 Thanks
 David




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/RadioChoice-AjaxFormChoiceComponentUpdatingBehavior-and-validation-tp4659216.html
 Sent from the Users forum mailing list archive at Nabble.com.

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


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