📄 a_cmsbackoffice.java
字号:
String filterParam = (String)parameters.get("filterparameter");
String id = (String)parameters.get("id");
String idlock = (String)parameters.get("idlock");
String iddelete = (String)parameters.get("iddelete");
String idedit = (String)parameters.get("idedit");
String action = (String)parameters.get("action");
String parentId = (String)parameters.get("parentId");
String ok = (String)parameters.get("ok");
String setaction = (String)parameters.get("setaction");
String idundelete = (String)parameters.get("idundelete");
String idpublish = (String)parameters.get("idpublish");
String idhistory = (String)parameters.get("idhistory");
String idpermissions = (String)parameters.get("idpermissions");
String idcopy = (String)parameters.get("idcopy");
// debug-code
/*
System.err.println("### "+this.getContentDefinitionClass().getName());
System.err.println("### PARAMETERS");
Enumeration enu=parameters.keys();
while (enu.hasMoreElements()) {
String a=(String)enu.nextElement();
String b=parameters.get(a).toString();
System.err.println("## "+a+" -> "+b);
}
System.err.println("");
System.err.println("+++ SESSION");
String[] ses=session.getValueNames();
for (int i=0;i<ses.length;i++) {
String a=ses[i];
String b=session.getValue(a).toString();
System.err.println("++ "+a+" -> "+b);
}
System.err.println("");
System.err.println("-------------------------------------------------");
*/
String hasFilterParam = (String)session.getValue("filterparameter");
template.setData("filternumber", "0");
//change filter
if ((hasFilterParam == null) && (filterParam == null) && (setaction == null)) {
if (selectBox != null) {
session.putValue("filter", selectBox);
template.setData("filternumber", selectBox);
}
} else {
template.setData("filternumber", (String)session.getValue("filter"));
}
//move id values to id, remove old markers
if (idlock != null) {
id = idlock;
session.putValue("idlock", idlock);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("iddelete");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
if (idedit != null) {
id = idedit;
session.putValue("idedit", idedit);
session.removeValue("idlock");
session.removeValue("idnew");
session.removeValue("iddelete");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
if (iddelete != null) {
id = iddelete;
session.putValue("iddelete", iddelete);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("idlock");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
if (idundelete != null) {
id = idundelete;
session.putValue("idundelete", idundelete);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("idlock");
session.removeValue("iddelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
if (idpublish != null) {
id = idpublish;
session.putValue("idpublish", idpublish);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("idlock");
session.removeValue("iddelete");
session.removeValue("idundelete");
session.removeValue("idhistory");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
if (idhistory != null) {
id = idhistory;
session.putValue("idhistory", idhistory);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("idlock");
session.removeValue("iddelete");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
if (idpermissions != null) {
id = idpermissions;
session.putValue("idpermissions", idpermissions);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("idlock");
session.removeValue("iddelete");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idcopy");
}
if (idcopy != null) {
id = idcopy;
session.putValue("idcopy", idcopy);
session.removeValue("idedit");
session.removeValue("idnew");
session.removeValue("idlock");
session.removeValue("iddelete");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idpermissions");
}
if ((id != null) && (id.equals("new"))) {
session.putValue("idnew", id);
session.removeValue("idedit");
session.removeValue("iddelete");
session.removeValue("idlock");
session.removeValue("idundelete");
session.removeValue("idpublish");
session.removeValue("idhistory");
session.removeValue("idpermissions");
session.removeValue("idcopy");
}
//get marker id from session
String idsave = (String)session.getValue("idsave");
if (ok == null) {
idsave = null;
}
if (parentId != null) {
session.putValue("parentId", parentId);
}
//get marker for accessing the new dialog
// --- This is the part when getContentNew is called ---
//access to new dialog
if ((id != null) && (id.equals("new")) || ((idsave != null) && (idsave.equals("new")))) {
if (idsave != null) {
parameters.put("id", idsave);
}
if (id != null) {
parameters.put("id", id);
session.putValue("idsave", id);
}
return getContentNewInternal(cms, id, cd, session, template, elementName, parameters, templateSelector);
// --- This was the part when getContentNew is called ---
}
//go to the appropriate getContent methods
if ((id == null) && (idsave == null) && (action == null) && (idlock == null) && (iddelete == null) && (idedit == null) && (idundelete == null) && (idpublish == null) && (idhistory == null) && (idpermissions == null) && (idcopy == null)) {
//process the head frame containing the filter
returnProcess = getContentHead(cms, template, elementName, parameters, templateSelector);
//finally return processed data
return returnProcess;
} else {
//process the body frame containing the table
if (action == null) {
action = "";
}
if (action.equalsIgnoreCase("list")) {
//process the list output
// clear "idsave" here in case user verification of data failed and input has to be shown again ...
session.removeValue("idsave");
if (isExtendedList()) {
returnProcess = getContentExtendedList(cms, template, elementName, parameters, templateSelector);
} else {
returnProcess = getContentList(cms, template, elementName, parameters, templateSelector);
}
//finally return processed data
return returnProcess;
} else {
// --- This is the part where getContentEdit is called ---
//get marker for accessing the edit dialog
String ideditsave = (String)session.getValue("idedit");
//go to the edit dialog
if ((idedit != null) || (ideditsave != null)) {
if (idsave != null) {
parameters.put("id", idsave);
}
if (id != null) {
parameters.put("id", id);
session.putValue("idsave", id);
}
return getContentEditInternal(cms, id, cd, session, template, elementName, parameters, templateSelector);
// --- This was the part where getContentEdit is called ---
} else {
//store id parameters for delete and lock
if (idsave != null) {
parameters.put("id", idsave);
session.removeValue("idsave");
} else {
parameters.put("id", id);
session.putValue("idsave", id);
}
//check if the cd should be undeleted
if (idundelete != null) {
returnProcess = getContentUndelete(cms, template, elementName, parameters, templateSelector);
return returnProcess;
}
//get marker for accessing the publish dialog
//check if the cd should be published
String idpublishsave = (String)session.getValue("idpublish");
if (idpublish != null || idpublishsave != null) {
returnProcess = getContentDirectPublish(cms, template, elementName, parameters, templateSelector);
return returnProcess;
}
//get marker for accessing the history dialog
//check if the history of cd should be dispayed
String idhistorysave = (String)session.getValue("idhistory");
if (idhistory != null || idhistorysave != null) {
returnProcess = getContentHistory(cms, template, elementName, parameters, templateSelector);
return returnProcess;
}
//get marker for accessing the change permissions dialog
//check if the permissions of cd should be dispayed
String idpermissionssave = (String)session.getValue("idpermissions");
if (idpermissions != null || idpermissionssave != null) {
returnProcess = getContentPermissions(cms, template, elementName, parameters, templateSelector);
return returnProcess;
}
//get marker for accessing the copy dialog
//check if the permissions of cd should be dispayed
String idcopysave = (String)session.getValue("idcopy");
if (idcopy != null || idcopysave != null) {
returnProcess = getContentCopy(cms, template, elementName, parameters, templateSelector);
return returnProcess;
}
//get marker for accessing the delete dialog
String iddeletesave = (String)session.getValue("iddelete");
//access delete dialog
if (((iddelete != null) || (iddeletesave != null)) && (idlock == null)) {
returnProcess = getContentDelete(cms, template, elementName, parameters, templateSelector);
return returnProcess;
} else {
//access lock dialog
returnProcess = getContentLock(cms, template, elementName, parameters, templateSelector);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -