📄 listchn.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%
String contextPath = request.getContextPath();
out.print(contextPath);
/*
WebUser user = (WebUser)session.getAttribute(Web.SESSION_ATTRIBUTE_USER);
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():"";
*/
%>
<ww: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 src="<%= contextPath %>/js/xml.js"></script>
<script src="<%= contextPath %>/js/select.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/newchn.do';
cmdDelete = '/dynaform/document/delete.do?channelid='+channelid + '&style=0';
cmdPreview = '/dynaform/document/explore.do';
function ev_new() {
if(channelid==''){
alert('<s:Language key="doc_no_module"/>!');
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:choose>
<c:when test="${!empty requestScope.SUMMARYFIELDLIST}">
<c:forEach var="field" items="${requestScope.SUMMARYFIELDLIST}">
if(formList.<c:out value='${field.name}'/>!=null)
formList.<c:out value='${field.name}'/>.value="";
</c:forEach>
</c:when>
<c:otherwise>
<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>
</c:otherwise>
</c:choose>
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>
<xml id="myXML"></xml>
<body style="background-color: #A4C190;">
<ww:form cssStyle="formList" method="post" action="listbychn.action">
<ww:hidden value="n_channelid"/>
<ww:hidden value="sm_$channelids"/>
<ww:hidden value="_orderby"/>
<ww:hidden value="_desc"/>
<ww:hidden value="_currpage"/>
<ww:hidden value="_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 class="dybody" border="0" cellpadding="0" width="817px" cellspacing="0" align="center" style="background-color: #A4C190;">
<tr width="100%">
<td colspan="2" class="list-toolbar" align="left" 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 height="5px">
<td style="background-color: #A4C190;" align="left" colspan="2">
</td>
</tr>
<tr>
<td style="background-color: #A4C190;" width="5px"> </td>
<!--
<td nowrap style="background-color: #A4C190;">
<%
if(summarytmpl.length() > 0){
FormProxy formProxy = new FormProxy();
Form form = formProxy.doView(summarytmpl);
form.setEditmodal(true);
ParamsTable params = ParamsTable.convertHTTP(request);
Collection errors = (Collection)request.getAttribute("ERRORS");
Document document = form.createDocument(params, user);
out.print(form.toHtml(document, params, user, errors));
}else{
%>
<c:forEach var="field" items="${requestScope.FIELDLIST}">
<%
FormField formfield = (FormField) pageContext.getAttribute("field");
String fieldname = formfield.getName();
String fieldalias = formfield.getAlias();
System.out.println("fieldalias==="+ fieldalias);
if (fieldalias!=null && fieldalias.indexOf("$")==0 && fieldalias.length()>1){
fieldalias=fieldalias.substring(1,fieldalias.length());
}
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 : "";
%>
<s:Language key="<%=fieldname%>" />:
<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>
<%}%>
</td>
-->
</tr>
<tr height="5px">
<td style="background-color: #A4C190;" align="left" colspan="2">
</td>
</tr>
<tr height="2">
<td style="background-color: #A4C190;" align="left" colspan="2">
<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="dysbutton" onclick="ev_resetForm()">
</td>
</tr>
<tr height="5px">
<td style="background-color: #A4C190;" align="left" colspan="2">
</td>
</tr>
<tr>
<td style="background-color: #A4C190;" width="5px"> </td>
<td style="background-color: #A4C190;"> <table class="dysbody" border="0" cellpadding="2" cellspacing="1" style="background-color: #A4C190;">
<tr class="dytable-col">
<!--
<td width="15px" title="<s:Language key='sel_or_clear_all_selected'/>" nowrap><input type="checkbox" name="allbox" onclick="checkAll();"></td>
<td width="50px" nowrap><a href="javascript:doOrderby('id')"><font color="#FFFFFF"><s:Language key='code'/></font></a> <s:OrderImg form="ParamsTableWrapForm" field="id"/></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;
String fieldalias = formfield.getAlias();
System.out.println("fieldalias==="+ fieldalias);
if (fieldalias!=null && fieldalias.indexOf("$")==0 && fieldalias.length()>1){
fieldalias=fieldalias.substring(1,fieldalias.length());
}
%>
<td width="100px" class="dytable-col" nowrap><a href="javascript:doOrderby('<c:out value='${field.fieldtype}'/>@<c:out value='${field.name}'/>')"><font color="#FFFFFF"><s:Language key="<%=fieldname%>" /> </font></a><s:OrderImg form="ParamsTableWrapForm" field="<%=ordertag%>"/></td>
</c:forEach>
<td nowrap><font color="#FFFFFF"><s:Language key="currauditor"/></font></td>
<td nowrap><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/view.do?id="+id + "&formname=" + formname;
String writers = "";
if(!documentVO.getState().equals("5")){
writers = CommonUtil.getWriterNames(id);
}
%>
<tr class="dytable-cell">
<td width="15px" >
<% if(documentVO.getState().trim().equals("0") && user.getId() != null && user.getId().equals(documentVO.getAuthorid())){%>
<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 class="dytable-cell" nowrap>
<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><%=writers%></td>
<td nowrap><%=FlowState.getName(documentVO.getState())%></td>
</tr>
</c:forEach> </table></td>
-->
</tr>
<tr>
<td height="25" colspan="3" style="background-color: #A4C190;" align="right"><s:PageNav dpName="LIST"/></td>
</tr>
</table>
</ww:form>
</body>
</ww:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -