Hi Sven,

unfortunately it would be a too great effort to change every usage of
those input fields (because they are inside a library and are used very
often). So I had to go along with Martin's suggestion. But anyway,
thanks for the quick reply!

Christian
 
>> Do I have to put the fields into a form and submit the whole form
>
> Wrapping all three inputs in a form with an AjaxFormSubmitBehavior is
> the easiest solution.
> Do you have any problems with it?
>
> Sven
>
>
>
> On 04/14/2014 07:45 PM, Christian Smolka wrote:
>> Hi to everybody!
>>
>> My little problem is about validating multiple input fields as a
>> single one.
>> So, I have three DoB fields (one for the day, one for the month and one
>> for the
>> year) that should be validated as a single date.
>>
>> While using Wicket 1.5 we overwrote
>> AjaxEventBehavior#getEventHandler() and
>> returned a custom made JavaScript that serialized the three fields like
>> this:
>>
>>
>> StringBuffer buffer = new StringBuffer("wicketAjaxPost('")
>>      .append(this.getCallbackUrl()).append("', ");
>> for (String id : this.getInputIds()) {
>>     
>> buffer.append("wicketSerialize(Wicket.$('").append(id).append("')) + ");
>> }
>> buffer.setLength(buffer.length() - 3);
>> return buffer;
>>
>>
>> This worked pretty well. But I have to migrate the application to
>> Wicket 6
>> and this doing does work anymore. As far as I understood the new
>> Ajax-way,
>> it isn't possible anymore to provide a custom script like the one
>> above. But
>> how can I restore the old behavior? Do I have to put the fields into a
>> form and
>> submit the whole form to validate it?
>>
>> Thanks in advance!
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to