On Dec 6, 2009, at 12:40 AM, maven apache wrote:

> For example in a user login page, after the submit button are clicked I want
> user jump to success page or error page.
> So how to ?

setResponsePage(MyNewPage.class)

> In my login page:
> public class LoginPage extends WebPage{
>  ...........
>  add(new LoginForm("loginForm"))
> }
> 
> public class LoginForm .........{
> TextField nameText=new TextField("name");
> TextField passText=new TextField("pass");  //how to make a password
> textfield to hind the char user entering?
>                public void onSubmit() {
>                   /// here how to add listener to the submitButton to jump?
>                }
> //   Button submitButton=new Button("submit");   ///// do I need to specify
> a submit button?(make the wicket know that "this is a submit button,when
> clicked,you should do something?)

if there's only one submit button, specifying a button isn't necessarily 
required.

> add(nameText);
> add(ageText);
> }
> 
> 
> 2) when to use wicket tag
> That to say if I want to show some message, I can write it in the html or
> create a label in java source.
> Take the above page for example, the textfield can be also defined in the
> html element like:
> <input type="password" value="" />, and the submit button can be <input
> type="submit" ,,,,/>
> What I mean is when to use the wicket and when to use the html element ?

when it's appropriate.  wicket:id tags are for mapping to components where 
you'd like to pull or push data to.  it's not an either/or situation.



To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.

========================================================
This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.
========================================================

Reply via email to