📄 explorelistchn.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.cyberway.cms.util.CMSCommonUtil"%>
<%@ page import="com.cyberway.utility.CommonUtil,com.cyberway.billflow.engine.FlowState"%>
<%@ page import="com.cyberway.cms.site.web.SiteForm"%>
<%@ page import="com.cyberway.dynaform.document.ejb.Document"%>
<%@ page import="com.cyberway.dynaform.form.ejb.FormField"%>
<%@ 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();
long channelid = Long.parseLong(request.getParameter("channelid"));
long defipk = CMSCommonUtil.getFlowidByChannel(channelid);
String formname = CMSCommonUtil.getFormtemplateByChannel(channelid);
String channelPathName = CMSCommonUtil.getChannelPathName(channelid);
long siteid=CMSCommonUtil.getSiteidByChannel(channelid);
String httpport=CMSCommonUtil.getSiteHttpAndPort(siteid);
String summarytmpl = (String)request.getAttribute("SUMMARYTMPL");
formname = (formname!=null&&formname.length()>0)?formname.trim():"";
summarytmpl = (summarytmpl!=null&&summarytmpl.length()>0)?summarytmpl.trim():"";
int count = 1;
%>
<html:html>
<head>
<title> <s:Language key="list"/> </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%= contextPath %>/css/css.jsp" type="text/css">
<script src="<%= contextPath %>/js/billlist.js"></script>
<script src="<%= contextPath %>/js/util.js"></script>
<script src="<%= contextPath %>/js/category.js"></script>
<script language="JavaScript">
var contextPath = '<%= contextPath %>';
var channelid = '<%= channelid %>';
var formname = '<%= formname %>';
var defipk = '<%= defipk %>';
var summarytmpl = '<%= summarytmpl %>'
var pathname='<%= channelPathName %>'
var httpport='<%= httpport %>'
cmdNew = '/dynaform/document/exploreNewchn.do';
cmdDelete = '/dynaform/document/exploreDelete.do?channelid='+channelid;
cmdPreview = '/dynaform/document/explore.do';
function ev_new() {
if(channelid==''){
alert('<s:Language key="doc_no_channel"/>!');
return;
}
if(formname==''){
alert('<s:Language key="module_no_contenttemplate"/>!');
return;
}
if(defipk==''){
alert('<s:Language key="module_no_flow"/>!');
return;
}
cmdNew = addParam(cmdNew, 'defipk', defipk);
cmdNew = addParam(cmdNew, 'formname', formname);
cmdNew = addParam(cmdNew, 'channelid', channelid);
doNew();
return true;
}
function ev_check() {
return true;
}
function ev_resetForm() {
<c:forEach var="field" items="${requestScope.FIELDLIST}">
<c:if test="${field.fieldtype eq 'VALUE_TYPE_VARCHAR'}" >
if(formList.sm_<c:out value='${field.name}'/>!=null);
formList.sm_<c:out value='${field.name}'/>.value="";
</c:if>
<c:if test="${field.fieldtype eq 'VALUE_TYPE_DATE'}" >
if(formList.s_<c:out value='${field.name}'/>!=null);
formList.s_<c:out value='${field.name}'/>.value="";
</c:if>
<c:if test="${field.fieldtype eq 'VALUE_TYPE_NUMBER'}" >
if(formList.i_<c:out value='${field.name}'/>!=null);
formList.i_<c:out value='${field.name}'/>.value="";
</c:if>
</c:forEach>
resetForm();
}
function ev_preview(){
if(summarytmpl==''){
alert('<s:Language key="module_no_listtemplate"/>!');
return;
}
//cmdPreview = contextPath + addParam(cmdPreview, 'formname', summarytmpl);
cmdPreview = "http://"+httpport+"/$preview$/"+pathname;
alert(cmdPreview);
window.open(cmdPreview);
}
</script>
</head>
<body>
<html:form styleId="formList" method="post" action="/dynaform/document/exploreListchn.do">
<html:hidden property="n_channelid"/>
<html:hidden property="sm_$channelids"/>
<html:hidden property="_orderby"/>
<html:hidden property="_desc"/>
<html:hidden property="_currpage"/>
<html:hidden property="_pagelines"/>
<input type="hidden" name="_rowcount" value="<c:out value='${requestScope.LIST.rowCount}' />">
<input type="hidden" name="_channelid" value="<%= channelid %>">
<input type="hidden" name="channelid" value="<%= channelid %>">
<table width="100%" border="3" align="center" cellpadding="6" cellspacing="0" bordercolor="F1F1F1">
<tr colspan="2" height="45">
<td align="right" valign="middle">
<c:if test="${requestScope.TONEWDOCUMENT eq 'TRUE'}">
<input type="button" name="btnNew" value="<s:Language key="new"/>" class="bt-add" onClick="ev_new()">
</c:if>
<input type="button" name="btnDelete" value="<s:Language key="delete"/>" class="bt-del" onClick="doDelete()">
</td>
</tr>
<tr>
<td colspan="2">
<c:forEach var="field" items="${requestScope.FIELDLIST}">
<c:out value='${field.name}'/>:
<%
FormField formfield = (FormField) pageContext.getAttribute("field");
String fieldname = formfield.getName();
String sm_value = request.getParameter("sm_" + fieldname);
String s_value = request.getParameter("s_" + fieldname);
String i_value = request.getParameter("i_" + fieldname);
sm_value = (sm_value!=null)? sm_value : "";
s_value = (s_value!=null)? s_value : "";
i_value = (i_value!=null)? i_value : "";
count++;
%>
<c:if test="${field.fieldtype eq 'VALUE_TYPE_VARCHAR'}" >
<input type="text" name="sm_<c:out value='${field.name}'/>" value="<%=sm_value%>" size="10">
</c:if>
<c:if test="${field.fieldtype eq 'VALUE_TYPE_DATE'}" >
<input type="text" name="s_<c:out value='${field.name}'/>" value="<%=s_value%>" size="10">
</c:if>
<c:if test="${field.fieldtype eq 'VALUE_TYPE_NUMBER'}" >
<input type="text" name="i_<c:out value='${field.name}'/>" value="<%=i_value%>" size="10">
</c:if>
</c:forEach>
<%--<html:submit value="<s:Language key="query"/>" styleClass="bt" onclick="resetPage()"/> --%>
<input type="submit" name="btnQuery" value="<s:Language key="query"/>" class="dysbutton" onclick="resetPage()">
<input type="button" name="btnReset" value="<s:Language key="reset"/>" class="bt" onclick="ev_resetForm()">
</td>
</tr>
<tr>
<td colspan="2" width="100%"> <table border="1" cellpadding="1" width="100%" cellspacing="2" bordercolor="#E5E5E5">
<tr bgcolor="#FF7300">
<td width="2%" title="<s:Language key='sel_or_clear_all_selected'/>" nowrap><input type="checkbox" name="allbox" onclick="checkAll();"></td>
<!--list all the field in channel selected -->
<c:forEach var="field" items="${requestScope.FIELDLIST}">
<%
FormField formfield = (FormField) pageContext.getAttribute("field");
String fieldname = formfield.getName();
String fieldtype = formfield.getFieldtype();
String ordertag = fieldtype + "@" + fieldname;
%>
<td align="center" width="<%=100/count%>%" nowrap><a class="title" href="javascript:doOrderby('<c:out value='${field.fieldtype}'/>@<c:out value='${field.name}'/>')"><font color="#FFFFFF"><c:out value="${field.name}"/></font></a><s:OrderImg form="ParamsTableWrapForm" field="<%=ordertag%>"/></td>
</c:forEach>
<td nowrap align="center"><font color="#FFFFFF"><s:Language key="state"/></font></td>
</tr>
<c:forEach var="item" items="${requestScope.LIST.datas}">
<%
Document documentVO = (Document) pageContext.getAttribute("item");
long id = documentVO.getId();
String url = "/dynaform/document/exploreEdit.do?id="+id + "&formname=" + formname + "&ISEDIT=TRUE";
%>
<tr class="row-content">
<td width="2%"><input type="checkbox" name="_selectitem" value="<c:out value='${item.id}' />" onclick="checkOne(this);"></td>
<!--list all the field value in documents -->
<c:forEach var="field" items="${requestScope.FIELDLIST}" varStatus="status">
<%
String fieldvalue = "";
FormField formfield = (FormField) pageContext.getAttribute("field");
String fieldname = formfield.getName();
if(documentVO!=null&&fieldname!=null&&fieldname.length()>0)
fieldvalue = documentVO.getItemValueAsString(fieldname);
%>
<td align="center" width="100/<%=count%>%">
<c:if test="${status.count eq '1'}">
<a href="javascript:doView('<%=url%>')">
<%
if(fieldvalue == null || fieldvalue.length() <= 0){
fieldvalue = "null";
}
%>
</c:if>
<%=fieldvalue%>
<c:if test="${status.count eq '1'}">
</a>
</c:if>
</td>
</c:forEach>
<td nowrap><%=FlowState.getName(CommonUtil.getStateById(documentVO.getId()))%></td>
</tr>
</c:forEach> </table></td>
</tr>
<tr>
<td height="25" colspan="2" bgcolor="#FFFFFF" align="right"><s:PageNav dpName="LIST"/></td>
</tr>
</table>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -