You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by srinash <av...@gmail.com> on 2012/01/31 09:45:00 UTC

help with form submit

Hello, I am a beginner to wicket. I am currently having a form with email and
password. I am able to validate the fields, now the next challenge is how I
can display a text just above the form (like 'email' submission successful)
after both fields do not have errors and clear the form fields.

Help will be appreciated

TIA

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/help-with-form-submit-tp4343850p4343850.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: help with form submit

Posted by srinash <av...@gmail.com>.
Thank you for the reply. I will take a look.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/help-with-form-submit-tp4343850p4344980.html
Sent from the Users forum mailing list archive at Nabble.com.

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


RE: help with form submit

Posted by Michal Wegrzyn <mi...@onior.com>.
Maybe you will find this useful:

http://println.posterous.com/wicket-automatic-ajax-form-validation-marking

Best regards,
Michal Wegrzyn

> -----Original Message-----
> From: srinash [mailto:avisridhar@gmail.com]
> Sent: Tuesday, January 31, 2012 10:07
> To: users@wicket.apache.org
> Subject: Re: help with form submit
> 
> Thanks for the reply. I will need to use Ajax as i would not want to
> refresh
> the page. CAn you let me know how I can do this by using a
> fallbackbutton,
> an example would be good.
> 
> thank you
> 
> --
> View this message in context: http://apache-
> wicket.1842946.n4.nabble.com/help-with-form-submit-
> tp4343850p4343890.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


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


Re: help with form submit

Posted by Josh Kamau <jo...@gmail.com>.
To use ajax, just and the label in my previous example in your instance of
AjaxRequestTarget and make sure you have set OutputMarkupId to true for the
label.

Now if you want to submit the form via ajax, you can use an
AjaxSubmitLink....

Josh.

On Tue, Jan 31, 2012 at 12:07 PM, srinash <av...@gmail.com> wrote:

> Thanks for the reply. I will need to use Ajax as i would not want to
> refresh
> the page. CAn you let me know how I can do this by using a fallbackbutton,
> an example would be good.
>
> thank you
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/help-with-form-submit-tp4343850p4343890.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: help with form submit

Posted by srinash <av...@gmail.com>.
Thanks for the reply. I will need to use Ajax as i would not want to refresh
the page. CAn you let me know how I can do this by using a fallbackbutton,
an example would be good.

thank you

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/help-with-form-submit-tp4343850p4343890.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: help with form submit

Posted by Josh Kamau <jo...@gmail.com>.
Hi ;

There are many ways of doing that. For now i will assume that you are not
using ajax. I will assume that you are using Model .

you can do this.

on your page, add a message property.

    private String message ;

//then add a label that reads and rights to the message

add(new Label("mylabel", new Model<String>(){

              public String getObject(){
                  return message ;
              }

             public void setObject(String object){
                  message = object ;
             }
}))

Then on your form submit , set the message value.

When ever page refreshes, the label will display the new value.

Hope that helps.

Josh.

On Tue, Jan 31, 2012 at 11:45 AM, srinash <av...@gmail.com> wrote:

> Hello, I am a beginner to wicket. I am currently having a form with email
> and
> password. I am able to validate the fields, now the next challenge is how I
> can display a text just above the form (like 'email' submission successful)
> after both fields do not have errors and clear the form fields.
>
> Help will be appreciated
>
> TIA
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/help-with-form-submit-tp4343850p4343850.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>