📄 a00e933f9730001d1f81bebe3c68a6df
字号:
package com.qrsx.qrsxcrm.form;
import java.util.Set;
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;
/**
* RoleForm
* @author Administrator
*
*/
public class RoleForm extends ActionForm {
private String id; // 主键
private String roleName; // 角色名称
private String description; // 角色描述
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((powerName == null)||(powerName.length()<1)){
errors.add("powerName",new ActionMessage("system.power.powerName"));
}
if((action == null)||(action.length()<1)){
errors.add("action",new ActionMessage("system.power.action"));
}
if((resources == null)||(resources.length()<1)){
errors.add("resources",new ActionMessage("system.power.resources"));
}
return errors;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @return the roleName
*/
public String getRoleName() {
return roleName;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @param roleName the roleName to set
*/
public void setRoleName(String roleName) {
this.roleName = roleName;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -