| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
package org.demosys.web.login; |
| 7 |
|
import javax.servlet.http.HttpServletRequest; |
| 8 |
|
import org.apache.struts.action.ActionForm; |
| 9 |
|
import org.apache.struts.action.ActionMapping; |
| 10 |
|
import org.demosys.web.login.LoginView; |
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
0 |
public class LoginForm extends ActionForm { |
| 15 |
0 |
protected LoginView _view = new LoginView(); |
| 16 |
|
|
| 17 |
|
public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) { |
| 18 |
0 |
setUserName(null); |
| 19 |
0 |
setPassword(null); |
| 20 |
0 |
} |
| 21 |
|
|
| 22 |
|
|
| 23 |
|
public String getUserName() { |
| 24 |
0 |
return _view.getUserName(); |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
public void setUserName(String userName) { |
| 29 |
0 |
_view.setUserName(userName); |
| 30 |
0 |
} |
| 31 |
|
|
| 32 |
|
|
| 33 |
|
public void setPassword(String password) { |
| 34 |
0 |
_view.setPassword(password); |
| 35 |
0 |
} |
| 36 |
|
|
| 37 |
|
|
| 38 |
|
public String getPassword() { |
| 39 |
0 |
return _view.getPassword(); |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
public LoginView toUserView() { |
| 44 |
0 |
return (LoginView)_view.clone(); |
| 45 |
|
} |
| 46 |
|
} |