⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewcontent.jsp

📁 OBPM是一个开源
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="com.cyberway.dynaform.form.ejb.Form"%>
<%@ page import="com.cyberway.framework.web.WebUser"%>
<%@ page import="com.cyberway.web.ParamsTable"%>
<%@ page import="com.cyberway.constants.Web"%>
<%@ page import="com.cyberway.dynaform.document.web.DocumentForm"%>
<%@ page import="com.cyberway.dynaform.document.ejb.Document"%>
<%@ page import="com.cyberway.dynaform.form.ejb.ValidateMessage"%>
<%@ page import="com.cyberway.cms.util.CMSCommonUtil"%>
<%@ page import="java.util.Collection"%>
<%@ page import="java.util.Iterator"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/smartweb" prefix="s" %>
<%

String contextPath = request.getContextPath();
String currURL = request.getRequestURL().toString();
boolean isEdit = false;
if(currURL.indexOf("edit.do") > 0){
  isEdit = true;
}

pageContext.setAttribute("SITE", CMSCommonUtil.getSite());
String formname = request.getParameter("formname");
Document document = null;
Form template = (Form)request.getAttribute("TEMPLATE");
DocumentForm documentForm = (DocumentForm)request.getAttribute("DocumentForm");

Collection errors = (Collection)request.getAttribute("ERRORS");
String errMess = (String)request.getAttribute("ERRMESSAGE");
if (documentForm!=null){
	 document = (Document)documentForm.getValueObject();
	 formname = document.getFormname();
}
%>
<html:html>
<head>
<title> <s:Language key="docedit"/></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%= contextPath %>/css/default.css" type="text/css">
<script src="<%= contextPath %>/js/billitem.js"></script>
<script src="<%= contextPath %>/js/check.js"></script>
<script src="<%= contextPath %>/js/util.js"></script>
<script src="<%= contextPath %>/dynaform/utility/select.js"></script>
<script language="JavaScript">
var contextPath = '<%= contextPath %>';
var ev_beforesave;

cmdReturn = '/dynaform/document/listByChannel.do';
cmdSave = '/dynaform/document/save.do?formname=<%=formname%>&defipk=<%=request.getParameter("defipk")%>';
cmdEdit = '/dynaform/document/edit.do?formname=<%=formname%>';
cmdLink = '/dynaform/document/flow.do?id=<c:out value="${DocumentForm.valueObject.id}" />&type=dynadocument&formname=<%=formname%>';
cmdRecalculate = '/dynaform/document/recalculate.do?formname=<%=formname%>';
cmdPreview = '/dynaform/document/explore.do';
cmdView = '/dynaform/document/view.do';

function doPress(){
	var url = contextPath + '/component/sendmail/pressDynaDocPrc.do?id=<c:out value="${DocumentForm.valueObject.id}" />'; 
	var tmp = window.showModalDialog(url,"","dialogHeight: 300px; dialogWidth: 400px; dialogTop: 200px; dialogLeft: 200px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: no;")
	
}
function ev_process(){
  var url = contextPath + cmdLink;
  

  doFlowProcess();

}

function ev_checkval() {
  return checkval(window);
}
function ev_return(){

	window.close();
}
function ev_link(){
   if(formItem.channelid.value==''){
	  alert('<s:Language key="draft_no_module"/>!');
	  return;
  }

  cmdLink = addParam(cmdLink, 'channelid', formItem.channelid.value);
  doLink();
}
function ev_recalculate() {
    enable();
    if(document.all("btnSave") != null){
      document.all("btnSave").disabled = true;
   	}
    var url = addParam(contextPath + cmdRecalculate, 'ISEDIT', 'TRUE');
    formItem.action = url;
    formItem.submit();
}
function ev_preview(){
  if(formItem.id.value=='0'){
	  alert('<s:Language key="draft_not_save"/>!');
	  return false;
  }
  if(formItem._defaultdetailtmplname.value==''){
	  alert('<s:Language key="module_no_detailtemp_or_draft_notsave"/>!');
	  return false;
  }

  var  url="previewdoc.jsp?siteid="+formItem.siteid.value+"&channelid="+formItem.channelid.value+"&docid="+formItem.id.value; 
  window.open(url);
}
</script>
</head>
<body>
<html:form action="/dynaform/document/view.do" styleId="formItem" method="post">
<html:hidden property="id"/>
<html:hidden property="owner"/>
<html:hidden property="formname"/>
<html:hidden property="author"/>
<html:hidden property="siteid"/>
<html:hidden property="channelid"/>
<html:hidden property="lastmodified"/>
<html:hidden property="_defaultdetailtmplname"/>
<html:hidden property="_defaultsummarytmplname"/>
<html:hidden property="_new"/>

<input type="hidden" name="style" value="<c:out value="${param.style}"/>"> 
<input type="hidden" name="tabcontent" value="4"> 
<input type="hidden" name="isAgency" value="<c:out value="${param.isAgency}"/>"> 
<input type="hidden" name="isHadPrcss" value="<c:out value="${param.isHadPrcss}"/>"> 

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="right" valign="middle"> 
   <input type="button" name="btnPrint" value="<s:Language key="print"/>" class="bt-print" onclick="doPrint()">
   <input type="button" name="btnReturn" value="<s:Language key="return"/>" class="bt-exit" onclick="ev_return()" >
   </td>
  </tr>
  <tr>
    <td>
      <font color="red">
<%
	if (errors != null && errors.size() > 0){
		out.println("<s:Language key="errorinfo"/>:");
        	Iterator iter = errors.iterator();
        	while(iter.hasNext()) {
	        	ValidateMessage error = (ValidateMessage)iter.next();
	        	out.println(error.getErrmessage());
        	}
	}
	
	if (errMess != null && errMess.trim().length() > 0){
	  out.println(errMess);
	}
%>
      </font>
    </td>
  </tr>
  <html:errors/>
  <tr>
    <td class="list-datas">
    </td>
  </tr>
</table>
<table width="98%" height="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#dddddd">
		<tr>
          <td width="100%" colspan=4  valign="top">
			<%
			ParamsTable params = ParamsTable.convertHTTP(request);
			WebUser user = (WebUser)  session.getAttribute(Web.SESSION_ATTRIBUTE_USER);
			if(template != null){
				out.print(template.toHtml(document, params, user));
			}
			%>
          </td>
        </tr>

      </table>
<s:KeepCondition form="formItem"/>
</html:form>
</body>
<script>
  <c:if test="${!empty requestScope.FLOWPROCESS and requestScope.FLOWPROCESS eq 'true'}">
    window.returnValue = "true";
    window.close();
  </c:if>
</script>
</html:html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -