I follow the tutorial 
http://www.developer.com/java/web/article.php/10935_3673576_1 to learn how to 
use wicket. And I want to practise not to embed the Form inside another class. 
So I create a class called LoginForm.java and move the code to there (as 
follow).
public class LoginForm extends Form {
  public LoginForm(String id) {
    super(id);
  }
  @Override
  public void onSubmit() {
        Object o = get("packageName.to.Login");
        System.out.println("object:"+o.getClass().getSimpleName());
        (Login (o)).getUserId();
        (Login (o)).getPassword();
 
 }
}
However, after submit the form, I get the a NullPointerException error because 
the object o is null. How can I obtain the component of Login? Or how can I use 
the method of Login?

Thanks in advice,




      ___________________________________________________________ 
Yahoo! For Good helps you make a difference  

http://uk.promotions.yahoo.com/forgood/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to