📄 loginform.java
字号:
package com.cownew.PIS.framework.web;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import com.cownew.PIS.framework.common.services.ACInfo;
import com.cownew.PIS.framework.common.services.ILoginService;
import com.cownew.PIS.framework.web.helper.WebEndServiceLocator;
import com.cownew.ctk.common.StringUtils;
public class LoginForm extends ActionForm
{
private String acName;
private String userName;
private String password;
public String getAcName()
{
return acName;
}
public void setAcName(String acName)
{
this.acName = acName;
}
public String getPassword()
{
return password;
}
public void setPassword(String password)
{
this.password = password;
}
public String getUserName()
{
return userName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
/**
* 得到帐套列表
*/
public ACInfo[] getACInfos()
{
ILoginService loginService = (ILoginService) WebEndServiceLocator
.getService((String)null,ILoginService.class);
return loginService.getAllACInfo();
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ActionErrors errors = new ActionErrors();
if(StringUtils.isEmpty(acName))
{
errors.add("acName",new ActionMessage("请选择帐套",false));
}
if(StringUtils.isEmpty(userName))
{
errors.add("userName",new ActionMessage("用户名不能为空",false));
}
return errors;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -