first commit
This commit is contained in:
133
hrmsEjb/wenrgise/common/webtier/action/AddRowAction.java
Normal file
133
hrmsEjb/wenrgise/common/webtier/action/AddRowAction.java
Normal file
@@ -0,0 +1,133 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseDetailBean;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.DetailSizeValues;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class AddRowAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
if (oBaseForm.getScreenMode().equals("N") || oBaseForm.getHeaderPrimaryKey() == null) {
|
||||
String sHeaderSave = ParamUtil.getHeaderSaveRequired(sFormName);
|
||||
if (null == sHeaderSave)
|
||||
throw new EnrgiseApplicationException("wenrgise.common.saveheaderrecord", "M");
|
||||
}
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
String sHeaderPrimaryKey = oBaseForm.getHeaderPrimaryKey();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 10, oBaseForm.getWorkListId());
|
||||
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
|
||||
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sScreenName));
|
||||
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sScreenName));
|
||||
BaseDetailVO oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
boolean bGetDetailNotPressed = false;
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate((ActionForm)oBaseForm, request);
|
||||
if (null == oBaseDetailVO) {
|
||||
bGetDetailNotPressed = true;
|
||||
oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, false, oUser);
|
||||
long l = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, l));
|
||||
}
|
||||
if (oBaseDetailVO.getCurrentPage() == 0L)
|
||||
oBaseDetailVO.setCurrentPage(1L);
|
||||
long lPageRequested = getPageRequested(oBaseDetailVO, oDetailSizeValues);
|
||||
ArrayList oDetailList = null;
|
||||
if (oBaseDetailVO.getCurrentPage() != lPageRequested) {
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged()) {
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), getDetailArray(oBaseForm));
|
||||
throw new EnrgiseApplicationException("wenrgise.common.savefirst", "M");
|
||||
}
|
||||
oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, lPageRequested, request, oBaseBD, false, oUser);
|
||||
oBaseDetailVO.setRowAdded(oBaseDetailVO.getRowAdded() + 1);
|
||||
oDetailList = oBaseDetailVO.getOThisPageData();
|
||||
} else {
|
||||
if (bGetDetailNotPressed) {
|
||||
oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
} else {
|
||||
oDetailList = getDetailArray(oBaseForm);
|
||||
}
|
||||
oBaseDetailVO.setRowAdded(oBaseDetailVO.getRowAdded() + 1);
|
||||
}
|
||||
BaseDetailBean oBaseDetailBean = getDetailBean(form);
|
||||
oBaseDetailBean.setStatus("N");
|
||||
oDetailList.add(oBaseDetailBean);
|
||||
oBaseForm.setThisPageDetailCount(oBaseForm.getThisPageDetailCount() + 1);
|
||||
oBaseForm.setDetailDataChanged(true);
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord() - oBaseDetailVO.getRowDeleted() + oBaseDetailVO.getRowAdded();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, totDetRecord));
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oDetailList);
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "DETAIL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap) {
|
||||
if (null != oSecMap.get("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
ArrayList oEnableList = new ArrayList();
|
||||
oEnableList.add("butSave");
|
||||
if (null != oSecMap.get("E"))
|
||||
oEnableList.addAll((ArrayList)oSecMap.get("E"));
|
||||
enableDisable(oBaseForm, oEnableList, "E");
|
||||
}
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(14);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oList = getDetailArrayList(oBaseForm, sFormName, sScreenName);
|
||||
oThisPageVO.setODetailList(oList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 14);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
|
||||
private void populateThisPageList(BaseDetailVO oBaseDetailVO, DetailSizeValues oDetailSizeValues) {
|
||||
long lGrandTotalDetailRecord = oBaseDetailVO.getTotalDetailRecord() - oBaseDetailVO.getRowDeleted() + oBaseDetailVO.getRowAdded();
|
||||
int iPage = (int)lGrandTotalDetailRecord % oDetailSizeValues.getDetailRecordPerPage() + 1;
|
||||
int iDetailStartPosition = (iPage - 1) * oDetailSizeValues.getDetailRecordPerPage() + 1;
|
||||
if (iDetailStartPosition < lGrandTotalDetailRecord + 1L);
|
||||
}
|
||||
|
||||
private long getPageRequested(BaseDetailVO oBaseDetailVO, DetailSizeValues oDetailSizeValues) {
|
||||
long lLastRecordNumber = oBaseDetailVO.getTotalDetailRecord() - oBaseDetailVO.getRowDeleted() + oBaseDetailVO.getRowAdded() + 1L;
|
||||
return (lLastRecordNumber % oDetailSizeValues.getDetailRecordPerPage() != 0L) ? (lLastRecordNumber / oDetailSizeValues.getDetailRecordPerPage() + 1L) : (lLastRecordNumber / oDetailSizeValues.getDetailRecordPerPage());
|
||||
}
|
||||
}
|
751
hrmsEjb/wenrgise/common/webtier/action/BaseAction.java
Normal file
751
hrmsEjb/wenrgise/common/webtier/action/BaseAction.java
Normal file
@@ -0,0 +1,751 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Logger;
|
||||
import javax.ejb.CreateException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.Action;
|
||||
import org.apache.struts.action.ActionError;
|
||||
import org.apache.struts.action.ActionErrors;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import org.apache.struts.action.ActionMessage;
|
||||
import org.apache.struts.action.ActionMessages;
|
||||
import org.apache.struts.util.MessageResources;
|
||||
import wenrgise.common.bean.AccessBean;
|
||||
import wenrgise.common.bean.BaseDetailBean;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.bean.EmpInfoBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseMessageKeyException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.utility.DebugHelper;
|
||||
import wenrgise.common.utility.EnrgiseUtil;
|
||||
import wenrgise.common.utility.MessageKey;
|
||||
import wenrgise.common.utility.UserInfo;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.DetailSizeValues;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.common.xml.vo.DetailScreen;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.session.UserSessionHome;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
import wenrgise.ejb.common.utility.ServiceLocator;
|
||||
import wenrgise.hrms.ejb.facade.HrmFacade;
|
||||
import wenrgise.hrms.ejb.facade.HrmFacadeHome;
|
||||
import wenrgise.hrms.ejb.facade.HrmSecondFacade;
|
||||
import wenrgise.hrms.ejb.facade.HrmSecondFacadeHome;
|
||||
import wenrgise.hrms.ejb.facade.HrmThirdFacade;
|
||||
import wenrgise.hrms.ejb.facade.HrmThirdFacadeHome;
|
||||
|
||||
public abstract class BaseAction extends Action {
|
||||
static final Logger log = Logger.getLogger("wenrgise.common.webtier.action.BaseAction");
|
||||
|
||||
MessageResources oMsgRes = null;
|
||||
|
||||
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
ActionErrors oErrorTable = null;
|
||||
ActionMessages oMessageTable = null;
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
this.oMsgRes = getResources(request);
|
||||
try {
|
||||
HttpSession oSes = request.getSession();
|
||||
String sUserId = (String)oSes.getAttribute("userId");
|
||||
System.out.println(String.valueOf("I am in Base Action and UserId: --->").concat(String.valueOf(sUserId)));
|
||||
if (null == sUserId) {
|
||||
System.out.println("I am in Base Action And session expired");
|
||||
System.out.println("Session has expired");
|
||||
return mapping.findForward("failure");
|
||||
}
|
||||
DebugHelper.createUserEjb(request.getSession());
|
||||
return executeImpl(mapping, form, request, response);
|
||||
} catch (ClassNotFoundException oClassEx) {
|
||||
processSystemException(oClassEx, oErrorTable);
|
||||
} catch (InstantiationException oInSt) {
|
||||
processSystemException(oInSt, oErrorTable);
|
||||
} catch (InvocationTargetException oInvTar) {
|
||||
processSystemException(oInvTar, oErrorTable);
|
||||
} catch (IllegalAccessException oIlAcc) {
|
||||
processSystemException(oIlAcc, oErrorTable);
|
||||
} catch (EnrgiseSystemException oSys) {
|
||||
if (oErrorTable == null)
|
||||
oErrorTable = new ActionErrors();
|
||||
String sKey = (null != oSys.getKey()) ? oSys.getKey() : "wenrgise.common.system";
|
||||
ActionError oSysError = new ActionError(sKey);
|
||||
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", oSysError);
|
||||
} catch (EnrgiseApplicationException oApp) {
|
||||
if (oErrorTable == null)
|
||||
oErrorTable = new ActionErrors();
|
||||
if (oMessageTable == null)
|
||||
oMessageTable = new ActionMessages();
|
||||
processException(oErrorTable, oMessageTable, oApp);
|
||||
if (oApp.getList() != null) {
|
||||
Iterator oIt = oApp.getList().iterator();
|
||||
while (oIt.hasNext()) {
|
||||
EnrgiseApplicationException oAppErr = oIt.next();
|
||||
processException(oErrorTable, oMessageTable, oAppErr);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (oErrorTable != null) {
|
||||
System.out.println("Save errors");
|
||||
if (oErrorTable.size() > 0) {
|
||||
saveErrors(request, oErrorTable);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
||||
if (oMessageTable != null)
|
||||
if (oMessageTable.size() > 0) {
|
||||
System.out.println("Save messages");
|
||||
saveMessages(request, oMessageTable);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
||||
return mapping.findForward("failure");
|
||||
}
|
||||
|
||||
private void processSystemException(Exception oEc, ActionErrors oErrorTable) {
|
||||
if (oErrorTable == null)
|
||||
oErrorTable = new ActionErrors();
|
||||
EnrgiseSystemException oSys = new EnrgiseSystemException("wenrgise.common.system", oEc);
|
||||
ActionError oSysError = new ActionError(oSys.getKey());
|
||||
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", oSysError);
|
||||
}
|
||||
|
||||
private void processException(ActionErrors oErrorTable, ActionMessages oMessageTable, EnrgiseApplicationException oApp) {
|
||||
if (oApp.getArguments() == null) {
|
||||
if (oApp.getErrorType().equals("E")) {
|
||||
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey()));
|
||||
} else {
|
||||
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey()));
|
||||
}
|
||||
} else if (oApp instanceof EnrgiseMessageKeyException) {
|
||||
processMessageKeyException((EnrgiseMessageKeyException)oApp, oErrorTable, oMessageTable);
|
||||
} else if (oApp.getErrorType().equals("E")) {
|
||||
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey(), oApp.getArguments().toArray()));
|
||||
} else {
|
||||
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey(), oApp.getArguments().toArray()));
|
||||
}
|
||||
}
|
||||
|
||||
private void processMessageKeyException(EnrgiseMessageKeyException oApp, ActionErrors oErrorTable, ActionMessages oMessageTable) {
|
||||
ArrayList oList = oApp.getArguments();
|
||||
if (null == oList) {
|
||||
if (oApp.getErrorType().equals("E")) {
|
||||
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey()));
|
||||
} else {
|
||||
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey()));
|
||||
}
|
||||
} else {
|
||||
ArrayList oNewList = new ArrayList();
|
||||
Iterator oIt = oList.iterator();
|
||||
while (oIt.hasNext()) {
|
||||
Object obj = oIt.next();
|
||||
if (obj instanceof MessageKey) {
|
||||
MessageKey oMsgKey = (MessageKey)obj;
|
||||
oNewList.add(this.oMsgRes.getMessage(oMsgKey.getKey()));
|
||||
continue;
|
||||
}
|
||||
oNewList.add(obj);
|
||||
}
|
||||
if (oApp.getErrorType().equals("E")) {
|
||||
oErrorTable.add("org.apache.struts.action.GLOBAL_ERROR", new ActionError(oApp.getKey(), oNewList.toArray()));
|
||||
} else {
|
||||
oMessageTable.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(oApp.getKey(), oNewList.toArray()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected BaseQueryVO getQueryVO(ActionForm form) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
String sQueryVO = ParamUtil.getQueryVO(sFormName);
|
||||
BaseQueryVO oBaseQueryVO = (BaseQueryVO)Class.forName(sQueryVO).newInstance();
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
return oBaseQueryVO;
|
||||
}
|
||||
|
||||
protected BaseDetailBean getDetailBean(ActionForm form) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
String sDetailBean = ParamUtil.getDetailBeanName(sFormName, sScreenName);
|
||||
BaseDetailBean oBaseDetailBean = (BaseDetailBean)Class.forName(sDetailBean).newInstance();
|
||||
return oBaseDetailBean;
|
||||
}
|
||||
|
||||
protected BaseBD getHeaderBusinessDelegate(ActionForm form, HttpServletRequest request) throws EnrgiseApplicationException, EnrgiseSystemException, RemoteException, IllegalAccessException, InstantiationException, ClassNotFoundException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
String sBusinessDelegate = ParamUtil.getHeaderBD(sFormName);
|
||||
try {
|
||||
BaseBD oBaseBD = (BaseBD)Class.forName(sBusinessDelegate).newInstance();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
oBaseBD.setModuleName(ParamUtil.getModuleName());
|
||||
oBaseBD.setModuleFacade(oUser.getModuleFacade());
|
||||
oBaseBD.setOUserInfo(oUser.getUserInfo());
|
||||
return oBaseBD;
|
||||
} catch (Exception Ex) {
|
||||
Ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected BaseBD getDetailBusinessDelegate(ActionForm form, HttpServletRequest request) throws EnrgiseApplicationException, EnrgiseSystemException, RemoteException, IllegalAccessException, InstantiationException, ClassNotFoundException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
String sBusinessDelegate = ParamUtil.getDetailBD(sFormName, sScreenName);
|
||||
BaseBD oBaseBD = (BaseBD)Class.forName(sBusinessDelegate).newInstance();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
oBaseBD.setModuleName(ParamUtil.getModuleName());
|
||||
oBaseBD.setModuleFacade(oUser.getModuleFacade());
|
||||
oBaseBD.setOUserInfo(oUser.getUserInfo());
|
||||
return oBaseBD;
|
||||
}
|
||||
|
||||
protected BaseHeaderBean getBaseHeaderBean(String sFormName) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
|
||||
String sBaseHeaderBean = ParamUtil.getHeaderBean(sFormName);
|
||||
try {
|
||||
BaseHeaderBean oBaseHeaderBean = (BaseHeaderBean)Class.forName(sBaseHeaderBean).newInstance();
|
||||
String pseudoHeader = ParamUtil.getPseudoHeaderFlag(sFormName);
|
||||
oBaseHeaderBean.setPseudoHeader(pseudoHeader);
|
||||
return oBaseHeaderBean;
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected ArrayList getDetailArrayList(BaseForm oBaseForm, String sFormName, String sScreenName) throws EnrgiseSystemException, IllegalAccessException, InstantiationException, ClassNotFoundException {
|
||||
String sDetailArrayList = ParamUtil.getDetailArrayName(sFormName, sScreenName);
|
||||
ArrayList oList = (ArrayList)EnrgiseUtil.getFieldValue(oBaseForm, sDetailArrayList);
|
||||
return oList;
|
||||
}
|
||||
|
||||
protected UserSession getUserSessionBean(HttpServletRequest request) throws EnrgiseApplicationException, RemoteException, EnrgiseSystemException {
|
||||
UserInfo oUserInfo = new UserInfo();
|
||||
HttpSession session = request.getSession();
|
||||
UserSession oUser = (UserSession)session.getAttribute(ParamUtil.getSessionBeanName());
|
||||
if (oUser == null)
|
||||
try {
|
||||
String sEmpId = (String)session.getAttribute("empId");
|
||||
String sSiteId = (String)session.getAttribute("siteId");
|
||||
UserSessionHome oUserHome = (UserSessionHome)ServiceLocator.getLocator().getService("HrmUserSession");
|
||||
oUser = oUserHome.create();
|
||||
HrmFacadeHome oHome = (HrmFacadeHome)ServiceLocator.getLocator().getService("HrmFacade");
|
||||
HrmFacade oHrmFacade = oHome.create();
|
||||
oUserInfo = oHrmFacade.getLoginUserInfo(sEmpId, sSiteId);
|
||||
oUser.setUserInfo(oUserInfo);
|
||||
HrmSecondFacadeHome oSecHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
||||
HrmSecondFacade oSecHrmFacade = oSecHome.create();
|
||||
HrmThirdFacadeHome oThirdHome = (HrmThirdFacadeHome)ServiceLocator.getLocator().getService("HrmThirdFacade");
|
||||
HrmThirdFacade oThirdFacade = oThirdHome.create();
|
||||
HashMap oMap = new HashMap();
|
||||
oMap.put(ParamUtil.getModuleName(), oHrmFacade);
|
||||
oMap.put("SecHRMS", oSecHrmFacade);
|
||||
oMap.put("ThirdHRMS", oThirdFacade);
|
||||
oUser.setModuleFacade(oMap);
|
||||
session.setAttribute(ParamUtil.getSessionBeanName(), oUser);
|
||||
EmpInfoBean oEmpInfoBean = new EmpInfoBean();
|
||||
oEmpInfoBean.setModuleId("8");
|
||||
oEmpInfoBean.setEmpId(oUserInfo.getUserTypeId());
|
||||
SecurityBD oSecurityBD = new SecurityBD();
|
||||
ArrayList menu = oSecurityBD.getTreeSet(oEmpInfoBean);
|
||||
HashMap secMap = oSecurityBD.getAccessInfo(oEmpInfoBean);
|
||||
oUser.setAccessInfo(secMap);
|
||||
session.setAttribute("menuList", menu);
|
||||
session.setAttribute("userId", sEmpId);
|
||||
} catch (CreateException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return oUser;
|
||||
}
|
||||
|
||||
protected void clearDetailLists(BaseForm form, ArrayList oDetailList) throws IllegalAccessException, InvocationTargetException {
|
||||
Iterator oIt = oDetailList.iterator();
|
||||
while (oIt.hasNext()) {
|
||||
DetailScreen oDetailScreen = oIt.next();
|
||||
BeanUtils.copyProperty(form, oDetailScreen.get_DetailArrayName(), new ArrayList());
|
||||
}
|
||||
}
|
||||
|
||||
protected ArrayList getDetailArray(BaseForm oBaseForm) throws EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
|
||||
String sFormName = oBaseForm.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
ArrayList oDetailArray = new ArrayList();
|
||||
String sDetailBean = ParamUtil.getDetailBeanName(sFormName, sScreenName);
|
||||
BaseDetailBean oBaseDetailBean = (BaseDetailBean)Class.forName(sDetailBean).newInstance();
|
||||
ArrayList oFieldList = new ArrayList();
|
||||
oFieldList = getFieldList(oFieldList, oBaseDetailBean.getClass());
|
||||
ArrayList oList = (ArrayList)EnrgiseUtil.getFieldValue(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName));
|
||||
for (int iRecord = 0; iRecord < oBaseForm.getThisPageDetailCount(); iRecord++) {
|
||||
if (null == oList)
|
||||
break;
|
||||
oBaseDetailBean = oList.get(iRecord);
|
||||
if (null == oBaseDetailBean)
|
||||
break;
|
||||
Iterator oIt = oFieldList.iterator();
|
||||
while (oIt.hasNext()) {
|
||||
try {
|
||||
Field ob = oIt.next();
|
||||
String sFieldName = ob.getName();
|
||||
if (sFieldName.startsWith("disab"))
|
||||
continue;
|
||||
if (ob.getType().getName().equals("java.lang.String")) {
|
||||
String sValue = BeanUtils.getIndexedProperty(oBaseForm, sFieldName, iRecord);
|
||||
BeanUtils.setProperty(oBaseDetailBean, sFieldName, sValue);
|
||||
}
|
||||
} catch (NoSuchMethodException noSuchMethodException) {}
|
||||
}
|
||||
oDetailArray.add(oBaseDetailBean);
|
||||
}
|
||||
return oDetailArray;
|
||||
}
|
||||
|
||||
private ArrayList getFieldList(ArrayList oFieldList, Class oClass) {
|
||||
if (oClass == null)
|
||||
return oFieldList;
|
||||
Field[] oFields = oClass.getDeclaredFields();
|
||||
EnrgiseUtil.addToList(oFieldList, (Object[])oFields);
|
||||
return getFieldList(oFieldList, oClass.getSuperclass());
|
||||
}
|
||||
|
||||
protected void changeMode(BaseForm oBaseForm, HttpServletRequest request) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
String sFormName = oBaseForm.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseForm, oBaseHeaderBean);
|
||||
clearDetailLists(oBaseForm, ParamUtil.getDetailList(sFormName));
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
oUser.putBaseHeaderVO(sFormName, null);
|
||||
oUser.removeAllDetailVO(sFormName);
|
||||
resetForm(oBaseForm);
|
||||
}
|
||||
|
||||
protected void checkHeaderNavigation(BaseForm oBaseForm, BaseHeaderVO oBaseHeaderVO) throws EnrgiseApplicationException {
|
||||
long lPositionRequested = Long.parseLong(oBaseForm.getUserPositionRequested());
|
||||
if (null != oBaseHeaderVO) {
|
||||
if (lPositionRequested <= 0L || lPositionRequested > oBaseHeaderVO.getTotalCount())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.headerNavigation", "E");
|
||||
oBaseForm.setPositionRequested(lPositionRequested);
|
||||
} else {
|
||||
throw new EnrgiseApplicationException("wenrgise.common.headerNavigation", "E");
|
||||
}
|
||||
}
|
||||
|
||||
private void resetForm(BaseForm oBaseForm) {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
oBaseForm.setPositionRequested(0L);
|
||||
oBaseForm.setTotalCount(0L);
|
||||
oBaseForm.setTotalDetailRecord(0L);
|
||||
oBaseForm.setTotalHeaderRecord(0L);
|
||||
oBaseForm.setHeaderPrimaryKey(null);
|
||||
oBaseForm.setUserPageRequested(null);
|
||||
oBaseForm.setDetailId(null);
|
||||
oBaseForm.setStatus(null);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setChecked(null);
|
||||
oBaseForm.setUserPositionRequested(null);
|
||||
oBaseForm.setTotalCount(0L);
|
||||
oBaseForm.setNewPageRequested(null);
|
||||
oBaseForm.setItemChecked(null);
|
||||
oBaseForm.setLovKey(null);
|
||||
oBaseForm.setTxtSearchFields(null);
|
||||
oBaseForm.setTxtDisplayFields(null);
|
||||
oBaseForm.setTxtIndex(null);
|
||||
oBaseForm.setThisPageDetailCount(0);
|
||||
oBaseForm.setTotalPageCount(0L);
|
||||
oBaseForm.setHeaderStatus(null);
|
||||
oBaseForm.setButtonClicked(null);
|
||||
oBaseForm.setButtonName(null);
|
||||
oBaseForm.setDetailStartPage(0);
|
||||
}
|
||||
|
||||
protected void checkDetailNavigation(BaseForm oBaseForm, BaseDetailVO oBaseDetailVO) throws EnrgiseApplicationException {
|
||||
boolean flag = false;
|
||||
long lPageRequested = 0L;
|
||||
if (EnrgiseUtil.checkString(oBaseForm.getUserPageRequested())) {
|
||||
lPageRequested = Long.parseLong(oBaseForm.getUserPageRequested());
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
if (null != oBaseDetailVO) {
|
||||
if (flag == false) {
|
||||
if (lPageRequested <= 0L || oBaseDetailVO.getTotalDetailRecord() <= oBaseDetailVO.getRecordsPerPage() * (lPageRequested - 1L))
|
||||
throw new EnrgiseApplicationException("wenrgise.common.detailNavigation", "E");
|
||||
oBaseForm.setPageRequested(lPageRequested);
|
||||
} else if (oBaseForm.getDetailList() != null) {
|
||||
oBaseForm.setPageRequested(1L);
|
||||
} else {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
}
|
||||
} else {
|
||||
throw new EnrgiseApplicationException("wenrgise.common.detailNavigation", "E");
|
||||
}
|
||||
}
|
||||
|
||||
protected void enableDisable(BaseForm oBaseForm, ArrayList arylstFields, String enableFlag) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
if (null != arylstFields) {
|
||||
Iterator iterFields = arylstFields.iterator();
|
||||
while (iterFields.hasNext()) {
|
||||
StringBuffer sField = new StringBuffer(iterFields.next());
|
||||
String sProperty = String.valueOf("setDisab").concat(String.valueOf(sField.toString()));
|
||||
try {
|
||||
Class[] oCls = { Class.forName("java.lang.String") };
|
||||
Method oMethod = oBaseForm.getClass().getMethod(sProperty, oCls);
|
||||
String sFlag = enableFlag.equals("D") ? "true" : "false";
|
||||
Object[] obj = { sFlag };
|
||||
oMethod.invoke(oBaseForm, obj);
|
||||
} catch (NoSuchMethodException nse) {
|
||||
System.out.println(String.valueOf(String.valueOf(String.valueOf("The problem is ").concat(String.valueOf(nse.getMessage()))).concat(String.valueOf(" "))).concat(String.valueOf(sProperty)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void enableAll(BaseForm oBaseForm) {
|
||||
try {
|
||||
ArrayList arylstDisFields = new ArrayList();
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields = getFieldList(arylstFields, oBaseForm.getClass());
|
||||
Iterator iterFields = arylstFields.iterator();
|
||||
while (iterFields.hasNext()) {
|
||||
Field oField = iterFields.next();
|
||||
if (oField.getName().startsWith("disab"))
|
||||
arylstDisFields.add(oField.getName().replaceFirst("disab", ""));
|
||||
}
|
||||
enableDisable(oBaseForm, arylstDisFields, "E");
|
||||
} catch (Exception exception) {}
|
||||
}
|
||||
|
||||
protected void disableAll(BaseForm oBaseForm) {
|
||||
try {
|
||||
ArrayList arylstDisFields = new ArrayList();
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields = getFieldList(arylstFields, oBaseForm.getClass());
|
||||
Iterator iterFields = arylstFields.iterator();
|
||||
while (iterFields.hasNext()) {
|
||||
Field oField = iterFields.next();
|
||||
if (oField.getName().startsWith("disab"))
|
||||
arylstDisFields.add(oField.getName().replaceFirst("disab", ""));
|
||||
}
|
||||
enableDisable(oBaseForm, arylstDisFields, "D");
|
||||
} catch (Exception exception) {}
|
||||
}
|
||||
|
||||
protected ArrayList queryClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butQuery");
|
||||
arylstFields.add("butSave");
|
||||
arylstFields.add("butDelete");
|
||||
arylstFields.add("butPrint");
|
||||
arylstFields.add("butGetDetail");
|
||||
arylstFields.add("butAddRow");
|
||||
arylstFields.add("butDelRow");
|
||||
arylstFields.add("butNextHeader");
|
||||
arylstFields.add("butPrevHeader");
|
||||
arylstFields.add("newPositionRequested");
|
||||
arylstFields.add("butJumpHeader");
|
||||
arylstFields.add("butNextDetail");
|
||||
arylstFields.add("butPrevDetail");
|
||||
arylstFields.add("newPageRequested");
|
||||
arylstFields.add("butJumpDetail");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList insertClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butInsert");
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butDelete");
|
||||
arylstFields.add("butPrint");
|
||||
arylstFields.add("butGetDetail");
|
||||
arylstFields.add("butAddRow");
|
||||
arylstFields.add("butDelRow");
|
||||
arylstFields.add("butNextHeader");
|
||||
arylstFields.add("butPrevHeader");
|
||||
arylstFields.add("newPositionRequested");
|
||||
arylstFields.add("butJumpHeader");
|
||||
arylstFields.add("butNextDetail");
|
||||
arylstFields.add("butPrevDetail");
|
||||
arylstFields.add("newPageRequested");
|
||||
arylstFields.add("butJumpDetail");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList executeClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butAddRow");
|
||||
arylstFields.add("butDelRow");
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butNextDetail");
|
||||
arylstFields.add("butPrevDetail");
|
||||
arylstFields.add("butJumpDetail");
|
||||
arylstFields.add("newPageRequested");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList deleteClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butQuery");
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butDelete");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList saveClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butGetDetail");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList refreshClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList nextHeaderClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butAddRow");
|
||||
arylstFields.add("butDelRow");
|
||||
arylstFields.add("butNextDetail");
|
||||
arylstFields.add("butPrevDetail");
|
||||
arylstFields.add("butJumpDetail");
|
||||
arylstFields.add("newPageRequested");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList prevHeaderClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butExecute");
|
||||
arylstFields.add("butAddRow");
|
||||
arylstFields.add("butDelRow");
|
||||
arylstFields.add("butNextDetail");
|
||||
arylstFields.add("butPrevDetail");
|
||||
arylstFields.add("butJumpDetail");
|
||||
arylstFields.add("newPageRequested");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList getDetailClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butGetDetail");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList addRowClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butGetDetail");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected ArrayList delRowClicked() {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
arylstFields.add("butDelRow");
|
||||
arylstFields.add("butGetDetail");
|
||||
return arylstFields;
|
||||
}
|
||||
|
||||
protected void controlHeaderNavigation(BaseForm oBaseForm) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
ArrayList arylstFields = new ArrayList();
|
||||
long lTotalRecord = oBaseForm.getTotalCount();
|
||||
long lRecordNum = oBaseForm.getPositionRequested();
|
||||
if (lTotalRecord == 0L || lTotalRecord == 1L) {
|
||||
arylstFields.add("butNextHeader");
|
||||
arylstFields.add("butPrevHeader");
|
||||
arylstFields.add("newPositionRequested");
|
||||
arylstFields.add("butJumpHeader");
|
||||
} else {
|
||||
if (lRecordNum == lTotalRecord)
|
||||
arylstFields.add("butNextHeader");
|
||||
if (lRecordNum == 1L)
|
||||
arylstFields.add("butPrevHeader");
|
||||
}
|
||||
enableDisable(oBaseForm, arylstFields, "D");
|
||||
}
|
||||
|
||||
protected void controlDetailNavigation(BaseForm oBaseForm) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
ArrayList oEnableList = new ArrayList();
|
||||
ArrayList oDisableList = new ArrayList();
|
||||
long lTotalRecord = oBaseForm.getTotalPageCount();
|
||||
long lRecordNum = oBaseForm.getPageRequested();
|
||||
if (lTotalRecord == 0L || lTotalRecord == 1L) {
|
||||
oDisableList.add("butNextDetail");
|
||||
oDisableList.add("butPrevDetail");
|
||||
oDisableList.add("newPageRequested");
|
||||
oDisableList.add("butJumpDetail");
|
||||
} else if (lRecordNum == lTotalRecord) {
|
||||
oEnableList.add("butPrevDetail");
|
||||
oEnableList.add("newPageRequested");
|
||||
oEnableList.add("butJumpDetail");
|
||||
oDisableList.add("butNextDetail");
|
||||
} else if (lRecordNum == 1L) {
|
||||
oEnableList.add("newPageRequested");
|
||||
oEnableList.add("butJumpDetail");
|
||||
oEnableList.add("butNextDetail");
|
||||
oDisableList.add("butPrevDetail");
|
||||
} else {
|
||||
oEnableList.add("newPageRequested");
|
||||
oEnableList.add("butJumpDetail");
|
||||
oEnableList.add("butNextDetail");
|
||||
oEnableList.add("butPrevDetail");
|
||||
}
|
||||
enableDisable(oBaseForm, oEnableList, "E");
|
||||
enableDisable(oBaseForm, oDisableList, "D");
|
||||
}
|
||||
|
||||
protected void resetDetailPageData(BaseForm oBaseForm) {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
oBaseForm.setTotalPageCount(0L);
|
||||
}
|
||||
|
||||
protected long calculateTotalDetailPage(String sFormName, String sScreenName, long lTotDetRecord) {
|
||||
long totRecPerPage = ParamUtil.getDetailRecordPerPage(sFormName, sScreenName);
|
||||
if (lTotDetRecord % totRecPerPage != 0L)
|
||||
return lTotDetRecord / totRecPerPage + 1L;
|
||||
return lTotDetRecord / totRecPerPage;
|
||||
}
|
||||
|
||||
protected BaseDetailVO getDetailData(BaseForm oBaseForm, String sFormName, String sScreenName, long lPageRequested, HttpServletRequest request, BaseBD oBaseBD, boolean bForce, UserSession oUser) throws RemoteException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException, EnrgiseApplicationException, EnrgiseSystemException {
|
||||
String sHeaderPrimaryKey = oBaseForm.getHeaderPrimaryKey();
|
||||
String pseudoHeader = ParamUtil.getPseudoHeaderFlag(sFormName);
|
||||
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
|
||||
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sScreenName));
|
||||
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sScreenName));
|
||||
BaseDetailVO oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (!EnrgiseUtil.checkString(pseudoHeader)) {
|
||||
oBaseDetailVO = oBaseBD.getDetailRecord(sFormName, sScreenName, sHeaderPrimaryKey, lPageRequested, oDetailSizeValues, oBaseDetailVO, bForce, oUser);
|
||||
} else {
|
||||
BaseQueryVO oBaseQueryVO = getQueryVO((ActionForm)oBaseForm);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, oBaseForm);
|
||||
oBaseDetailVO = oBaseBD.getDetailRecord(sFormName, sScreenName, oBaseQueryVO, lPageRequested, oDetailSizeValues, oBaseDetailVO, bForce, oUser);
|
||||
}
|
||||
if (oBaseDetailVO.getOThisPageData() != null)
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
oBaseForm.setPageRequested(lPageRequested);
|
||||
oBaseForm.setThisPageDetailCount((null != oBaseDetailVO.getOThisPageData()) ? oBaseDetailVO.getOThisPageData().size() : 0);
|
||||
BeanUtils.copyProperties(oBaseForm, oBaseDetailVO);
|
||||
oBaseForm.setNewPageRequested(null);
|
||||
oBaseForm.setPageRequested(lPageRequested);
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
return oBaseDetailVO;
|
||||
}
|
||||
|
||||
protected void onLoad(ActionForm form, HttpServletRequest request, int actionName) throws RemoteException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException, EnrgiseApplicationException, EnrgiseSystemException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseDetailVO oBaseDetailVO = new BaseDetailVO();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setActionName(actionName);
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = getDetailArrayList(oBaseForm, sFormName, sScreenName);
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
oBaseBD.onLoadAction(oThisPageVO);
|
||||
if (oThisPageVO != null)
|
||||
if (oThisPageVO.getOHeaderBean() != null)
|
||||
BeanUtils.copyProperties(form, oThisPageVO.getOHeaderBean());
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkAccessInfo(UserSession oUserSession, String sComponentName, String sScreenMode, String sButtonName, int iActionName, String sWorkListId) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
||||
HashMap oSecMap = oUserSession.getAccessInfo();
|
||||
AccessBean objBean = (AccessBean)oSecMap.get(sComponentName);
|
||||
if (!EnrgiseUtil.checkString(sWorkListId)) {
|
||||
if (iActionName == 10 || iActionName == 14 || iActionName == 23) {
|
||||
String s = null;
|
||||
System.out.println("I am in AccessInfo");
|
||||
System.out.println("Insert Flag: ");
|
||||
try {
|
||||
if (!objBean.getInsertFlag().equalsIgnoreCase("Y")) {
|
||||
System.out.println("after Insert Flag: ");
|
||||
ArrayList oParam = new ArrayList();
|
||||
MessageKey oMessageKey = new MessageKey("right.for.insert");
|
||||
oParam.add(oMessageKey);
|
||||
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (iActionName == 8)
|
||||
if (sScreenMode.equalsIgnoreCase("N")) {
|
||||
if (!objBean.getInsertFlag().equalsIgnoreCase("Y")) {
|
||||
ArrayList oParam = new ArrayList();
|
||||
MessageKey oMessageKey = new MessageKey("right.for.insert");
|
||||
oParam.add(oMessageKey);
|
||||
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
|
||||
}
|
||||
} else if (sScreenMode.equalsIgnoreCase("U")) {
|
||||
if (!objBean.getUpdateFlag().equalsIgnoreCase("Y")) {
|
||||
ArrayList oParam = new ArrayList();
|
||||
MessageKey oMessageKey = new MessageKey("right.for.update");
|
||||
oParam.add(oMessageKey);
|
||||
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
|
||||
}
|
||||
}
|
||||
if (iActionName == 17 || iActionName == 15)
|
||||
if (!objBean.getDeleteFlag().equalsIgnoreCase("Y")) {
|
||||
ArrayList oParam = new ArrayList();
|
||||
MessageKey oMessageKey = new MessageKey("right.for.delete");
|
||||
oParam.add(oMessageKey);
|
||||
throw new EnrgiseMessageKeyException("wenrgise.authorisation.error", oParam, "M");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected String getComponentName(String sFormName) {
|
||||
String sModFormName = sFormName.replace('.', ',');
|
||||
int index = 0;
|
||||
char g = ',';
|
||||
char[] arrayModeFormName = sModFormName.toCharArray();
|
||||
int k;
|
||||
for (k = arrayModeFormName.length - 1; k > 0; k--) {
|
||||
if (arrayModeFormName[k] == g) {
|
||||
index = k + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String sComponentName = sModFormName.substring(index, sModFormName.length());
|
||||
return sComponentName;
|
||||
}
|
||||
|
||||
public abstract ActionForward executeImpl(ActionMapping paramActionMapping, ActionForm paramActionForm, HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException;
|
||||
}
|
22
hrmsEjb/wenrgise/common/webtier/action/CancelAction.java
Normal file
22
hrmsEjb/wenrgise/common/webtier/action/CancelAction.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
|
||||
public class CancelAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
return mapping.getInputForward();
|
||||
}
|
||||
}
|
64
hrmsEjb/wenrgise/common/webtier/action/DecrAction.java
Normal file
64
hrmsEjb/wenrgise/common/webtier/action/DecrAction.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseDetailBean;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class DecrAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseDetailVO oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
int count = 0;
|
||||
ArrayList oDetailArray = getDetailArray(oBaseForm);
|
||||
try {
|
||||
String[] itemChecked = oBaseForm.getItemChecked();
|
||||
String[] sStatuss = oBaseForm.getStatus();
|
||||
String[] sStartFields = BeanUtils.getArrayProperty(oBaseForm, "startField");
|
||||
for (int i = 0; i < itemChecked.length; i++) {
|
||||
if (itemChecked[i].equals("Y")) {
|
||||
count++;
|
||||
String sStartField = sStartFields[i];
|
||||
if (i < itemChecked.length - 1) {
|
||||
for (int j = i + 1; j < itemChecked.length; j++) {
|
||||
String sStatus = sStatuss[j];
|
||||
if (!sStatus.equals("D")) {
|
||||
BaseDetailBean oBaseDetailBean = oDetailArray.get(j);
|
||||
oBaseDetailBean.setStatus("U");
|
||||
BeanUtils.setProperty(oBaseDetailBean, "startField", sStartField);
|
||||
oDetailArray.set(j, oBaseDetailBean);
|
||||
break;
|
||||
}
|
||||
}
|
||||
((BaseDetailBean)oDetailArray.get(i)).setStatus("D");
|
||||
((BaseDetailBean)oDetailArray.get(i)).setItemChecked("N");
|
||||
oBaseDetailVO.setRowDeleted(oBaseDetailVO.getRowDeleted() + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (NoSuchMethodException noSuchMethodException) {}
|
||||
if (count > 0)
|
||||
oBaseForm.setDetailDataChanged(true);
|
||||
oBaseDetailVO.setOThisPageData(oDetailArray);
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
onLoad(form, request, 16);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
108
hrmsEjb/wenrgise/common/webtier/action/DeleteAction.java
Normal file
108
hrmsEjb/wenrgise/common/webtier/action/DeleteAction.java
Normal file
@@ -0,0 +1,108 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class DeleteAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 17, oBaseForm.getWorkListId());
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
ArrayList oDetailBeanArray = null;
|
||||
BaseDetailVO oBaseDetailVO = null;
|
||||
BaseHeaderVO oBaseHeaderVO = null;
|
||||
Timestamp oHeaderPicked = null;
|
||||
Timestamp oDetailPicked = null;
|
||||
oBaseHeaderVO = oUser.getBaseHeaderVO(sFormName);
|
||||
if (oBaseHeaderVO != null) {
|
||||
oHeaderPicked = oBaseHeaderVO.getOWhenPicked();
|
||||
oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
if (oBaseHeaderBean == null)
|
||||
oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
}
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
oBaseForm.setHeaderDataChanged(true);
|
||||
String sHeaderPrimaryKey = oBaseBD.saveRecord(oBaseHeaderBean, oHeaderPicked, oBaseForm.getScreenName(), "D", oBaseForm.isHeaderDataChanged(), oDetailBeanArray, oBaseForm.isDetailDataChanged(), oDetailPicked);
|
||||
BaseQueryVO oBaseQueryVO = null;
|
||||
if (oBaseForm.getPositionRequested() > 0L && sHeaderPrimaryKey == null) {
|
||||
if (oBaseForm.getTotalHeaderRecord() == 1L) {
|
||||
oBaseForm.setScreenMode("Q");
|
||||
changeMode(oBaseForm, request);
|
||||
} else {
|
||||
oBaseHeaderVO = oBaseBD.getNextHeaderRecord(oBaseQueryVO, oBaseForm.getPositionRequested(), sFormName, true, oUser);
|
||||
int iRelativePosition = (int)(oBaseHeaderVO.getPositionRequested() - oBaseHeaderVO.getHeaderStartPosition() + 1L);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(iRelativePosition));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
oBaseForm.setTotalHeaderRecord(((int)oBaseForm.getTotalHeaderRecord() - 1));
|
||||
oBaseHeaderVO.setTotalCount(oBaseHeaderVO.getTotalCount() - 1L);
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
oBaseForm.setScreenMode("U");
|
||||
}
|
||||
} else {
|
||||
oBaseQueryVO = getQueryVO(form);
|
||||
oBaseQueryVO.setHeaderPrimaryKey(sHeaderPrimaryKey);
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
oBaseHeaderVO = oBaseBD.getHeaderRecord(oBaseQueryVO, sFormName, oUser);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(1));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
oBaseForm.setScreenMode("U");
|
||||
}
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, saveClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "ALL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(17);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
onLoad(form, request, 17);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
89
hrmsEjb/wenrgise/common/webtier/action/DeleteRowAction.java
Normal file
89
hrmsEjb/wenrgise/common/webtier/action/DeleteRowAction.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseDetailBean;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.utility.UserInfo;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class DeleteRowAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
String[] itemChecked = oBaseForm.getItemChecked();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 17, oBaseForm.getWorkListId());
|
||||
BaseDetailVO oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
BaseDetailBean oBaseDetailBean = null;
|
||||
boolean newRecordFlag = false;
|
||||
UserInfo oUserInfo = oUser.getUserInfo();
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
ArrayList oDetailArray = getDetailArray(oBaseForm);
|
||||
int count = 0;
|
||||
for (int i = 0; i < itemChecked.length; i++) {
|
||||
if (itemChecked[i].equals("Y"))
|
||||
if (!((BaseDetailBean)oDetailArray.get(i)).getStatus().equals("N")) {
|
||||
count++;
|
||||
((BaseDetailBean)oDetailArray.get(i)).setStatus("D");
|
||||
oBaseDetailVO.setRowDeleted(oBaseDetailVO.getRowDeleted() + 1);
|
||||
} else {
|
||||
oDetailArray.remove(i);
|
||||
oBaseDetailVO.setRowDeleted(oBaseDetailVO.getRowAdded() - 1);
|
||||
newRecordFlag = true;
|
||||
}
|
||||
}
|
||||
if (count == 0 && newRecordFlag == false)
|
||||
throw new EnrgiseApplicationException("wenrgise.common.norowselected");
|
||||
if (count > 0)
|
||||
oBaseForm.setDetailDataChanged(true);
|
||||
oBaseDetailVO.setOThisPageData(oDetailArray);
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oThisList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oThisList);
|
||||
}
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 15);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
33
hrmsEjb/wenrgise/common/webtier/action/ExitAction.java
Normal file
33
hrmsEjb/wenrgise/common/webtier/action/ExitAction.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
|
||||
public class ExitAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
System.out.println("I am in Exit Action ---->");
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormBean = mapping.getAttribute();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sFormName = form.getClass().getName();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
if (oUser != null)
|
||||
oUser.removeAllIfExists(sFormName, sScreenName);
|
||||
HttpSession session = request.getSession();
|
||||
session.removeAttribute(sFormBean);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
131
hrmsEjb/wenrgise/common/webtier/action/GetButtonAction.java
Normal file
131
hrmsEjb/wenrgise/common/webtier/action/GetButtonAction.java
Normal file
@@ -0,0 +1,131 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.DetailSizeValues;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetButtonAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
if (oBaseForm.getScreenMode().equals("N"))
|
||||
throw new EnrgiseApplicationException("wenrgise.common.saveheaderrecord", "M");
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
ArrayList oDetailBeanArray = null;
|
||||
BaseDetailVO oBaseDetailVO = null;
|
||||
BaseHeaderVO oBaseHeaderVO = null;
|
||||
Timestamp oHeaderPicked = null;
|
||||
Timestamp oDetailPicked = null;
|
||||
oBaseHeaderVO = oUser.getBaseHeaderVO(sFormName);
|
||||
if (oBaseHeaderVO != null) {
|
||||
oHeaderPicked = oBaseHeaderVO.getOWhenPicked();
|
||||
oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
}
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (oBaseDetailVO != null) {
|
||||
oDetailPicked = oBaseDetailVO.getOWhenPicked();
|
||||
oDetailBeanArray = getDetailArray(oBaseForm);
|
||||
}
|
||||
String sHeaderPrimaryKey = oBaseBD.submit(oBaseForm.getButtonName(), oBaseHeaderBean, oHeaderPicked, oBaseForm.getScreenName(), oBaseForm.getScreenMode(), oBaseForm.isHeaderDataChanged(), oDetailBeanArray, oBaseForm.isDetailDataChanged(), oDetailPicked);
|
||||
oBaseForm.setHeaderPrimaryKey(sHeaderPrimaryKey);
|
||||
BaseQueryVO oBaseQueryVO = null;
|
||||
oBaseQueryVO = getQueryVO(form);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
oBaseQueryVO.setHeaderPrimaryKey(sHeaderPrimaryKey);
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
oBaseHeaderVO = oBaseBD.getHeaderRecord(oBaseQueryVO, sFormName, oUser);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(1));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
oUser.putBaseHeaderVO(sFormName, oBaseHeaderVO);
|
||||
if (null != oBaseDetailVO) {
|
||||
if (oBaseDetailVO.getTotalDetailRecord() + oBaseDetailVO.getRowAdded() - oBaseDetailVO.getRowDeleted() > 0L) {
|
||||
oBaseDetailVO.setRowDeleted(0);
|
||||
oBaseDetailVO.setRowAdded(0);
|
||||
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
|
||||
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sScreenName));
|
||||
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sScreenName));
|
||||
oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, true, oUser);
|
||||
oBaseForm.setPageRequested(1L);
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, totDetRecord));
|
||||
if (oBaseDetailVO.getOThisPageData() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oBaseDetailVO.getOThisPageData().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
} else {
|
||||
oBaseForm.setThisPageDetailCount(0);
|
||||
}
|
||||
checkDetailNavigation(oBaseForm, oUser.getBaseDetailVO(sFormName, sScreenName));
|
||||
BeanUtils.copyProperties(oBaseForm, oBaseDetailVO);
|
||||
}
|
||||
oBaseDetailVO.setRowAdded(0);
|
||||
oBaseDetailVO.setRowDeleted(0);
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
}
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
oBaseForm.setScreenMode("U");
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, saveClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "ALL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(18);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 18);
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datasaved", "M");
|
||||
}
|
||||
}
|
89
hrmsEjb/wenrgise/common/webtier/action/GetDetailAction.java
Normal file
89
hrmsEjb/wenrgise/common/webtier/action/GetDetailAction.java
Normal file
@@ -0,0 +1,89 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetDetailAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
if (oBaseForm.getScreenMode().equals("N"))
|
||||
throw new EnrgiseApplicationException("wenrgise.common.saveheaderrecord", "M");
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sFormName = form.getClass().getName();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseDetailVO oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, true, oUser);
|
||||
if (oBaseDetailVO.getOThisPageData() != null)
|
||||
oBaseForm.setScreenMode("U");
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, totDetRecord));
|
||||
ArrayList oClicked = getDetailClicked();
|
||||
ArrayList oEnableList = new ArrayList();
|
||||
oEnableList.add("butAddRow");
|
||||
if (totDetRecord == 0L) {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
oClicked.add("butDelRow");
|
||||
} else {
|
||||
oEnableList.add("butDelRow");
|
||||
oEnableList.add("butSave");
|
||||
}
|
||||
enableDisable(oBaseForm, oClicked, "D");
|
||||
enableDisable(oBaseForm, oEnableList, "E");
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "DETAIL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap) {
|
||||
if (null != oSecMap.get("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
if (null != oSecMap.get("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("E"), "E");
|
||||
}
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(6);
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 6);
|
||||
oUser.setForwardedPage(sFormName, "success");
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetDetailPageAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sFormName = form.getClass().getName();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
checkDetailNavigation(oBaseForm, oUser.getBaseDetailVO(sFormName, sScreenName));
|
||||
BaseDetailVO oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, oBaseForm.getPageRequested(), request, oBaseBD, false, oUser);
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, oBaseForm.getScreenName(), totDetRecord));
|
||||
ArrayList oClicked = getDetailClicked();
|
||||
ArrayList oEnableList = new ArrayList();
|
||||
oEnableList.add("butAddRow");
|
||||
if (totDetRecord == 0L) {
|
||||
oClicked.add("butDelRow");
|
||||
} else {
|
||||
oEnableList.add("butDelRow");
|
||||
oEnableList.add("butSave");
|
||||
}
|
||||
enableDisable(oBaseForm, oClicked, "D");
|
||||
enableDisable(oBaseForm, oEnableList, "E");
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "DETAIL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap) {
|
||||
if (null != oSecMap.get("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
if (null != oSecMap.get("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("E"), "E");
|
||||
}
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(6);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 6);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
68
hrmsEjb/wenrgise/common/webtier/action/GetHeaderAction.java
Normal file
68
hrmsEjb/wenrgise/common/webtier/action/GetHeaderAction.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetHeaderAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sFormName = form.getClass().getName();
|
||||
BaseQueryVO oBaseQueryVO = getQueryVO(form);
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseHeaderVO oBaseHeaderVO = oBaseBD.getHeaderRecord(oBaseQueryVO, sFormName, oUser);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(1));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
resetDetailPageData(oBaseForm);
|
||||
if (oBaseHeaderVO.getTotalCount() > 0L)
|
||||
oBaseForm.setScreenMode("U");
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, executeClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "HEADER", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(1);
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
onLoad(form, request, 1);
|
||||
oUser.setForwardedPage(sFormName, "success");
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
105
hrmsEjb/wenrgise/common/webtier/action/GetInsertAction.java
Normal file
105
hrmsEjb/wenrgise/common/webtier/action/GetInsertAction.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.utility.UserInfo;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.DetailSizeValues;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetInsertAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseQueryVO oBaseQueryVO = getQueryVO(form);
|
||||
System.out.println(String.valueOf("Class name ").concat(String.valueOf(oBaseQueryVO.getClass().getName())));
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 8, oBaseForm.getWorkListId());
|
||||
UserInfo oUserInfo = oUser.getUserInfo();
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
System.out.println(oBaseForm.getHeaderPrimaryKey());
|
||||
String sNewPK = oBaseBD.getInsertDataImpl(oBaseQueryVO);
|
||||
oBaseQueryVO = getQueryVO(form);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
oBaseQueryVO.setHeaderPrimaryKey(sNewPK);
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
oUser = getUserSessionBean(request);
|
||||
BaseHeaderVO oBaseHeaderVO = oBaseBD.getHeaderRecord(oBaseQueryVO, sFormName, oUser);
|
||||
oUser.putBaseHeaderVO(sFormName, oBaseHeaderVO);
|
||||
oUser.putBaseQueryVO(sFormName, oBaseQueryVO);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(1));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
|
||||
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sScreenName));
|
||||
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sScreenName));
|
||||
System.out.println(oBaseHeaderVO.getHeaderRecord(1).getHeaderPrimaryKey());
|
||||
BaseDetailVO oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, true, oUser);
|
||||
oBaseForm.setDetailStartPage(1);
|
||||
oBaseDetailVO.setCurrentPage(1L);
|
||||
oBaseForm.setThisPageDetailCount((null != oBaseDetailVO.getOThisPageData()) ? oBaseDetailVO.getOThisPageData().size() : 0);
|
||||
if (oBaseDetailVO.getOThisPageData() != null)
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
BeanUtils.copyProperties(oBaseForm, oBaseDetailVO);
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
oBaseForm.setScreenMode("U");
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, nextHeaderClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
enableDisable(oBaseForm, getDetailClicked(), "D");
|
||||
controlDetailNavigation(oBaseForm);
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "ALL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(23);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 23);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
@@ -0,0 +1,71 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetNextHeaderAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, EnrgiseApplicationException, EnrgiseSystemException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
checkHeaderNavigation(oBaseForm, oUser.getBaseHeaderVO(sFormName));
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
BaseQueryVO oBaseQueryVO = oUser.getBaseQueryVO(sFormName);
|
||||
BaseHeaderVO oBaseHeaderVO = oBaseBD.getNextHeaderRecord(oBaseQueryVO, oBaseForm.getPositionRequested(), sFormName, false, oUser);
|
||||
int iRelativePosition = (int)(oBaseHeaderVO.getPositionRequested() - oBaseHeaderVO.getHeaderStartPosition() + 1L);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(iRelativePosition));
|
||||
oBaseForm.setTotalDetailRecord(0L);
|
||||
clearDetailLists(oBaseForm, ParamUtil.getDetailList(sFormName));
|
||||
oUser.removeAllDetailVO(sFormName);
|
||||
oBaseForm.setDetailStartPage(0);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
oBaseForm.setNewPositionRequested(null);
|
||||
resetDetailPageData(oBaseForm);
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, nextHeaderClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "HEADER", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(1);
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
onLoad(form, request, 1);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
104
hrmsEjb/wenrgise/common/webtier/action/GetRefreshTabAction.java
Normal file
104
hrmsEjb/wenrgise/common/webtier/action/GetRefreshTabAction.java
Normal file
@@ -0,0 +1,104 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.DetailSizeValues;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetRefreshTabAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged()) {
|
||||
if (oBaseForm.isDetailDataChanged()) {
|
||||
ArrayList arrayList = getDetailArray(oBaseForm);
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), arrayList);
|
||||
}
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
}
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sForwardedPage = oBaseForm.getForwardedPage();
|
||||
BaseDetailVO oPresentBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (null != oPresentBaseDetailVO)
|
||||
oPresentBaseDetailVO.setCurrentPage(oBaseForm.getPageRequested());
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oPresentBaseDetailVO);
|
||||
BaseDetailVO oNextBaseDetailVO = oUser.getBaseDetailVO(sFormName, sForwardedPage);
|
||||
if (oPresentBaseDetailVO != null) {
|
||||
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
|
||||
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sForwardedPage));
|
||||
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sForwardedPage));
|
||||
oNextBaseDetailVO = getDetailData(oBaseForm, sFormName, sForwardedPage, 1L, request, oBaseBD, true, oUser);
|
||||
if (oNextBaseDetailVO.getOThisPageData() != null)
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sForwardedPage), oNextBaseDetailVO.getOThisPageData());
|
||||
oBaseForm.setPageRequested(oNextBaseDetailVO.getCurrentPage());
|
||||
oBaseForm.setThisPageDetailCount((null != oNextBaseDetailVO.getOThisPageData()) ? oNextBaseDetailVO.getOThisPageData().size() : 0);
|
||||
long lTotDetRecord = oNextBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, oBaseForm.getForwardedPage(), lTotDetRecord));
|
||||
oUser.putBaseDetailVO(sFormName, sForwardedPage, oNextBaseDetailVO);
|
||||
ArrayList oClicked = getDetailClicked();
|
||||
if (lTotDetRecord == 0L) {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
oClicked.add("butDelRow");
|
||||
}
|
||||
enableDisable(oBaseForm, oClicked, "D");
|
||||
controlDetailNavigation(oBaseForm);
|
||||
}
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(sForwardedPage).concat(String.valueOf(".jsp")), "DETAIL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap) {
|
||||
if (null != oSecMap.get("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
if (null != oSecMap.get("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("E"), "E");
|
||||
}
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
ArrayList oDetailList = null;
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
if (oNextBaseDetailVO != null) {
|
||||
oDetailList = (oNextBaseDetailVO.getOThisPageData() != null) ? oNextBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getForwardedPage());
|
||||
oThisPageVO.setActionName(22);
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
if (sForwardedPage != null)
|
||||
oBaseForm.setScreenName(sForwardedPage);
|
||||
onLoad(form, request, 22);
|
||||
if (sForwardedPage != null)
|
||||
return mapping.findForward(sForwardedPage);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
139
hrmsEjb/wenrgise/common/webtier/action/GetTabAction.java
Normal file
139
hrmsEjb/wenrgise/common/webtier/action/GetTabAction.java
Normal file
@@ -0,0 +1,139 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class GetTabAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged()) {
|
||||
if (oBaseForm.isDetailDataChanged()) {
|
||||
ArrayList oDetailList = getDetailArray(oBaseForm);
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oDetailList);
|
||||
}
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
}
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sForwardedPage = oBaseForm.getForwardedPage();
|
||||
BaseDetailVO oPresentBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (null != oPresentBaseDetailVO)
|
||||
oPresentBaseDetailVO.setCurrentPage(oBaseForm.getPageRequested());
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oPresentBaseDetailVO);
|
||||
BaseDetailVO oNextBaseDetailVO = oUser.getBaseDetailVO(sFormName, sForwardedPage);
|
||||
if (null != oNextBaseDetailVO) {
|
||||
oBaseForm.setPageRequested(oNextBaseDetailVO.getCurrentPage());
|
||||
oBaseForm.setThisPageDetailCount((null != oNextBaseDetailVO.getOThisPageData()) ? oNextBaseDetailVO.getOThisPageData().size() : 0);
|
||||
long lTotDetRecord = oNextBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, oBaseForm.getForwardedPage(), lTotDetRecord));
|
||||
ArrayList oClicked = getDetailClicked();
|
||||
if (lTotDetRecord == 0L) {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
oClicked.add("butDelRow");
|
||||
}
|
||||
enableDisable(oBaseForm, oClicked, "D");
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(sForwardedPage).concat(String.valueOf(".jsp")), "DETAIL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap) {
|
||||
if (null != oSecMap.get("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
if (null != oSecMap.get("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("E"), "E");
|
||||
}
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(sForwardedPage);
|
||||
oThisPageVO.setActionName(22);
|
||||
ArrayList oDetailList = (oNextBaseDetailVO.getOThisPageData() != null) ? oNextBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sForwardedPage), oThisPageVO.getODetailList());
|
||||
}
|
||||
} else {
|
||||
if (oBaseForm.getHeaderPrimaryKey() == null)
|
||||
throw new EnrgiseApplicationException("wenrgise.common.bringheaderdata", "M");
|
||||
if (oPresentBaseDetailVO != null) {
|
||||
oNextBaseDetailVO = getDetailData(oBaseForm, sFormName, sForwardedPage, 1L, request, oBaseBD, true, oUser);
|
||||
long lTotDetRecord = oNextBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, oBaseForm.getForwardedPage(), lTotDetRecord));
|
||||
oUser.putBaseDetailVO(sFormName, sForwardedPage, oNextBaseDetailVO);
|
||||
ArrayList oClicked = getDetailClicked();
|
||||
if (lTotDetRecord == 0L) {
|
||||
oBaseForm.setPageRequested(0L);
|
||||
oClicked.add("butDelRow");
|
||||
}
|
||||
enableDisable(oBaseForm, oClicked, "D");
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(sForwardedPage).concat(String.valueOf(".jsp")), "DETAIL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap) {
|
||||
if (null != oSecMap.get("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
if (null != oSecMap.get("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("E"), "E");
|
||||
}
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
ArrayList oDetailList = null;
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
oDetailList = (oNextBaseDetailVO.getOThisPageData() != null) ? oNextBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getForwardedPage());
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sForwardedPage), oThisPageVO.getODetailList());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sForwardedPage != null)
|
||||
oBaseForm.setScreenName(sForwardedPage);
|
||||
onLoad(form, request, 22);
|
||||
if (sForwardedPage != null) {
|
||||
oUser.setForwardedPage(sFormName, sForwardedPage);
|
||||
return mapping.findForward(sForwardedPage);
|
||||
}
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
138
hrmsEjb/wenrgise/common/webtier/action/LOVAction.java
Normal file
138
hrmsEjb/wenrgise/common/webtier/action/LOVAction.java
Normal file
@@ -0,0 +1,138 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.StringTokenizer;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.businessdelegate.LOVBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.utility.EnrgiseUtil;
|
||||
import wenrgise.common.utility.UserInfo;
|
||||
import wenrgise.common.vo.LovQueryVO;
|
||||
import wenrgise.common.vo.LovVO;
|
||||
import wenrgise.common.webtier.form.BaseLOVForm;
|
||||
import wenrgise.common.xml.vo.LOVInfo;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.LOVManager;
|
||||
|
||||
public class LOVAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseLOVForm oBaseLOVForm = (BaseLOVForm)form;
|
||||
System.out.println(oBaseLOVForm.getLovKey());
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
LOVInfo oLOVInfo = LOVManager.getInstance().getCachedObject(oBaseLOVForm.getLovKey());
|
||||
if (oLOVInfo != null)
|
||||
if (EnrgiseUtil.checkString(oLOVInfo.getRecursiveFlag())) {
|
||||
if (oLOVInfo.getRecursiveFlag().equalsIgnoreCase("Y")) {
|
||||
processRecursiveLov(oBaseLOVForm, oLOVInfo, mapping);
|
||||
oBaseLOVForm.setRecursiveFlag("Y");
|
||||
} else {
|
||||
processSimpleLov(oBaseLOVForm, oLOVInfo, mapping, oUser.getUserInfo());
|
||||
oBaseLOVForm.setRecursiveFlag("N");
|
||||
}
|
||||
} else {
|
||||
processSimpleLov(oBaseLOVForm, oLOVInfo, mapping, oUser.getUserInfo());
|
||||
oBaseLOVForm.setRecursiveFlag("N");
|
||||
}
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
|
||||
private ActionForward processSimpleLov(BaseLOVForm oBaseLOVForm, LOVInfo oLOVInfo, ActionMapping mapping, UserInfo oUserInfo) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
if (oBaseLOVForm.getTxtHidAction().equals("FirstTime")) {
|
||||
oBaseLOVForm.setTxtHidTotCols(-1);
|
||||
oBaseLOVForm.setTxtHidSubmitFirst("true");
|
||||
oBaseLOVForm.setLevel(0);
|
||||
oBaseLOVForm.setFinalLevel(0);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
if (oBaseLOVForm.getTxtHidAction().equals("SearchRecords")) {
|
||||
LOVBD oLOVBD = new LOVBD();
|
||||
LovVO oLovVO = new LovVO();
|
||||
LovQueryVO oLOVQueryVO = new LovQueryVO();
|
||||
StringTokenizer stParameters = new StringTokenizer(oBaseLOVForm.getQueryParam(), ",");
|
||||
while (stParameters.hasMoreTokens()) {
|
||||
String[] sKeyValuePair = stParameters.nextToken().split("=");
|
||||
oLOVQueryVO.setProperty(sKeyValuePair[0], sKeyValuePair[1]);
|
||||
}
|
||||
oLOVQueryVO.setProperty("LoginSiteId", oUserInfo.getSiteId());
|
||||
oLOVQueryVO.setProperty("ListSiteId", String.valueOf(String.valueOf("(").concat(String.valueOf(oUserInfo.getSiteId()))).concat(String.valueOf(")")));
|
||||
oLOVQueryVO.setSearchField1(oBaseLOVForm.getSearchField1());
|
||||
oLOVQueryVO.setSearchField2(oBaseLOVForm.getSearchField2());
|
||||
oLOVQueryVO.setSearchField2(oBaseLOVForm.getSearchField2());
|
||||
oLOVQueryVO.setSearchField3(oBaseLOVForm.getSearchField3());
|
||||
oLOVQueryVO.setSearchField4(oBaseLOVForm.getSearchField4());
|
||||
oLOVQueryVO.setSearchField5(oBaseLOVForm.getSearchField5());
|
||||
oLOVQueryVO.setSearchField6(oBaseLOVForm.getSearchField6());
|
||||
oLOVQueryVO.setLevel(0);
|
||||
oBaseLOVForm.setFinalLevel(-1);
|
||||
oLovVO = oLOVBD.getLOVData(oLOVInfo, oLOVQueryVO);
|
||||
if (oBaseLOVForm.getLevel() == 0)
|
||||
oBaseLOVForm.setLevel(oLovVO.getFinalLevel());
|
||||
if (oLovVO.getDetailList().size() > 0) {
|
||||
BeanUtils.copyProperties(oBaseLOVForm, oLovVO);
|
||||
oBaseLOVForm.setTxtHidTotRows(oLovVO.getDetailList().size());
|
||||
oBaseLOVForm.setTxtHidTotCols(oLovVO.getHeaderList().size());
|
||||
} else {
|
||||
oBaseLOVForm.setTxtHidTotRows(0);
|
||||
oBaseLOVForm.setTxtHidTotCols(-1);
|
||||
}
|
||||
oBaseLOVForm.setTxtHidSubmitFirst("false");
|
||||
oBaseLOVForm.setInsertFlag(oLOVInfo.getInsertFlag());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private ActionForward processRecursiveLov(BaseLOVForm oBaseLOVForm, LOVInfo oLOVInfo, ActionMapping mapping) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
if (oBaseLOVForm.getTxtHidAction().equals("FirstTime")) {
|
||||
oBaseLOVForm.setTxtHidTotCols(-1);
|
||||
oBaseLOVForm.setTxtHidSubmitFirst("true");
|
||||
oBaseLOVForm.setLevel(-999);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
if (oBaseLOVForm.getTxtHidAction().equals("SearchRecords")) {
|
||||
LOVBD oLOVBD = new LOVBD();
|
||||
LovVO oLovVO = new LovVO();
|
||||
LovQueryVO oLOVQueryVO = new LovQueryVO();
|
||||
StringTokenizer stParameters = new StringTokenizer(oBaseLOVForm.getQueryParam(), ",");
|
||||
while (stParameters.hasMoreTokens()) {
|
||||
String[] sKeyValuePair = stParameters.nextToken().split("=");
|
||||
oLOVQueryVO.setProperty(sKeyValuePair[0], sKeyValuePair[1]);
|
||||
}
|
||||
oLOVQueryVO.setSearchField1(oBaseLOVForm.getSearchField1());
|
||||
oLOVQueryVO.setSearchField2(oBaseLOVForm.getSearchField2());
|
||||
oLOVQueryVO.setLevel(oBaseLOVForm.getLevel());
|
||||
int iLevel = oBaseLOVForm.getLevel();
|
||||
int iFinalLevel = oBaseLOVForm.getFinalLevel();
|
||||
int iInitialLevel = oBaseLOVForm.getInitialLevel();
|
||||
oLOVQueryVO.setFinalLevel(iFinalLevel);
|
||||
oLovVO = oLOVBD.getLOVData(oLOVInfo, oLOVQueryVO);
|
||||
if (oLovVO.getDetailList().size() > 0) {
|
||||
BeanUtils.copyProperties(oBaseLOVForm, oLovVO);
|
||||
oBaseLOVForm.setTxtHidTotRows(oLovVO.getDetailList().size());
|
||||
oBaseLOVForm.setTxtHidTotCols(oLovVO.getHeaderList().size());
|
||||
} else {
|
||||
oBaseLOVForm.setTxtHidTotRows(0);
|
||||
oBaseLOVForm.setTxtHidTotCols(-1);
|
||||
}
|
||||
oBaseLOVForm.setTxtHidSubmitFirst("false");
|
||||
if (oLOVQueryVO.getLevel() == -999) {
|
||||
oBaseLOVForm.setLevel(oLovVO.getInitialLevel());
|
||||
oBaseLOVForm.setFinalLevel(oLovVO.getFinalLevel());
|
||||
oBaseLOVForm.setInitialLevel(oLovVO.getInitialLevel());
|
||||
} else {
|
||||
oBaseLOVForm.setLevel(iLevel);
|
||||
oBaseLOVForm.setFinalLevel(iFinalLevel);
|
||||
oBaseLOVForm.setInitialLevel(iInitialLevel);
|
||||
}
|
||||
oBaseLOVForm.setInsertFlag(oLOVInfo.getInsertFlag());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
43
hrmsEjb/wenrgise/common/webtier/action/LogOutAction.java
Normal file
43
hrmsEjb/wenrgise/common/webtier/action/LogOutAction.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
|
||||
public class LogOutAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
Cookie cookieEmpId = null;
|
||||
Cookie cookieSiteId = null;
|
||||
String target = "success";
|
||||
String sEmpId = null;
|
||||
String sSiteId = null;
|
||||
cookieEmpId = new Cookie("EmpId", sEmpId);
|
||||
cookieSiteId = new Cookie("SiteId", sSiteId);
|
||||
setCookieAttributes(cookieEmpId, false);
|
||||
setCookieAttributes(cookieSiteId, false);
|
||||
response.addCookie(cookieEmpId);
|
||||
response.addCookie(cookieSiteId);
|
||||
System.out.println("The cookie has been created");
|
||||
HttpSession session = request.getSession();
|
||||
session.setAttribute("status", "LOGOUT");
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
|
||||
private void setCookieAttributes(Cookie c, boolean bValid) {
|
||||
c.setPath("/");
|
||||
if (bValid) {
|
||||
c.setMaxAge(1800);
|
||||
} else {
|
||||
c.setMaxAge(0);
|
||||
}
|
||||
}
|
||||
}
|
66
hrmsEjb/wenrgise/common/webtier/action/NewModeAction.java
Normal file
66
hrmsEjb/wenrgise/common/webtier/action/NewModeAction.java
Normal file
@@ -0,0 +1,66 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class NewModeAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 10, oBaseForm.getWorkListId());
|
||||
changeMode(oBaseForm, request);
|
||||
oBaseForm.setQueried(false);
|
||||
oBaseForm.setScreenMode("N");
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, insertClicked(), "D");
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
HashMap oMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "HEADER", oBaseForm.getScreenMode(), "N");
|
||||
if (null != oMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(10);
|
||||
Map oBDMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oBDMap != null) {
|
||||
if (oBDMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oBDMap.get("D"), "D");
|
||||
if (oBDMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oBDMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 10);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
82
hrmsEjb/wenrgise/common/webtier/action/QueryModeAction.java
Normal file
82
hrmsEjb/wenrgise/common/webtier/action/QueryModeAction.java
Normal file
@@ -0,0 +1,82 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class QueryModeAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
if (oBaseForm.isHeaderDataChanged() || oBaseForm.isDetailDataChanged())
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datashouldbesaved", "M");
|
||||
changeMode(oBaseForm, request);
|
||||
oBaseForm.setQueried(true);
|
||||
oBaseForm.setScreenMode("Q");
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate((ActionForm)oBaseForm, request);
|
||||
setComboValues(oBaseBD.getComboDetails(), request.getSession());
|
||||
setComboValues(oBaseBD.getDetailComboDetails(), request.getSession());
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, queryClicked(), "D");
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
HashMap oMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "HEADER", oBaseForm.getScreenMode(), null);
|
||||
if (null != oMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(10);
|
||||
Map oBDMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oBDMap != null) {
|
||||
if (oBDMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oBDMap.get("D"), "D");
|
||||
if (oBDMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oBDMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 10);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
|
||||
private void setComboValues(HashMap oComboMap, HttpSession session) {
|
||||
if (null == oComboMap)
|
||||
return;
|
||||
if (oComboMap.size() <= 0)
|
||||
return;
|
||||
Set oKeySet = oComboMap.keySet();
|
||||
Iterator oIt = oKeySet.iterator();
|
||||
while (oIt.hasNext()) {
|
||||
String sKey = oIt.next();
|
||||
session.setAttribute(sKey, oComboMap.get(sKey));
|
||||
}
|
||||
oKeySet.clear();
|
||||
oComboMap.clear();
|
||||
}
|
||||
}
|
111
hrmsEjb/wenrgise/common/webtier/action/RefreshAction.java
Normal file
111
hrmsEjb/wenrgise/common/webtier/action/RefreshAction.java
Normal file
@@ -0,0 +1,111 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class RefreshAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
BaseDetailVO oBaseDetailVO = null;
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
String sScreenMode = oBaseForm.getScreenMode();
|
||||
oBaseForm.setUserPositionRequested(null);
|
||||
oBaseForm.setUserPageRequested(null);
|
||||
if (sScreenMode.equals("N") || sScreenMode.equals("Q")) {
|
||||
changeMode(oBaseForm, request);
|
||||
oBaseForm.setScreenMode(sScreenMode);
|
||||
} else {
|
||||
BaseQueryVO oBaseQueryVO = null;
|
||||
BaseHeaderVO oBaseHeaderVO = null;
|
||||
if (oBaseForm.isQueried()) {
|
||||
oBaseQueryVO = oUser.getBaseQueryVO(sFormName);
|
||||
if (oBaseQueryVO != null) {
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
oBaseQueryVO.setHeaderPrimaryKey(null);
|
||||
oBaseHeaderVO = oBaseBD.getNextHeaderRecord(oBaseQueryVO, oBaseForm.getPositionRequested(), sFormName, false, oUser);
|
||||
int iRelativePosition = (int)(oBaseHeaderVO.getPositionRequested() - oBaseHeaderVO.getHeaderStartPosition() + 1L);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(iRelativePosition));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
}
|
||||
} else {
|
||||
oBaseQueryVO = getQueryVO(form);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
if (oBaseForm.getHeaderPrimaryKey() != null) {
|
||||
oBaseQueryVO.setHeaderPrimaryKey(oBaseForm.getHeaderPrimaryKey());
|
||||
oBaseHeaderVO = oBaseBD.getHeaderRecord(oBaseQueryVO, sFormName, oUser);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(1));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
}
|
||||
}
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (null != oBaseDetailVO) {
|
||||
oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, false, oUser);
|
||||
if (oBaseDetailVO.getOThisPageData() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oBaseDetailVO.getOThisPageData().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
} else {
|
||||
oBaseForm.setThisPageDetailCount(0);
|
||||
}
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, totDetRecord));
|
||||
controlDetailNavigation(oBaseForm);
|
||||
}
|
||||
}
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "ALL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(19);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 19);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
132
hrmsEjb/wenrgise/common/webtier/action/SaveAction.java
Normal file
132
hrmsEjb/wenrgise/common/webtier/action/SaveAction.java
Normal file
@@ -0,0 +1,132 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class SaveAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
String wlId = oBaseForm.getWorkListId();
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 8, oBaseForm.getWorkListId());
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
ArrayList oDetailBeanArray = null;
|
||||
BaseDetailVO oBaseDetailVO = null;
|
||||
BaseHeaderVO oBaseHeaderVO = null;
|
||||
Timestamp oHeaderPicked = null;
|
||||
Timestamp oDetailPicked = null;
|
||||
if (!oBaseForm.isDetailDataChanged() && !oBaseForm.isHeaderDataChanged())
|
||||
return mapping.findForward("success");
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
if (oBaseForm.getScreenMode().equals("N")) {
|
||||
oHeaderPicked = null;
|
||||
} else {
|
||||
if (oBaseForm.isHeaderDataChanged()) {
|
||||
oBaseHeaderVO = oUser.getBaseHeaderVO(sFormName);
|
||||
if (oBaseHeaderVO != null) {
|
||||
oHeaderPicked = oBaseHeaderVO.getOWhenPicked();
|
||||
oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
}
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
}
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (oBaseDetailVO != null)
|
||||
oDetailPicked = oBaseDetailVO.getOWhenPicked();
|
||||
if (oBaseForm.isDetailDataChanged())
|
||||
oDetailBeanArray = getDetailArray(oBaseForm);
|
||||
}
|
||||
String sHeaderPrimaryKey = oBaseBD.saveRecord(oBaseHeaderBean, oHeaderPicked, oBaseForm.getScreenName(), oBaseForm.getScreenMode(), oBaseForm.isHeaderDataChanged(), oDetailBeanArray, oBaseForm.isDetailDataChanged(), oDetailPicked);
|
||||
oBaseForm.setHeaderDataChanged(false);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
oBaseForm.setHeaderPrimaryKey(sHeaderPrimaryKey);
|
||||
BaseQueryVO oBaseQueryVO = getQueryVO(form);
|
||||
BeanUtils.copyProperties(oBaseQueryVO, form);
|
||||
oBaseQueryVO.setHeaderPrimaryKey(sHeaderPrimaryKey);
|
||||
oBaseQueryVO.setMaxHeaderSize(ParamUtil.getHeaderSize(sFormName));
|
||||
oBaseHeaderVO = oBaseBD.getHeaderRecord(oBaseQueryVO, sFormName, oUser);
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO.getHeaderRecord(1));
|
||||
BeanUtils.copyProperties(form, oBaseHeaderVO);
|
||||
oUser.putBaseHeaderVO(sFormName, oBaseHeaderVO);
|
||||
if (!oBaseForm.getScreenMode().equals("N"))
|
||||
if (null != oBaseDetailVO) {
|
||||
if (oBaseDetailVO.getTotalDetailRecord() + oBaseDetailVO.getRowAdded() - oBaseDetailVO.getRowDeleted() >= 0L) {
|
||||
oBaseDetailVO.setRowDeleted(0);
|
||||
oBaseDetailVO.setRowAdded(0);
|
||||
oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, true, oUser);
|
||||
oBaseForm.setPageRequested(1L);
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, totDetRecord));
|
||||
if (oBaseDetailVO.getOThisPageData() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oBaseDetailVO.getOThisPageData().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
} else {
|
||||
oBaseForm.setThisPageDetailCount(0);
|
||||
}
|
||||
checkDetailNavigation(oBaseForm, oUser.getBaseDetailVO(sFormName, sScreenName));
|
||||
BeanUtils.copyProperties(oBaseForm, oBaseDetailVO);
|
||||
}
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
}
|
||||
oBaseForm.setScreenMode("U");
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, saveClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "ALL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(8);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 8);
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datasaved", "M");
|
||||
}
|
||||
}
|
110
hrmsEjb/wenrgise/common/webtier/action/SaveDetailAction.java
Normal file
110
hrmsEjb/wenrgise/common/webtier/action/SaveDetailAction.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.businessdelegate.SecurityBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
import wenrgise.common.vo.DetailSizeValues;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
import wenrgise.ejb.common.utility.ParamUtil;
|
||||
|
||||
public class SaveDetailAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseBD oBaseBD = getDetailBusinessDelegate(form, request);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
String sComponentName = getComponentName(sFormName);
|
||||
checkAccessInfo(oUser, sComponentName, oBaseForm.getScreenMode(), "", 8, oBaseForm.getWorkListId());
|
||||
ArrayList oDetailBeanArray = null;
|
||||
BaseDetailVO oBaseDetailVO = null;
|
||||
Timestamp oDetailPicked = null;
|
||||
if (!oBaseForm.isDetailDataChanged())
|
||||
return mapping.findForward("success");
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, sScreenName);
|
||||
if (oBaseDetailVO != null)
|
||||
oDetailPicked = oBaseDetailVO.getOWhenPicked();
|
||||
oDetailBeanArray = getDetailArray(oBaseForm);
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
String sHeaderPrimaryKey = oBaseBD.saveRecord(oBaseHeaderBean, null, oBaseForm.getScreenName(), oBaseForm.getScreenMode(), false, oDetailBeanArray, true, oDetailPicked);
|
||||
oBaseForm.setDetailDataChanged(false);
|
||||
if (null != oBaseDetailVO) {
|
||||
oBaseDetailVO.setRowDeleted(0);
|
||||
oBaseDetailVO.setRowAdded(0);
|
||||
}
|
||||
BaseQueryVO oBaseQueryVO = null;
|
||||
DetailSizeValues oDetailSizeValues = new DetailSizeValues();
|
||||
oDetailSizeValues.setDetailRecordPerPage(ParamUtil.getDetailRecordPerPage(sFormName, sScreenName));
|
||||
oDetailSizeValues.setMaxPages(ParamUtil.getMaxDetailPages(sFormName, sScreenName));
|
||||
oBaseDetailVO = getDetailData(oBaseForm, sFormName, sScreenName, 1L, request, oBaseBD, true, oUser);
|
||||
oBaseForm.setPageRequested(1L);
|
||||
oBaseDetailVO.setRowAdded(0);
|
||||
oBaseDetailVO.setRowDeleted(0);
|
||||
if (oBaseDetailVO.getOThisPageData() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oBaseDetailVO.getOThisPageData().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oBaseDetailVO.getOThisPageData());
|
||||
} else {
|
||||
oBaseForm.setThisPageDetailCount(0);
|
||||
}
|
||||
if (oBaseDetailVO != null) {
|
||||
long totDetRecord = oBaseDetailVO.getTotalDetailRecord();
|
||||
oBaseForm.setTotalPageCount(calculateTotalDetailPage(sFormName, sScreenName, totDetRecord));
|
||||
}
|
||||
BeanUtils.copyProperties(oBaseForm, oBaseDetailVO);
|
||||
oUser.putBaseDetailVO(sFormName, sScreenName, oBaseDetailVO);
|
||||
oBaseForm.setScreenMode("U");
|
||||
enableAll(oBaseForm);
|
||||
enableDisable(oBaseForm, saveClicked(), "D");
|
||||
controlHeaderNavigation(oBaseForm);
|
||||
controlDetailNavigation(oBaseForm);
|
||||
SecurityBD oSecBD = new SecurityBD();
|
||||
Map oSecMap = oSecBD.getDisabledFields(String.valueOf(oBaseForm.getScreenName()).concat(String.valueOf(".jsp")), "ALL", oBaseForm.getScreenMode(), oBaseForm.getHeaderStatus());
|
||||
if (null != oSecMap)
|
||||
enableDisable(oBaseForm, (ArrayList)oSecMap.get("D"), "D");
|
||||
BaseHeaderBean oThisBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oThisBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oThisBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(8);
|
||||
oBaseDetailVO = null;
|
||||
oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = (oBaseDetailVO.getOThisPageData() != null) ? oBaseDetailVO.getOThisPageData() : new ArrayList();
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
if (oThisPageVO.getODetailList() != null) {
|
||||
oBaseForm.setThisPageDetailCount(oThisPageVO.getODetailList().size());
|
||||
BeanUtils.setProperty(oBaseForm, ParamUtil.getDetailArrayName(sFormName, sScreenName), oThisPageVO.getODetailList());
|
||||
}
|
||||
onLoad(form, request, 8);
|
||||
throw new EnrgiseApplicationException("wenrgise.common.datasaved", "M");
|
||||
}
|
||||
}
|
52
hrmsEjb/wenrgise/common/webtier/action/ValidateAction.java
Normal file
52
hrmsEjb/wenrgise/common/webtier/action/ValidateAction.java
Normal file
@@ -0,0 +1,52 @@
|
||||
package wenrgise.common.webtier.action;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionForward;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
import wenrgise.common.bean.BaseHeaderBean;
|
||||
import wenrgise.common.businessdelegate.BaseBD;
|
||||
import wenrgise.common.exception.EnrgiseApplicationException;
|
||||
import wenrgise.common.exception.EnrgiseSystemException;
|
||||
import wenrgise.common.vo.BaseDetailVO;
|
||||
import wenrgise.common.vo.ThisPageVO;
|
||||
import wenrgise.common.webtier.form.BaseForm;
|
||||
import wenrgise.ejb.common.session.UserSession;
|
||||
|
||||
public class ValidateAction extends BaseAction {
|
||||
public ActionForward executeImpl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws EnrgiseApplicationException, EnrgiseSystemException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException, ServletException, IOException {
|
||||
BaseForm oBaseForm = (BaseForm)form;
|
||||
String sFormName = form.getClass().getName();
|
||||
String sScreenName = oBaseForm.getScreenName();
|
||||
BaseBD oBaseBD = getHeaderBusinessDelegate(form, request);
|
||||
BaseHeaderBean oBaseHeaderBean = getBaseHeaderBean(sFormName);
|
||||
BeanUtils.copyProperties(oBaseHeaderBean, form);
|
||||
ThisPageVO oThisPageVO = new ThisPageVO();
|
||||
oThisPageVO.setOHeaderBean(oBaseHeaderBean);
|
||||
oThisPageVO.setScreenMode(oBaseForm.getScreenMode());
|
||||
oThisPageVO.setScreenName(oBaseForm.getScreenName());
|
||||
oThisPageVO.setActionName(21);
|
||||
UserSession oUser = getUserSessionBean(request);
|
||||
BaseDetailVO oBaseDetailVO = oUser.getBaseDetailVO(sFormName, oBaseForm.getScreenName());
|
||||
if (null != oBaseDetailVO) {
|
||||
ArrayList oDetailList = getDetailArray(oBaseForm);
|
||||
oThisPageVO.setODetailList(oDetailList);
|
||||
}
|
||||
Map oMap = oBaseBD.getDisabledFields(oThisPageVO);
|
||||
if (oMap != null) {
|
||||
if (oMap.containsKey("D"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("D"), "D");
|
||||
if (oMap.containsKey("E"))
|
||||
enableDisable(oBaseForm, (ArrayList)oMap.get("E"), "E");
|
||||
}
|
||||
onLoad(form, request, 21);
|
||||
return mapping.findForward("success");
|
||||
}
|
||||
}
|
767
hrmsEjb/wenrgise/common/webtier/form/BaseForm.java
Normal file
767
hrmsEjb/wenrgise/common/webtier/form/BaseForm.java
Normal file
@@ -0,0 +1,767 @@
|
||||
package wenrgise.common.webtier.form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.apache.struts.action.ActionErrors;
|
||||
import org.apache.struts.action.ActionForm;
|
||||
import org.apache.struts.action.ActionMapping;
|
||||
|
||||
public class BaseForm extends ActionForm {
|
||||
private long totalHeaderRecord = 0L;
|
||||
|
||||
private long totalDetailRecord = 0L;
|
||||
|
||||
private ArrayList detailList = null;
|
||||
|
||||
private String headerPrimaryKey = null;
|
||||
|
||||
private long pageRequested = 0L;
|
||||
|
||||
private String userPageRequested = null;
|
||||
|
||||
private String[] detailId = null;
|
||||
|
||||
private String[] status = null;
|
||||
|
||||
private String screenName = null;
|
||||
|
||||
private boolean headerDataChanged = false;
|
||||
|
||||
private boolean detailDataChanged = false;
|
||||
|
||||
private int detailStartPage = 0;
|
||||
|
||||
private String screenMode = "Q";
|
||||
|
||||
private String forwardedPage = null;
|
||||
|
||||
private boolean[] checked = null;
|
||||
|
||||
private long positionRequested = 0L;
|
||||
|
||||
private String userPositionRequested = null;
|
||||
|
||||
private long totalCount = 0L;
|
||||
|
||||
private String newPositionRequested = null;
|
||||
|
||||
private String[] itemChecked = null;
|
||||
|
||||
private String newPageRequested = null;
|
||||
|
||||
private String lovKey;
|
||||
|
||||
private String txtSearchFields;
|
||||
|
||||
private String txtDisplayFields;
|
||||
|
||||
private String txtIndex;
|
||||
|
||||
private int thisPageDetailCount = 0;
|
||||
|
||||
private boolean queried = true;
|
||||
|
||||
String butQuery;
|
||||
|
||||
String butInsert;
|
||||
|
||||
String disabbutInsert;
|
||||
|
||||
String butExecute;
|
||||
|
||||
String disabbutExecute;
|
||||
|
||||
String butSave;
|
||||
|
||||
String disabbutSave;
|
||||
|
||||
String butDelete;
|
||||
|
||||
String disabbutDelete;
|
||||
|
||||
String butRefresh;
|
||||
|
||||
String disabbutRefresh;
|
||||
|
||||
String butHelp;
|
||||
|
||||
String disabbutHelp;
|
||||
|
||||
String butPrint;
|
||||
|
||||
String disabbutPrint;
|
||||
|
||||
String butNextHeader;
|
||||
|
||||
String disabbutNextHeader;
|
||||
|
||||
String butPrevHeader;
|
||||
|
||||
String disabbutPrevHeader;
|
||||
|
||||
String butGetDetail;
|
||||
|
||||
String disabbutGetDetail;
|
||||
|
||||
String butJumpHeader;
|
||||
|
||||
String disabbutJumpHeader;
|
||||
|
||||
String butJumpDetail;
|
||||
|
||||
String disabbutJumpDetail;
|
||||
|
||||
private String butExit;
|
||||
|
||||
private String disabbutExit;
|
||||
|
||||
private String disabheaderStatus;
|
||||
|
||||
private String disabbutQuery;
|
||||
|
||||
private String butNextDetail;
|
||||
|
||||
String butPrevDetail;
|
||||
|
||||
private String disabbutPrevDetail;
|
||||
|
||||
private String disabbutNextDetail;
|
||||
|
||||
private String disabnewPageRequested;
|
||||
|
||||
private String disabnewPositionRequested;
|
||||
|
||||
private String butAddRow;
|
||||
|
||||
private String butDelRow;
|
||||
|
||||
private String disabbutAddRow;
|
||||
|
||||
private String disabbutDelRow;
|
||||
|
||||
private long totalPageCount;
|
||||
|
||||
private String headerStatus;
|
||||
|
||||
private String buttonClicked;
|
||||
|
||||
private String buttonName;
|
||||
|
||||
protected String firstLoad;
|
||||
|
||||
private String confirmKey;
|
||||
|
||||
private String buttonKeys;
|
||||
|
||||
private String workListId;
|
||||
|
||||
private String hidWorkListId;
|
||||
|
||||
public void reset(ActionMapping mapping, HttpServletRequest request) {
|
||||
super.reset(mapping, request);
|
||||
}
|
||||
|
||||
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
|
||||
return super.validate(mapping, request);
|
||||
}
|
||||
|
||||
public long getTotalDetailRecord() {
|
||||
return this.totalDetailRecord;
|
||||
}
|
||||
|
||||
public void setTotalDetailRecord(long newTotalDetailRecord) {
|
||||
this.totalDetailRecord = newTotalDetailRecord;
|
||||
}
|
||||
|
||||
public long getTotalHeaderRecord() {
|
||||
return this.totalHeaderRecord;
|
||||
}
|
||||
|
||||
public void setTotalHeaderRecord(long newTotalHeaderRecord) {
|
||||
this.totalHeaderRecord = newTotalHeaderRecord;
|
||||
}
|
||||
|
||||
public ArrayList getDetailList() {
|
||||
return this.detailList;
|
||||
}
|
||||
|
||||
public void setDetailList(ArrayList newDetailList) {
|
||||
this.detailList = newDetailList;
|
||||
}
|
||||
|
||||
public String getHeaderPrimaryKey() {
|
||||
return this.headerPrimaryKey;
|
||||
}
|
||||
|
||||
public void setHeaderPrimaryKey(String newHeaderPrimaryKey) {
|
||||
this.headerPrimaryKey = newHeaderPrimaryKey;
|
||||
}
|
||||
|
||||
public long getPageRequested() {
|
||||
return this.pageRequested;
|
||||
}
|
||||
|
||||
public void setPageRequested(long newPageRequested) {
|
||||
this.pageRequested = newPageRequested;
|
||||
}
|
||||
|
||||
public String[] getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(String[] newStatus) {
|
||||
this.status = newStatus;
|
||||
}
|
||||
|
||||
public String[] getDetailId() {
|
||||
return this.detailId;
|
||||
}
|
||||
|
||||
public void setDetailId(String[] newDetailId) {
|
||||
this.detailId = newDetailId;
|
||||
}
|
||||
|
||||
public String getScreenName() {
|
||||
return this.screenName;
|
||||
}
|
||||
|
||||
public void setScreenName(String newScreenName) {
|
||||
this.screenName = newScreenName;
|
||||
}
|
||||
|
||||
public boolean isHeaderDataChanged() {
|
||||
return this.headerDataChanged;
|
||||
}
|
||||
|
||||
public void setHeaderDataChanged(boolean newHeaderDataChanged) {
|
||||
this.headerDataChanged = newHeaderDataChanged;
|
||||
}
|
||||
|
||||
public boolean isDetailDataChanged() {
|
||||
return this.detailDataChanged;
|
||||
}
|
||||
|
||||
public void setDetailDataChanged(boolean newDetailDataChanged) {
|
||||
this.detailDataChanged = newDetailDataChanged;
|
||||
}
|
||||
|
||||
public int getDetailStartPage() {
|
||||
return this.detailStartPage;
|
||||
}
|
||||
|
||||
public void setDetailStartPage(int newDetailStartPage) {
|
||||
this.detailStartPage = newDetailStartPage;
|
||||
}
|
||||
|
||||
public String getScreenMode() {
|
||||
return this.screenMode;
|
||||
}
|
||||
|
||||
public void setScreenMode(String newScreenMode) {
|
||||
this.screenMode = newScreenMode;
|
||||
}
|
||||
|
||||
public String getForwardedPage() {
|
||||
return this.forwardedPage;
|
||||
}
|
||||
|
||||
public void setForwardedPage(String newForwardedPage) {
|
||||
this.forwardedPage = newForwardedPage;
|
||||
}
|
||||
|
||||
public boolean[] getChecked() {
|
||||
return this.checked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean[] newChecked) {
|
||||
this.checked = newChecked;
|
||||
}
|
||||
|
||||
public long getPositionRequested() {
|
||||
return this.positionRequested;
|
||||
}
|
||||
|
||||
public void setPositionRequested(long newPositionRequested) {
|
||||
this.positionRequested = newPositionRequested;
|
||||
}
|
||||
|
||||
public long getTotalCount() {
|
||||
return this.totalCount;
|
||||
}
|
||||
|
||||
public void setTotalCount(long newTotalCount) {
|
||||
this.totalCount = newTotalCount;
|
||||
}
|
||||
|
||||
public String getNewPositionRequested() {
|
||||
return this.newPositionRequested;
|
||||
}
|
||||
|
||||
public void setNewPositionRequested(String newNewPositionRequested) {
|
||||
this.newPositionRequested = newNewPositionRequested;
|
||||
}
|
||||
|
||||
public String[] getItemChecked() {
|
||||
return this.itemChecked;
|
||||
}
|
||||
|
||||
public void setItemChecked(String[] newItemChecked) {
|
||||
this.itemChecked = newItemChecked;
|
||||
}
|
||||
|
||||
public String getLovKey() {
|
||||
return this.lovKey;
|
||||
}
|
||||
|
||||
public void setLovKey(String newLovKey) {
|
||||
this.lovKey = newLovKey;
|
||||
}
|
||||
|
||||
public String getTxtIndex() {
|
||||
return this.txtIndex;
|
||||
}
|
||||
|
||||
public void setTxtIndex(String newTxtIndex) {
|
||||
this.txtIndex = newTxtIndex;
|
||||
}
|
||||
|
||||
public String getNewPageRequested() {
|
||||
return this.newPageRequested;
|
||||
}
|
||||
|
||||
public void setNewPageRequested(String newNewPageRequested) {
|
||||
this.newPageRequested = newNewPageRequested;
|
||||
}
|
||||
|
||||
public String getUserPageRequested() {
|
||||
return this.userPageRequested;
|
||||
}
|
||||
|
||||
public void setUserPageRequested(String newUserPageRequested) {
|
||||
this.userPageRequested = newUserPageRequested;
|
||||
}
|
||||
|
||||
public String getUserPositionRequested() {
|
||||
return this.userPositionRequested;
|
||||
}
|
||||
|
||||
public void setUserPositionRequested(String newUserPositionRequested) {
|
||||
this.userPositionRequested = newUserPositionRequested;
|
||||
}
|
||||
|
||||
public int getThisPageDetailCount() {
|
||||
return this.thisPageDetailCount;
|
||||
}
|
||||
|
||||
public void setThisPageDetailCount(int newThisPageDetailCount) {
|
||||
this.thisPageDetailCount = newThisPageDetailCount;
|
||||
}
|
||||
|
||||
public String getTxtDisplayFields() {
|
||||
return this.txtDisplayFields;
|
||||
}
|
||||
|
||||
public void setTxtDisplayFields(String newTxtDisplayFields) {
|
||||
this.txtDisplayFields = newTxtDisplayFields;
|
||||
}
|
||||
|
||||
public String getTxtSearchFields() {
|
||||
return this.txtSearchFields;
|
||||
}
|
||||
|
||||
public void setTxtSearchFields(String newTxtSearchFields) {
|
||||
this.txtSearchFields = newTxtSearchFields;
|
||||
}
|
||||
|
||||
public long getTotalPageCount() {
|
||||
return this.totalPageCount;
|
||||
}
|
||||
|
||||
public void setTotalPageCount(long newTotalPageCount) {
|
||||
this.totalPageCount = newTotalPageCount;
|
||||
}
|
||||
|
||||
public String getHeaderStatus() {
|
||||
return this.headerStatus;
|
||||
}
|
||||
|
||||
public void setHeaderStatus(String newHeaderStatus) {
|
||||
this.headerStatus = newHeaderStatus;
|
||||
}
|
||||
|
||||
public String getButQuery() {
|
||||
return this.butQuery;
|
||||
}
|
||||
|
||||
public void setButQuery(String newButQuery) {
|
||||
this.butQuery = newButQuery;
|
||||
}
|
||||
|
||||
public String getButInsert() {
|
||||
return this.butInsert;
|
||||
}
|
||||
|
||||
public void setButInsert(String newButInsert) {
|
||||
this.butInsert = newButInsert;
|
||||
}
|
||||
|
||||
public String getDisabbutInsert() {
|
||||
return this.disabbutInsert;
|
||||
}
|
||||
|
||||
public void setDisabbutInsert(String newDisabbutInsert) {
|
||||
this.disabbutInsert = newDisabbutInsert;
|
||||
}
|
||||
|
||||
public String getButExecute() {
|
||||
return this.butExecute;
|
||||
}
|
||||
|
||||
public void setButExecute(String newButExecute) {
|
||||
this.butExecute = newButExecute;
|
||||
}
|
||||
|
||||
public String getDisabbutExecute() {
|
||||
return this.disabbutExecute;
|
||||
}
|
||||
|
||||
public void setDisabbutExecute(String newDisabbutExecute) {
|
||||
this.disabbutExecute = newDisabbutExecute;
|
||||
}
|
||||
|
||||
public String getButSave() {
|
||||
return this.butSave;
|
||||
}
|
||||
|
||||
public void setButSave(String newButSave) {
|
||||
this.butSave = newButSave;
|
||||
}
|
||||
|
||||
public String getDisabbutSave() {
|
||||
return this.disabbutSave;
|
||||
}
|
||||
|
||||
public void setDisabbutSave(String newDisabbutSave) {
|
||||
this.disabbutSave = newDisabbutSave;
|
||||
}
|
||||
|
||||
public String getButDelete() {
|
||||
return this.butDelete;
|
||||
}
|
||||
|
||||
public void setButDelete(String newButDelete) {
|
||||
this.butDelete = newButDelete;
|
||||
}
|
||||
|
||||
public String getDisabbutDelete() {
|
||||
return this.disabbutDelete;
|
||||
}
|
||||
|
||||
public void setDisabbutDelete(String newDisabbutDelete) {
|
||||
this.disabbutDelete = newDisabbutDelete;
|
||||
}
|
||||
|
||||
public String getButRefresh() {
|
||||
return this.butRefresh;
|
||||
}
|
||||
|
||||
public void setButRefresh(String newButRefresh) {
|
||||
this.butRefresh = newButRefresh;
|
||||
}
|
||||
|
||||
public String getDisabbutRefresh() {
|
||||
return this.disabbutRefresh;
|
||||
}
|
||||
|
||||
public void setDisabbutRefresh(String newDisabbutRefresh) {
|
||||
this.disabbutRefresh = newDisabbutRefresh;
|
||||
}
|
||||
|
||||
public String getButHelp() {
|
||||
return this.butHelp;
|
||||
}
|
||||
|
||||
public void setButHelp(String newButHelp) {
|
||||
this.butHelp = newButHelp;
|
||||
}
|
||||
|
||||
public String getDisabbutHelp() {
|
||||
return this.disabbutHelp;
|
||||
}
|
||||
|
||||
public void setDisabbutHelp(String newDisabbutHelp) {
|
||||
this.disabbutHelp = newDisabbutHelp;
|
||||
}
|
||||
|
||||
public String getButPrint() {
|
||||
return this.butPrint;
|
||||
}
|
||||
|
||||
public void setButPrint(String newButPrint) {
|
||||
this.butPrint = newButPrint;
|
||||
}
|
||||
|
||||
public String getDisabbutPrint() {
|
||||
return this.disabbutPrint;
|
||||
}
|
||||
|
||||
public void setDisabbutPrint(String newDisabbutPrint) {
|
||||
this.disabbutPrint = newDisabbutPrint;
|
||||
}
|
||||
|
||||
public String getButNextHeader() {
|
||||
return this.butNextHeader;
|
||||
}
|
||||
|
||||
public void setButNextHeader(String newButNextHeader) {
|
||||
this.butNextHeader = newButNextHeader;
|
||||
}
|
||||
|
||||
public String getDisabbutNextHeader() {
|
||||
return this.disabbutNextHeader;
|
||||
}
|
||||
|
||||
public void setDisabbutNextHeader(String newDisabbutNextHeader) {
|
||||
this.disabbutNextHeader = newDisabbutNextHeader;
|
||||
}
|
||||
|
||||
public String getButPrevHeader() {
|
||||
return this.butPrevHeader;
|
||||
}
|
||||
|
||||
public void setButPrevHeader(String newButPrevHeader) {
|
||||
this.butPrevHeader = newButPrevHeader;
|
||||
}
|
||||
|
||||
public String getDisabbutPrevHeader() {
|
||||
return this.disabbutPrevHeader;
|
||||
}
|
||||
|
||||
public void setDisabbutPrevHeader(String newDisabbutPrevHeader) {
|
||||
this.disabbutPrevHeader = newDisabbutPrevHeader;
|
||||
}
|
||||
|
||||
public String getButGetDetail() {
|
||||
return this.butGetDetail;
|
||||
}
|
||||
|
||||
public void setButGetDetail(String newButGetDetail) {
|
||||
this.butGetDetail = newButGetDetail;
|
||||
}
|
||||
|
||||
public String getDisabbutGetDetail() {
|
||||
return this.disabbutGetDetail;
|
||||
}
|
||||
|
||||
public void setDisabbutGetDetail(String newDisabbutGetDetail) {
|
||||
this.disabbutGetDetail = newDisabbutGetDetail;
|
||||
}
|
||||
|
||||
public String getButJumpHeader() {
|
||||
return this.butJumpHeader;
|
||||
}
|
||||
|
||||
public void setButJumpHeader(String newButJumpHeader) {
|
||||
this.butJumpHeader = newButJumpHeader;
|
||||
}
|
||||
|
||||
public String getDisabbutJumpHeader() {
|
||||
return this.disabbutJumpHeader;
|
||||
}
|
||||
|
||||
public void setDisabbutJumpHeader(String newDisabbutJumpHeader) {
|
||||
this.disabbutJumpHeader = newDisabbutJumpHeader;
|
||||
}
|
||||
|
||||
public String getButJumpDetail() {
|
||||
return this.butJumpDetail;
|
||||
}
|
||||
|
||||
public void setButJumpDetail(String newButJumpDetail) {
|
||||
this.butJumpDetail = newButJumpDetail;
|
||||
}
|
||||
|
||||
public String getDisabbutJumpDetail() {
|
||||
return this.disabbutJumpDetail;
|
||||
}
|
||||
|
||||
public void setDisabbutJumpDetail(String newDisabbutJumpDetail) {
|
||||
this.disabbutJumpDetail = newDisabbutJumpDetail;
|
||||
}
|
||||
|
||||
public String getButExit() {
|
||||
return this.butExit;
|
||||
}
|
||||
|
||||
public void setButExit(String newButExit) {
|
||||
this.butExit = newButExit;
|
||||
}
|
||||
|
||||
public String getDisabbutExit() {
|
||||
return this.disabbutExit;
|
||||
}
|
||||
|
||||
public void setDisabbutExit(String newDisabbutExit) {
|
||||
this.disabbutExit = newDisabbutExit;
|
||||
}
|
||||
|
||||
public String getDisabheaderStatus() {
|
||||
return this.disabheaderStatus;
|
||||
}
|
||||
|
||||
public void setDisabheaderStatus(String newDisabheaderStatus) {
|
||||
this.disabheaderStatus = newDisabheaderStatus;
|
||||
}
|
||||
|
||||
public String getDisabbutQuery() {
|
||||
return this.disabbutQuery;
|
||||
}
|
||||
|
||||
public void setDisabbutQuery(String newDisabbutQuery) {
|
||||
this.disabbutQuery = newDisabbutQuery;
|
||||
}
|
||||
|
||||
public String getButNextDetail() {
|
||||
return this.butNextDetail;
|
||||
}
|
||||
|
||||
public void setButNextDetail(String newButNextDetail) {
|
||||
this.butNextDetail = newButNextDetail;
|
||||
}
|
||||
|
||||
public String getButPrevDetail() {
|
||||
return this.butPrevDetail;
|
||||
}
|
||||
|
||||
public void setButPrevDetail(String newButPrevDetail) {
|
||||
this.butPrevDetail = newButPrevDetail;
|
||||
}
|
||||
|
||||
public String getDisabbutPrevDetail() {
|
||||
return this.disabbutPrevDetail;
|
||||
}
|
||||
|
||||
public void setDisabbutPrevDetail(String newDisabbutPrevDetail) {
|
||||
this.disabbutPrevDetail = newDisabbutPrevDetail;
|
||||
}
|
||||
|
||||
public String getDisabbutNextDetail() {
|
||||
return this.disabbutNextDetail;
|
||||
}
|
||||
|
||||
public void setDisabbutNextDetail(String newDisabbutNextDetail) {
|
||||
this.disabbutNextDetail = newDisabbutNextDetail;
|
||||
}
|
||||
|
||||
public String getDisabnewPageRequested() {
|
||||
return this.disabnewPageRequested;
|
||||
}
|
||||
|
||||
public void setDisabnewPageRequested(String newDisabnewPageRequested) {
|
||||
this.disabnewPageRequested = newDisabnewPageRequested;
|
||||
}
|
||||
|
||||
public String getDisabnewPositionRequested() {
|
||||
return this.disabnewPositionRequested;
|
||||
}
|
||||
|
||||
public void setDisabnewPositionRequested(String newDisabnewPositionRequested) {
|
||||
this.disabnewPositionRequested = newDisabnewPositionRequested;
|
||||
}
|
||||
|
||||
public String getButAddRow() {
|
||||
return this.butAddRow;
|
||||
}
|
||||
|
||||
public void setButAddRow(String newButAddRow) {
|
||||
this.butAddRow = newButAddRow;
|
||||
}
|
||||
|
||||
public String getButDelRow() {
|
||||
return this.butDelRow;
|
||||
}
|
||||
|
||||
public void setButDelRow(String newButDelRow) {
|
||||
this.butDelRow = newButDelRow;
|
||||
}
|
||||
|
||||
public String getDisabbutAddRow() {
|
||||
return this.disabbutAddRow;
|
||||
}
|
||||
|
||||
public void setDisabbutAddRow(String newDisabbutAddRow) {
|
||||
this.disabbutAddRow = newDisabbutAddRow;
|
||||
}
|
||||
|
||||
public String getDisabbutDelRow() {
|
||||
return this.disabbutDelRow;
|
||||
}
|
||||
|
||||
public void setDisabbutDelRow(String newDisabbutDelRow) {
|
||||
this.disabbutDelRow = newDisabbutDelRow;
|
||||
}
|
||||
|
||||
public String getButtonClicked() {
|
||||
return this.buttonClicked;
|
||||
}
|
||||
|
||||
public void setButtonClicked(String newButtonClicked) {
|
||||
this.buttonClicked = newButtonClicked;
|
||||
}
|
||||
|
||||
public String getButtonName() {
|
||||
return this.buttonName;
|
||||
}
|
||||
|
||||
public void setButtonName(String newButtonName) {
|
||||
this.buttonName = newButtonName;
|
||||
}
|
||||
|
||||
public boolean isQueried() {
|
||||
return this.queried;
|
||||
}
|
||||
|
||||
public void setQueried(boolean newQueried) {
|
||||
this.queried = newQueried;
|
||||
}
|
||||
|
||||
public String getFirstLoad() {
|
||||
return this.firstLoad;
|
||||
}
|
||||
|
||||
public void setFirstLoad(String newFirstLoad) {
|
||||
this.firstLoad = newFirstLoad;
|
||||
}
|
||||
|
||||
public String getConfirmKey() {
|
||||
return this.confirmKey;
|
||||
}
|
||||
|
||||
public void setConfirmKey(String newConfirmKey) {
|
||||
this.confirmKey = newConfirmKey;
|
||||
}
|
||||
|
||||
public String getButtonKeys() {
|
||||
return this.buttonKeys;
|
||||
}
|
||||
|
||||
public void setButtonKeys(String newButtonKeys) {
|
||||
this.buttonKeys = newButtonKeys;
|
||||
}
|
||||
|
||||
public String getWorkListId() {
|
||||
return this.hidWorkListId;
|
||||
}
|
||||
|
||||
public void setWorkListId(String newWorkListId) {
|
||||
this.workListId = newWorkListId;
|
||||
}
|
||||
|
||||
public String getHidWorkListId() {
|
||||
return this.hidWorkListId;
|
||||
}
|
||||
|
||||
public void setHidWorkListId(String newHidWorkListId) {
|
||||
this.hidWorkListId = newHidWorkListId;
|
||||
}
|
||||
}
|
533
hrmsEjb/wenrgise/common/webtier/form/BaseLOVForm.java
Normal file
533
hrmsEjb/wenrgise/common/webtier/form/BaseLOVForm.java
Normal file
@@ -0,0 +1,533 @@
|
||||
package wenrgise.common.webtier.form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class BaseLOVForm extends BaseForm {
|
||||
private String[] detailField1;
|
||||
|
||||
private String[] detailField2;
|
||||
|
||||
private String[] detailField3;
|
||||
|
||||
private String[] detailField4;
|
||||
|
||||
private String[] detailField5;
|
||||
|
||||
private String[] detailField6;
|
||||
|
||||
private String[] detailField7;
|
||||
|
||||
private String[] detailField8;
|
||||
|
||||
private String[] detailField9;
|
||||
|
||||
private String[] detailField10;
|
||||
|
||||
private String[] detailField11;
|
||||
|
||||
private String[] detailField12;
|
||||
|
||||
private String[] detailField13;
|
||||
|
||||
private String[] detailField14;
|
||||
|
||||
private String[] detailField15;
|
||||
|
||||
private String[] detailField16;
|
||||
|
||||
private String[] detailField17;
|
||||
|
||||
private String[] detailField18;
|
||||
|
||||
private String[] detailField19;
|
||||
|
||||
private String[] detailField20;
|
||||
|
||||
private String selRadio;
|
||||
|
||||
private ArrayList detailList;
|
||||
|
||||
private String userAction;
|
||||
|
||||
private String txtHidSubmitFirst;
|
||||
|
||||
private String txtHidAction = "FirstTime";
|
||||
|
||||
private String txtHidSelectedValue;
|
||||
|
||||
private int txtHidTotRows;
|
||||
|
||||
private int txtHidTotCols;
|
||||
|
||||
private String searchField1;
|
||||
|
||||
private String searchField2;
|
||||
|
||||
private String insertFlag;
|
||||
|
||||
private String searchFieldName1;
|
||||
|
||||
private String searchFieldName2;
|
||||
|
||||
private String multipleFlag;
|
||||
|
||||
private String queryParam;
|
||||
|
||||
private ArrayList headerList;
|
||||
|
||||
private ArrayList visibilityList;
|
||||
|
||||
private String recursiveFlag;
|
||||
|
||||
private int level;
|
||||
|
||||
private int finalLevel;
|
||||
|
||||
private int initialLevel;
|
||||
|
||||
private String searchField3;
|
||||
|
||||
private String searchField4;
|
||||
|
||||
private String searchField5;
|
||||
|
||||
private String searchField6;
|
||||
|
||||
private String searchFieldName3;
|
||||
|
||||
private String searchFieldName4;
|
||||
|
||||
private String searchFieldName5;
|
||||
|
||||
private String searchFieldName6;
|
||||
|
||||
public ArrayList getDetailList() {
|
||||
return this.detailList;
|
||||
}
|
||||
|
||||
public void setDetailList(ArrayList newDetailList) {
|
||||
this.detailList = newDetailList;
|
||||
}
|
||||
|
||||
public String getSelRadio() {
|
||||
return this.selRadio;
|
||||
}
|
||||
|
||||
public void setSelRadio(String newSelRadio) {
|
||||
this.selRadio = newSelRadio;
|
||||
}
|
||||
|
||||
public String getUserAction() {
|
||||
return this.userAction;
|
||||
}
|
||||
|
||||
public void setUserAction(String newUserAction) {
|
||||
this.userAction = newUserAction;
|
||||
}
|
||||
|
||||
public String getTxtHidAction() {
|
||||
return this.txtHidAction;
|
||||
}
|
||||
|
||||
public void setTxtHidAction(String newTxtHidAction) {
|
||||
this.txtHidAction = newTxtHidAction;
|
||||
}
|
||||
|
||||
public String getTxtHidSelectedValue() {
|
||||
return this.txtHidSelectedValue;
|
||||
}
|
||||
|
||||
public void setTxtHidSelectedValue(String newTxtHidSelectedValue) {
|
||||
this.txtHidSelectedValue = newTxtHidSelectedValue;
|
||||
}
|
||||
|
||||
public String getTxtHidSubmitFirst() {
|
||||
return this.txtHidSubmitFirst;
|
||||
}
|
||||
|
||||
public void setTxtHidSubmitFirst(String newTxtHidSubmitFirst) {
|
||||
this.txtHidSubmitFirst = newTxtHidSubmitFirst;
|
||||
}
|
||||
|
||||
public String getSearchField1() {
|
||||
return this.searchField1;
|
||||
}
|
||||
|
||||
public void setSearchField1(String newSearchField1) {
|
||||
this.searchField1 = newSearchField1;
|
||||
}
|
||||
|
||||
public int getTxtHidTotRows() {
|
||||
return this.txtHidTotRows;
|
||||
}
|
||||
|
||||
public void setTxtHidTotRows(int newTxtHidTotRows) {
|
||||
this.txtHidTotRows = newTxtHidTotRows;
|
||||
}
|
||||
|
||||
public void onLoadReset() {
|
||||
this.searchField1 = "";
|
||||
this.searchField2 = "";
|
||||
this.searchField3 = "";
|
||||
this.searchField4 = "";
|
||||
this.searchField5 = "";
|
||||
this.searchField6 = "";
|
||||
this.selRadio = "";
|
||||
this.detailField1 = null;
|
||||
this.detailField2 = null;
|
||||
this.detailField3 = null;
|
||||
this.detailField4 = null;
|
||||
this.detailField5 = null;
|
||||
this.detailField6 = null;
|
||||
this.detailField7 = null;
|
||||
this.detailField8 = null;
|
||||
this.detailField9 = null;
|
||||
this.detailField10 = null;
|
||||
this.detailField11 = null;
|
||||
this.detailField12 = null;
|
||||
this.detailField13 = null;
|
||||
this.detailField14 = null;
|
||||
this.detailField15 = null;
|
||||
this.detailField16 = null;
|
||||
this.detailField17 = null;
|
||||
this.detailField18 = null;
|
||||
this.detailField19 = null;
|
||||
this.detailField20 = null;
|
||||
this.txtHidTotRows = -1;
|
||||
this.txtHidTotCols = -1;
|
||||
this.headerList.clear();
|
||||
this.detailList.clear();
|
||||
}
|
||||
|
||||
public String[] getDetailField4() {
|
||||
return this.detailField4;
|
||||
}
|
||||
|
||||
public void setDetailField4(String[] newDetailField4) {
|
||||
this.detailField4 = newDetailField4;
|
||||
}
|
||||
|
||||
public String[] getDetailField5() {
|
||||
return this.detailField5;
|
||||
}
|
||||
|
||||
public void setDetailField5(String[] newDetailField5) {
|
||||
this.detailField5 = newDetailField5;
|
||||
}
|
||||
|
||||
public String[] getDetailField6() {
|
||||
return this.detailField6;
|
||||
}
|
||||
|
||||
public void setDetailField6(String[] newDetailField6) {
|
||||
this.detailField6 = newDetailField6;
|
||||
}
|
||||
|
||||
public String[] getDetailField7() {
|
||||
return this.detailField7;
|
||||
}
|
||||
|
||||
public void setDetailField7(String[] newDetailField7) {
|
||||
this.detailField7 = newDetailField7;
|
||||
}
|
||||
|
||||
public String[] getDetailField8() {
|
||||
return this.detailField8;
|
||||
}
|
||||
|
||||
public void setDetailField8(String[] newDetailField8) {
|
||||
this.detailField8 = newDetailField8;
|
||||
}
|
||||
|
||||
public String[] getDetailField9() {
|
||||
return this.detailField9;
|
||||
}
|
||||
|
||||
public void setDetailField9(String[] newDetailField9) {
|
||||
this.detailField9 = newDetailField9;
|
||||
}
|
||||
|
||||
public String[] getDetailField10() {
|
||||
return this.detailField10;
|
||||
}
|
||||
|
||||
public void setDetailField10(String[] newDetailField10) {
|
||||
this.detailField10 = newDetailField10;
|
||||
}
|
||||
|
||||
public String getSearchField2() {
|
||||
return this.searchField2;
|
||||
}
|
||||
|
||||
public void setSearchField2(String newSearchField2) {
|
||||
this.searchField2 = newSearchField2;
|
||||
}
|
||||
|
||||
public String[] getDetailField1() {
|
||||
return this.detailField1;
|
||||
}
|
||||
|
||||
public void setDetailField1(String[] newDetailField1) {
|
||||
this.detailField1 = newDetailField1;
|
||||
}
|
||||
|
||||
public String[] getDetailField2() {
|
||||
return this.detailField2;
|
||||
}
|
||||
|
||||
public void setDetailField2(String[] newDetailField2) {
|
||||
this.detailField2 = newDetailField2;
|
||||
}
|
||||
|
||||
public String[] getDetailField3() {
|
||||
return this.detailField3;
|
||||
}
|
||||
|
||||
public void setDetailField3(String[] newDetailField3) {
|
||||
this.detailField3 = newDetailField3;
|
||||
}
|
||||
|
||||
public int getTxtHidTotCols() {
|
||||
return this.txtHidTotCols;
|
||||
}
|
||||
|
||||
public void setTxtHidTotCols(int newTxtHidTotCols) {
|
||||
this.txtHidTotCols = newTxtHidTotCols;
|
||||
}
|
||||
|
||||
public String getInsertFlag() {
|
||||
return this.insertFlag;
|
||||
}
|
||||
|
||||
public void setInsertFlag(String newInsertFlag) {
|
||||
this.insertFlag = newInsertFlag;
|
||||
}
|
||||
|
||||
public String getSearchFieldName1() {
|
||||
return this.searchFieldName1;
|
||||
}
|
||||
|
||||
public void setSearchFieldName1(String newSearchFieldName1) {
|
||||
this.searchFieldName1 = newSearchFieldName1;
|
||||
}
|
||||
|
||||
public String getSearchFieldName2() {
|
||||
return this.searchFieldName2;
|
||||
}
|
||||
|
||||
public void setSearchFieldName2(String newSearchFieldName2) {
|
||||
this.searchFieldName2 = newSearchFieldName2;
|
||||
}
|
||||
|
||||
public String getMultipleFlag() {
|
||||
return this.multipleFlag;
|
||||
}
|
||||
|
||||
public void setMultipleFlag(String newMultipleFlag) {
|
||||
this.multipleFlag = newMultipleFlag;
|
||||
}
|
||||
|
||||
public String getQueryParam() {
|
||||
return this.queryParam;
|
||||
}
|
||||
|
||||
public void setQueryParam(String newQueryParam) {
|
||||
this.queryParam = newQueryParam;
|
||||
}
|
||||
|
||||
public ArrayList getHeaderList() {
|
||||
return this.headerList;
|
||||
}
|
||||
|
||||
public void setHeaderList(ArrayList newHeaderList) {
|
||||
this.headerList = newHeaderList;
|
||||
}
|
||||
|
||||
public ArrayList getVisibilityList() {
|
||||
return this.visibilityList;
|
||||
}
|
||||
|
||||
public void setVisibilityList(ArrayList newVisibilityList) {
|
||||
this.visibilityList = newVisibilityList;
|
||||
}
|
||||
|
||||
public String getVisibility(int iIndex) {
|
||||
return this.visibilityList.get(iIndex);
|
||||
}
|
||||
|
||||
public String[] getDetailField11() {
|
||||
return this.detailField11;
|
||||
}
|
||||
|
||||
public void setDetailField11(String[] newDetailField11) {
|
||||
this.detailField11 = newDetailField11;
|
||||
}
|
||||
|
||||
public String[] getDetailField12() {
|
||||
return this.detailField12;
|
||||
}
|
||||
|
||||
public void setDetailField12(String[] newDetailField12) {
|
||||
this.detailField12 = newDetailField12;
|
||||
}
|
||||
|
||||
public String[] getDetailField13() {
|
||||
return this.detailField13;
|
||||
}
|
||||
|
||||
public void setDetailField13(String[] newDetailField13) {
|
||||
this.detailField13 = newDetailField13;
|
||||
}
|
||||
|
||||
public String[] getDetailField14() {
|
||||
return this.detailField14;
|
||||
}
|
||||
|
||||
public void setDetailField14(String[] newDetailField14) {
|
||||
this.detailField14 = newDetailField14;
|
||||
}
|
||||
|
||||
public String[] getDetailField15() {
|
||||
return this.detailField15;
|
||||
}
|
||||
|
||||
public void setDetailField15(String[] newDetailField15) {
|
||||
this.detailField15 = newDetailField15;
|
||||
}
|
||||
|
||||
public String[] getDetailField17() {
|
||||
return this.detailField17;
|
||||
}
|
||||
|
||||
public void setDetailField17(String[] newDetailField17) {
|
||||
this.detailField17 = newDetailField17;
|
||||
}
|
||||
|
||||
public String[] getDetailField18() {
|
||||
return this.detailField18;
|
||||
}
|
||||
|
||||
public void setDetailField18(String[] newDetailField18) {
|
||||
this.detailField18 = newDetailField18;
|
||||
}
|
||||
|
||||
public String[] getDetailField19() {
|
||||
return this.detailField19;
|
||||
}
|
||||
|
||||
public void setDetailField19(String[] newDetailField19) {
|
||||
this.detailField19 = newDetailField19;
|
||||
}
|
||||
|
||||
public String[] getDetailField16() {
|
||||
return this.detailField16;
|
||||
}
|
||||
|
||||
public void setDetailField16(String[] newDetailField16) {
|
||||
this.detailField16 = newDetailField16;
|
||||
}
|
||||
|
||||
public String[] getDetailField20() {
|
||||
return this.detailField20;
|
||||
}
|
||||
|
||||
public void setDetailField20(String[] newDetailField20) {
|
||||
this.detailField20 = newDetailField20;
|
||||
}
|
||||
|
||||
public String getRecursiveFlag() {
|
||||
return this.recursiveFlag;
|
||||
}
|
||||
|
||||
public void setRecursiveFlag(String newRecursiveFlag) {
|
||||
this.recursiveFlag = newRecursiveFlag;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return this.level;
|
||||
}
|
||||
|
||||
public void setLevel(int newLevel) {
|
||||
this.level = newLevel;
|
||||
}
|
||||
|
||||
public int getFinalLevel() {
|
||||
return this.finalLevel;
|
||||
}
|
||||
|
||||
public void setFinalLevel(int newFinalLevel) {
|
||||
this.finalLevel = newFinalLevel;
|
||||
}
|
||||
|
||||
public int getInitialLevel() {
|
||||
return this.initialLevel;
|
||||
}
|
||||
|
||||
public void setInitialLevel(int newInitialLevel) {
|
||||
this.initialLevel = newInitialLevel;
|
||||
}
|
||||
|
||||
public String getSearchField3() {
|
||||
return this.searchField3;
|
||||
}
|
||||
|
||||
public void setSearchField3(String newSearchField3) {
|
||||
this.searchField3 = newSearchField3;
|
||||
}
|
||||
|
||||
public String getSearchField4() {
|
||||
return this.searchField4;
|
||||
}
|
||||
|
||||
public void setSearchField4(String newSearchField4) {
|
||||
this.searchField4 = newSearchField4;
|
||||
}
|
||||
|
||||
public String getSearchField5() {
|
||||
return this.searchField5;
|
||||
}
|
||||
|
||||
public void setSearchField5(String newSearchField5) {
|
||||
this.searchField5 = newSearchField5;
|
||||
}
|
||||
|
||||
public String getSearchField6() {
|
||||
return this.searchField6;
|
||||
}
|
||||
|
||||
public void setSearchField6(String newSearchField6) {
|
||||
this.searchField6 = newSearchField6;
|
||||
}
|
||||
|
||||
public String getSearchFieldName3() {
|
||||
return this.searchFieldName3;
|
||||
}
|
||||
|
||||
public void setSearchFieldName3(String newSearchFieldName3) {
|
||||
this.searchFieldName3 = newSearchFieldName3;
|
||||
}
|
||||
|
||||
public String getSearchFieldName4() {
|
||||
return this.searchFieldName4;
|
||||
}
|
||||
|
||||
public void setSearchFieldName4(String newSearchFieldName4) {
|
||||
this.searchFieldName4 = newSearchFieldName4;
|
||||
}
|
||||
|
||||
public String getSearchFieldName5() {
|
||||
return this.searchFieldName5;
|
||||
}
|
||||
|
||||
public void setSearchFieldName5(String newSearchFieldName5) {
|
||||
this.searchFieldName5 = newSearchFieldName5;
|
||||
}
|
||||
|
||||
public String getSearchFieldName6() {
|
||||
return this.searchFieldName6;
|
||||
}
|
||||
|
||||
public void setSearchFieldName6(String newSearchFieldName6) {
|
||||
this.searchFieldName6 = newSearchFieldName6;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user