📄 appactionform.java
字号:
package com.km.util;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
/**
* @author weikj
*/
public class AppActionForm
extends ActionForm {
protected String operAtt;
protected String actionType;
protected PageListData footer;
//另外一个翻页显示的东西
protected PageListData header;
protected List list;
protected List list2;
protected List list3;
protected String[] selectList;
protected String[] selectList1;
protected String message;
//下边着个标志着列表中的选择全部的那个按钮
protected String selectAll;
public AppActionForm() {
super();
operAtt = null;
actionType = "";
footer = new PageListData();
footer.setDataArray(new ArrayList());
header = new PageListData();
header.setDataArray(new ArrayList());
list2 = new ArrayList();
list3 = new ArrayList();
selectList = null;
selectList1 = null;
message = "";
}
/**
* @see org.apache.struts.action.ActionForm#reset(ActionMapping, HttpServletRequest)
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping, request);
operAtt = null;
actionType = "";
footer = new PageListData();
/*Cookie[] cookies = request.getCookies();
if (cookies != null) {
String pageSize = "";
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals("AppActionForm_pageSize")) {
pageSize = cookies[i].getValue();
break;
}
}
try {
footer.setPageSize(Integer.parseInt(pageSize));
}
catch (Exception e) {
e.printStackTrace();
}
}*/
footer.clearDataArray();
list2.clear();
list3.clear();
selectList = null;
selectList1 = null;
message = "";
}
/**
* Returns the footer.
* @return PageListData
*/
public PageListData getFooter() {
return footer;
}
/**
* Returns the list.
* @return ArrayList
*/
public List getList() {
return footer.getDataArray();
}
/**
* Returns the message.
* @return String
*/
public String getMessage() {
return message;
}
/**
* Returns the operAtt.
* @return String
*/
public String getOperAtt() {
return operAtt;
}
/**
* Returns the selectList.
* @return String[]
*/
public String[] getSelectList() {
return selectList;
}
/**
* Returns the selectList1.
* @return String[]
*/
public String[] getSelectList1() {
return selectList1;
}
/**
* Sets the footer.
* @param footer The footer to set
*/
public void setFooter(PageListData footer) {
this.footer = footer;
}
/**
* Sets the list.
* @param list The list to set
*/
public void setList(List list) {
footer.setDataArray(list);
}
/**
* Sets the message.
* @param message The message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* Sets the operAtt.
* @param operAtt The operAtt to set
*/
public void setOperAtt(String operAtt) {
this.operAtt = operAtt;
}
/**
* Sets the selectList.
* @param selectList The selectList to set
*/
public void setSelectList(String[] selectList) {
this.selectList = selectList;
}
/**
* Sets the selectList.
* @param selectList The selectList to set
*/
public void setSelectList1(String[] selectList) {
this.selectList1 = selectList;
}
/**
* Returns the actionType.
* @return String
*/
public String getActionType() {
return actionType;
}
/**
* Sets the actionType.
* @param actionType The actionType to set
*/
public void setActionType(String actionType) {
this.actionType = actionType;
}
/**
* @return
* @deprecated
*/
public List getList2() {
return list2;
}
/**
* @return
* @deprecated
*/
public List getList3() {
return list3;
}
/**
* @param list
* @deprecated
*/
public void setList2(List list) {
list2 = list;
}
/**
* @param list
* @deprecated
*/
public void setList3(List list) {
list3 = list;
}
/**
* 获得选择列表全部信息
* @return selectALL(String)
*/
public String getSelectAll() {
if (selectAll == null) {
selectAll = "";
}
return selectAll.trim();
}
/**
* 更新选择列表全部信息
* @param string(String)
*/
public void setSelectAll(String string) {
if (string == null) {
string = "";
}
selectAll = string.trim();
}
/**
* @return
*/
public PageListData getHeader() {
return header;
}
/**
* @param data
*/
public void setHeader(PageListData data) {
header = data;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -