Thanks Igor. It worked for me. Nwei, for reference here is my code snippet:
final RadioGroup rgrp = new RadioGroup("rGrp", new Model()){
@Override
protected boolean wantOnSelectionChangedNotifications()
{
// TODO Auto-generated method stub
return true;
}
};
...........
rgrp.add(wc);
form.add(rgrp);
final IndicatingAjaxButton rmvDeno = new IndicatingAjaxButton("rmvDen",
form){
@Override
protected void onSubmit(AjaxRequestTarget target, Form
form) {
final Den den = (Den) rgrp.getModelObject();
getService().delete(den);
target.addComponent(wc);
}
};
rmvDeno.setDefaultFormProcessing(false);
form.add(rmvDeno);
Even if its in form it bypasses the validation and only get the selected
radio buttons values. I think this also applicable to checkgroup? :)
igor.vaynberg wrote:
>
> add(new RadioGroup(...) { protected
> wantOnSelectionChangedNotifications() { return true; }}
>
> will make it invoke RadioGroup.onSelectionChanged anytime a selection
> changes
>
> -igor
>
>
> On Thu, Mar 27, 2008 at 10:48 PM, freak182 <[EMAIL PROTECTED]> wrote:
>>
>> Nice idea, but i dont know how to implement it. Validator or Behavior?
>> any
>> codes..thanks a lot..cheers
>>
>>
>>
>>
>> Martin Makundi wrote:
>> >
>> > Ofcourse this does not work if javascript is disabled.
>> >
>> > I wonder if it is possible to switch the required fields in a
>> > validator (one which can be configured to run before the required
>> > checks).
>> >
>> > **
>> > Martin
>> >
>> > 2008/3/28, Martin Makundi <[EMAIL PROTECTED]>:
>> >> You could use onchange events to attach ajax behavior that changes
>> the
>> >> required fields?
>> >>
>> >> **
>> >> Martin
>> >>
>> >> 2008/3/28, freak182 <[EMAIL PROTECTED]>:
>> >>
>> >> >
>> >> > Hello,
>> >> > I have a problem about bypassing some textfields during form
>> >> process.I know
>> >> > how bypass form processing through adding a method to
>> >> > button.setDefaultFormProcessing(false);. Now my problem is to
>> bypass
>> >> only 1
>> >> > or 3 requiredtextfields during form processing because what im
>> >> concerned is
>> >> > only the value of radiogroup attach to the form...e.g.. i have to
>> >> REMOVE
>> >> > only the radio button which is selected in the form, thats means
>> no
>> >> more
>> >> > inputs needed.Of course, when i have to add items in listview i
>> >> should
>> >> > validate if there is value in textfield which required...Thanks a
>> >> > lot..Cheers.
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16345749.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]
>> >> >
>> >> >
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16346215.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]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/bypass-required-field-during-form-processing-tp16345749p16347640.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]