validation without form

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

validation without form

srinash
Hi, I am trying to validate 2 fields(one is a text field and the other is a select) that the user can enter and select. This is inside of a bigger form. I would not want to use a form to validate these fields. Can you let me know how I can validate these fields without doing a form submit?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: validation without form

vineetsemwal
you can add ajaxformcomponentupdatingbehavior to them

On Thu, Jun 14, 2012 at 10:10 PM, srinash <[hidden email]> wrote:

> Hi, I am trying to validate 2 fields(one is a text field and the other is a
> select) that the user can enter and select. This is inside of a bigger form.
> I would not want to use a form to validate these fields. Can you let me know
> how I can validate these fields without doing a form submit?
>
> Thank you
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/validation-without-form-tp4649992.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
thanks,

Vineet Semwal

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

Reply | Threaded
Open this post in threaded view
|

Re: validation without form

srinash
Thanks for the reply. Can you please direct me to some examples.

Sri
Reply | Threaded
Open this post in threaded view
|

Re: validation without form

vineetsemwal
formcomponent.add(validator)
formcomponent.add(new ajaxformcomponentupdatingbehavior("the_event"){
protected void onError(AjaxRequestTarget target, RuntimeException e){
target.add(feedback);
}
protected abstract void onUpdate(AjaxRequestTarget target){
target.add(feedback)}
}

for more concrete example look into the wicket examples that comes
with the distribution

On Thu, Jun 14, 2012 at 11:04 PM, srinash <[hidden email]> wrote:

> Thanks for the reply. Can you please direct me to some examples.
>
> Sri
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/validation-without-form-tp4649992p4649996.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
thanks,

Vineet Semwal

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

Reply | Threaded
Open this post in threaded view
|

Re: validation without form

srinash
thank you , will take a look

Sri
Reply | Threaded
Open this post in threaded view
|

Re: validation without form

srinash
srinash wrote
thank you , will take a look

Sri
Was able to use the ajaxformcomponentupdatingbehavior,
this is my scenario

<form>
textfield
select box
   submit (for these 2 fields after validation)
</form>

Can you let me know how i can validate and click on submit. Once I submit i take those values user has just entered (in textfield and selectbox) and call a webservice to retrieve some values. Those values are retrieved by the webservice are presented to the user, on selecting one of the values, that value is taken by the bigger form.

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: validation without form

vineetsemwal
you dont need that inner form if you are using
ajaxformcomponentupdatingbehavior,
for validation you can just add validator ,you will need to add the
behaviors to both formcomponents if you use
ajaxformcomponentupdatingbehavior

if you want that inner form and you want it to submit than either add
ajaxformsubmitbehavior on that dropdown to submit form or add a
ajaxbutton in your form for the same purpose

On Wed, Jun 20, 2012 at 12:22 AM, srinash <[hidden email]> wrote:

>
> srinash wrote
>>
>> thank you , will take a look
>>
>> Sri
>>
>
> Was able to use the ajaxformcomponentupdatingbehavior,
> this is my scenario
>
> <form>
> textfield
> select box
>   submit (for these 2 fields after validation)
> </form>
>
> Can you let me know how i can validate and click on submit. Once I submit i
> take those values user has just entered (in textfield and selectbox) and
> call a webservice to retrieve some values. Those values are retrieved by the
> webservice are presented to the user, on selecting one of the values, that
> value is taken by the bigger form.
>
> Thank you
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/validation-without-form-tp4649992p4650062.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
thanks,

Vineet Semwal

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

Reply | Threaded
Open this post in threaded view
|

Re: validation without form

srinash
vineetsemwal wrote
you dont need that inner form if you are using
ajaxformcomponentupdatingbehavior,
for validation you can just add validator ,you will need to add the
behaviors to both formcomponents if you use
ajaxformcomponentupdatingbehavior

if you want that inner form and you want it to submit than either add
ajaxformsubmitbehavior on that dropdown to submit form or add a
ajaxbutton in your form for the same purpose

Thanks,

<form>
> textfield
> select box
>   submit (for these 2 fields after validation)
> </form>

The form above is the outer form. There is no inner form, only one form the outer form.

Let me try what you said.

On Wed, Jun 20, 2012 at 12:22 AM, srinash <[hidden email]> wrote:
>
> srinash wrote
>>
>> thank you , will take a look
>>
>> Sri
>>
>
> Was able to use the ajaxformcomponentupdatingbehavior,
> this is my scenario
>
> <form>
> textfield
> select box
>   submit (for these 2 fields after validation)
> </form>
>
> Can you let me know how i can validate and click on submit. Once I submit i
> take those values user has just entered (in textfield and selectbox) and
> call a webservice to retrieve some values. Those values are retrieved by the
> webservice are presented to the user, on selecting one of the values, that
> value is taken by the bigger form.
>
> Thank you
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/validation-without-form-tp4649992p4650062.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
thanks,

Vineet Semwal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: validation without form

srinash
In reply to this post by vineetsemwal
<form>
textfield
select box
 submit (for these 2 fields after validation)
</form>

The form above is the outer form. There is no inner form, only one form the outer form.

Can a link be used to validate the user input fields.

Please let me know
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: validation without form

vineetsemwal
yes, you can also submit the form using submitlink/ajaxsubmitlink

On Wed, Jun 20, 2012 at 10:23 PM, srinash <[hidden email]> wrote:

> <form>
> textfield
> select box
>  submit (for these 2 fields after validation)
> </form>
>
> The form above is the outer form. There is no inner form, only one form the
> outer form.
>
> Can a link be used to validate the user input fields.
>
> Please let me know
> Thanks
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/validation-without-form-tp4649992p4650135.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
thanks,

Vineet Semwal

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