Yes, I know it is tricky, but the fact is I don't think I would really need
type conversion in this case.
I will try to explain myself. I have the following UI:
|OPERATOR |V|
|INPUT1="aBc" | |INPUT2="DeF" |
...being "OPERATOR" the DropDownChoice, and both INPUT1 and INPUT2 two
TextFields (String TextFields, to be precise). Both INPUT1 and INPUT2 are
required (when they are visible, of course).
When I change the value on "OPERATOR", the UI will change, hiding INPUT1 and
INPUT2 but showing INPUT3, another TextField which should have the same
contents that were on INPUT1 before:
|OPERATOR |V|
|INPUT3="aBc" |
The problem is that, when changing OPERATOR, I need to read the value from
INPUT1 to set it into INPUT3, but if INPUT2 is empty I will receive a
validation message telling me that it is required... which it is, but I just
want Wicket to validate that when I want to *really* submit the form, and
not now that I am only changing the operator.
Thanks.
Regards,
Daniel.
igor.vaynberg wrote:
>
> how are you planning on reading the other values? you cannot access
> the model so you will have to call getinput(), are you also planning
> on doing type conversion yourself then?
>
> -igor
>
> 2009/6/2 Daniel Fernández <[email protected]>:
>> Hello,
>>
>> I have a form with a DropDownChoice, on which "onchange" event I want to
>> update some form components. But I need to read data from other fields of
>> the form for doing so, and so I added an AjaxFormSubmitBehavior to the
>> DropDownChoice.
>>
>> My intention is to read the data from the drop down and from the other
>> fields, and depending on these data, update some other components... but
>> the
>> problem is that AjaxFormSubmitBehavior not only sends the form data, but
>> also *validates it*, which I don't want (I don't want validation messages
>> to
>> appear when changing the value of the drop down).
>>
>> If it where an AjaxButton I would be able to just
>> setDefaultFormProcessing(false), but I don't see anything like that in
>> AjaxFormSubmitBehavior...
>>
>> Is there a way to do this?
>>
>> Regards,
>> Daniel.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/Can-I-make-AjaxFormSubmitBehavior-submit-raw-form-data-but-not--validate-it--tp23830542p23835836.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]