[jboss-user] [JBoss Seam] - Re: error en property/getter

fphilip do-not-reply at jboss.com
Mon Nov 5 09:33:17 EST 2007


@Name("login")
  | public class LoginForm implements Serializable {
  |     public static final String ERROR = "error";
  |     public static final String LOGGED = "logged";
  |     private String username;
  |     private String contextId;
  |     private String password;
  |     private User user;
  |     private Context context;
  | 
  |     @In
  |     private Identity identity;
  |     @org.jboss.seam.annotations.Logger
  |     private Log log;
  | 
  |     @Length(max=10, min=5)
  |     public String getUsername() {
  |         return username;
  |     }
  | 
  |     public void setUsername(String username) {
  |         this.username = username;
  |     }
  | 
  |     public String getContextId() {
  |         return contextId;
  |     }
  | 
  | 
  |     public Context getContext() {
  |         return context;
  |     }
  | 
  |     public void setContext(Context context) {
  |         this.context = context;
  |     }
  | 
  |     public void setContextId(String contextId) {
  |         this.contextId = contextId;
  |     }
  | 
  |     public String getPassword() {
  |         return password;
  |     }
  | 
  |     public void setPassword(String password) {
  |         this.password = password;
  |     }
  | 
  |     public String login(){
  |         identity.login();
  |         return identity.isLoggedIn() ? LOGGED : ERROR;
  |     }
  | 
  | 
  |     public User getUser() {
  |         return user;
  |     }
  | 
  |     public void setUser(User user) {
  |         this.user = user;
  |     }
  | 
  | 
  |     public String cancel(){
  |         return Action.CANCEL;
  |     }
  | 
  |     @Begin(pageflow="login")
  |     public String beginPageFlow(){
  |         return "";
  |     }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101809#4101809

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101809



More information about the jboss-user mailing list