authProduct_add.jsp:
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="page" uri="/WEB-INF/tlds/paginated.tld"%>
<%@ taglib prefix="priveliege" uri="/WEB-INF/tlds/priveliege.tld"%>
<%@ taglib uri="/WEB-INF/tlds/pageShow.tld" prefix="pageShow" %>
<%@ include file="../common/language.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><s:text name="msg.portalMS.authProductMgr.list"/>——<s:text name="msg.portalMS.authProductMgr.add"/></title>
<link href="../style/base<%=language_css%>.css" rel="stylesheet" type="text/css" />
<%@ include file="../common/commonJS.jsp" %>
<script type="text/javascript" src="../js/Calendar/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery.validate.js"></script>
<script type="text/javascript" src="../js/ex.jquery.validate.js"></script>
<script type="text/javascript" src="../js/dialogShow.js"></script>
<script type="text/javascript" src="../jsCBB/jquery.js" ></script>
<script type="text/javascript">
jQuery(document).ready(function() {
$( "#authProductMgr.serviceCode" ).focus();
/* 设置默认属性 */
$.validator.setDefaults({
submitHandler: function(form) {
form.submit();
}
});
$.validator.addMethod("checkIp",function(message){
var check=$('input[name=authProduct.jumpFlag][checked]').val();
if(check==0)
{
if(message!='')
{
var strRegex = "^(https|http|ftp|rtsp|mms)?://(.*)";
var ret = new RegExp(strRegex);
if (ret.test(message)) {
return true;
}else{
return false;
}
}
else
{
return false;
}
}
return true;
},'<font color="red">asd!</font>');
$("#addAuthProduct").validate({
rules: {
"authProduct.serviceCode":{
required: true
},
"authProduct.productCode":{
required: true
},
"authProduct.failMessage":{
maxlength:1000,
checkIp:true
}
},
messages: {
"authProduct.serviceCode":{
required: '<s:text name="msg.portalMS.authProductMgr.serviceName.noSelected" />'
},
"authProduct.productCode":{
required: '<s:text name="msg.portalMS.authProductMgr.productName.noSelected" />'
},
"authProduct.failMessage":{
checkIp: '<s:text name="msg.portalMS.authProductMgr.jumpFlag.selected" />',
maxlength: '<s:text name="msg.portalMS.authProductMgr.failMessage.length" />'
}
},
errorPlacement: function(error, element) {
element.next().hide();
error.appendTo( element.parent() );
}
});
});
//返回鉴权产品管理列表
function findProduct(){
var url = "authProductManage.action";
window.location=url;
}
</script>
</head>
<body>
<s:form action="addAuthProduct" theme="simple" οnsubmit="return true;" validate="false" namespace="/product" >
<s:hidden name="authProduct.cityID"/>
<div class="r_main">
<!---导航 --->
<div class="r_nav">
<div class="left"><img src="../images/nav_l.gif" width="5" height="29" /></div>
<div class="ct"><s:text name="msg.portalMS.system.current.position"/><s:text name="msg.portalMS.businessmanagement.name"/> > <s:text name="msg.portalMS.authProductMgr.list"/> > <s:text name="msg.portalMS.authProductMgr.add"/></div>
<div class="right"><img src="../images/nav_r.jpg" width="5" height="29" /></div>
</div>
<!---主体 --->
<div class="info_tit">
<div class="left"><s:text name="msg.portalMS.authProductMgr.add"/></div>
</div>
<div class="page_tb">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="in_table long">
<tr>
<td class="col1 must"><s:text name="msg.portalMS.authProductMgr.serviceName.colon"/></td>
<td width="84%">
<s:textfield id="authProduct.prodofferingName" name="authProduct.serviceName" theme="simple" cssStyle="width:150px" disabled="true"/>
<input type="button" class='mybutton' id="choose.serviceCode" value='<s:text name="msg.portalMS.productMgr.select.product"/>' οnclick="showPage('<s:text name="msg.portalMS.productMgr.select.product"/>','<%=request.getContextPath()%>/product/findService.action',588,566);"/>
<s:hidden id="authProduct.serviceCode" name="authProduct.serviceCode"></s:hidden>
<s:hidden id="serviceName" name="authProduct.serviceName"></s:hidden>
</td>
</tr>
<tr class="bule">
<td class="col1 must1"><s:text name="msg.portalMS.authProductMgr.productName.colon"/></td>
<td width="84%">
<s:textfield id="authProduct.goodsName" name="authProduct.productName" theme="simple" cssStyle="width:150px" disabled="true"/>
<input type="button" id="choose.productCode" class='mybutton' value='<s:text name="msg.portalMS.authProductMgr.product.choose" />' οnclick="showPage('<s:text name="msg.portalMS.authProductMgr.product.choose" />','<%=request.getContextPath()%>/product/findProduct.action',588,566);"/>
<s:hidden id="authProduct.productCode" name="authProduct.productCode"></s:hidden>
<s:hidden id="productName" name="authProduct.productName"></s:hidden>
<s:hidden id="authProduct.status" name="authProduct.status"></s:hidden>
<s:fielderror fieldName="authProduct.productCode" cssStyle="color:red" theme="simple"/>
</td>
</tr>
<tr>
<td class="col1 must2" valign="middle"><s:text name="msg.portalMS.authProductMgr.jumpFlag.colon" /></td>
<td>
<s:radio list="jumpFlags" name="authProduct.jumpFlag" value="authProduct.jumpFlag" tabindex="3"/>
<s:fielderror fieldName="authProduct.jumpFlag" cssStyle="color: red;" />
<br/>
<font color='gray'><s:text name="msg.portalMS.isJump.yes.desc"/></font>
<br/>
<font color='gray'><s:text name="msg.portalMS.isJump.no.desc"/></font>
</td>
</tr>
<tr class="bule">
<td class="col1 must3" valign="middle"><s:text name="msg.portalMS.authProductMgr.relation" />:</td>
<td>
<s:radio list="logicType" name="authProduct.logicType" value="authProduct.logicType" tabindex="4"/>
<s:fielderror fieldName="authProduct.logicType" cssStyle="color: red;" />
<br/>
<font color='gray'><s:text name="msg.portalMS.isRelation.and"/></font>
<br/>
<font color='gray'><s:text name="msg.portalMS.isRelation.or"/></font>
</td>
</tr>
<tr>
<td width="205" class=" col1 must"><s:text name="msg.portalMS.authProductMgr.authtype.colon"/></td>
<td>
<s:select name="authProduct.authType" id="authProduct.authType" list="#{
'1':getText('msg.portalMS.authProductMgr.authtype.arrears'),
'2':getText('msg.portalMS.authProductMgr.authtype.noorder')}"
theme="simple" listKey="key" listValue="value" />
</td>
</tr>
<tr class="bule">
<td class="col1"><s:text name="msg.portalMS.authProductMgr.failMessage.colon"/></td>
<td width="84%">
<s:textarea name="authProduct.failMessage" cols="70" rows="5" cssClass="m_g text_eara"></s:textarea>
<br/>
<font color='gray'><s:text name="msg.portalMS.auth.fail.message.desc"/></font>
</td>
</tr>
<pageShow:pageShow tag="common.cityCode">
<tr>
<td class="col1 must"><s:text name="msg.portalMS.businessMapMgr.city.colon" /></td>
<td>
<s:label name="authProduct.cityName" theme="simple" id="authProduct.cityName" />
<s:hidden name="authProduct.cityID"/>
<font color='gray'> </font>
</td>
</tr>
</pageShow:pageShow>
</table>
<div class="info">
<priveliege:priveliege funCode="addAuthProduct">
<input type="submit" value="<s:text name="msg.portalMS.system.ok"/>" style="width: 66px;background: url(../images/but_guild_1.gif) top center no-repeat;"/>
</priveliege:priveliege>
<input type="button" οnclick="findProduct();setTimeout(function(){load()},tipTime);" value="<s:text name="msg.portalMS.system.goBack"/>" style="width: 66px;background: url(../images/but_guild_1.gif) top center no-repeat;"/>
</div>
</div>
</div>
</s:form>
</body>
</html>
authProduct.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="product" extends="defaults" namespace="/product">
<!-- 查询业务信息 -->
<action name="findService" class="authProductAction" method="findService">
<result name="success">/product/service_list.jsp</result>
</action>
<!-- 查询产品信息 -->
<action name="findProduct" class="authProductAction" method="findProduct">
<result name="success">/product/product_list.jsp</result>
</action>
</package>
</struts>
struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- 后缀*.action(默认值为action) -->
<constant name="struts.action.extension" value="do,action" />
<constant name="struts.devMode" value="true" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.multipart.maxSize" value="1048576000" />
<constant name="struts.locale" value="${localLanguage}" />
<!-- 配置Struts标签访问静态方法 -->
<constant name="struts.ognl.allowStaticMethodAccess" value="true" />
<constant name="struts.custom.i18n.resources"
value="
ApplicationResources,
ApplicationResources_AdminManage,
ApplicationResources_AuthProductManage,
ApplicationResources_BusinessMapManage,
ApplicationResources_RoleManage,
ApplicationResources_LogManage,
ApplicationResources_MessageManage,
ApplicationResources_WebManage,
ApplicationResources_Publish,
ApplicationResources_ResourceManage,
ApplicationResources_Template,
ApplicationResources_Category,
ApplicationResources_SiteManage,
ApplicationResources_IepgParameterManage,
ApplicationResources_widgetManage,
ApplicationResources_IepgParameterManage,
ApplicationResources_Product,
ApplicationResources_DirectoryManage,
ApplicationResources_ChannelManage,
ApplicationResources_BusinessRecommend,
ApplicationResources_GreetingManage,
ApplicationResources_WeatherManage,
ApplicationResources_ChannelTypeManage,
ApplicationResources_BusRecContent,
ApplicationResources_SysAutoPublish,
ApplicationResources_RecSchedule,
ApplicationResources_BusRecContent,
ApplicationResources_ControlMap,
ApplicationResources_Terminal,
ApplicationResources_Application,
ApplicationResources_EmergencyPublish,
ApplicationResources_RecommendImage,
ApplicationResources_RecommendPosition,
ApplicationResources_PacketTask,
ApplicationResources_CommonJS
" />
<include file="struts-default.xml" />
<include file="struts-plugin.xml" />
<package name="defaults" extends="struts-default">
<result-types>
<result-type name="json" class="org.apache.struts2.json.JSONResult"
default="false" />
</result-types>
<interceptors>
<!-- 日志拦截器 -->
<interceptor name="logInterceptor"
class="com.xxxxxx.dhm.portalMS.base.web.interceptor.LogInterceptor">
<param name="includeParams">查询,查找</param>
<param name="excludeClass">com.xxxxxx.sdp.rights.view.action.*</param>
</interceptor>
<!-- 站点信息拦截器(设置siteID) -->
<interceptor name="siteInterceptor"
class="com.xxxxxx.dhm.portalMS.base.web.interceptor.SiteInterceptor"></interceptor>
<interceptor name="json"
class="org.apache.struts2.json.JSONInterceptor" />
<!-- 防止重复提交拦截器 -->
<interceptor name="ExTokenInterceptor"
class="com.xxxxxx.dhm.portalMS.base.web.interceptor.ExTokenInterceptor" />
<!-- 自定义拦截栈 -->
<interceptor-stack name="portalMSInterceptorStack">
<interceptor-ref name="logInterceptor" />
<interceptor-ref name="fileUploadStack" />
<interceptor-ref name="json" />
<interceptor-ref name="i18n" />
<interceptor-ref name="validation">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="ExTokenInterceptor" />
<interceptor-ref name="siteInterceptor" />
</interceptor-stack>
</interceptors>
<!-- 覆盖默认的拦截栈 -->
<default-interceptor-ref name="portalMSInterceptorStack" />
<!-- 全局错误页面配置 -->
<global-results>
<result name="error">/common/error.jsp</result>
<result name="global.error">/common/error.jsp</result>
<result name="global.error.window">/common/error_window.jsp</result>
</global-results>
</package>
<!-- 鉴权产品管理 -->
<include file="struts/authProduct.xml" />
<!-- 模板管理 -->
<include file="struts/template.xml" />
<include file="struts/assetImage.xml" />
<!--海报管理-->
<include file="struts/poster.xml" />
<!-- 报表管理 -->
<include file="struts/report-playTime.xml" />
</struts>
service_list.jsp
<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="page" uri="/WEB-INF/tlds/paginated.tld"%>
<%@ taglib uri="/WEB-INF/tlds/pageShow.tld" prefix="pageShow" %>
<%@ include file="../common/language.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../jsCBB/jquery.js" ></script>
<script type="text/javascript" src="../js/dialogShow.js"></script>
<script type="text/javascript">
function selectProducts(prodofferingCode,prodofferingName)
{
parent.document.getElementById("authProduct.prodofferingName").value = prodofferingName;
parent.document.getElementById("serviceName").value = prodofferingName;
parent.document.getElementById("authProduct.serviceCode").value = prodofferingCode;
}
function submitQuery(){
document.getElementById('findServiceForm').submit();
}
</script>
<title>choose_site</title>
<link href="../style/base<%=language_css%>.css" rel="stylesheet" type="text/css" />
<link href="../style/ui.all.css" rel="stylesheet" type="text/css" />
</head>
<body style="background: none;">
<div class="r_main">
<div id="searchItemSwitchDiv" style="cursor: pointer;margin-top: 10px; margin-bottom: 10px; position: relative;border: 1px solid #97B9DF;background: #EAF2FD;" align="center">
<img id="closeSearchImg" οnclick="changeSearchDiv('close');" title="close" src="../images/search_btn_close.gif"/>
<img id="openSearchImg" style="display: none" οnclick="changeSearchDiv('open');" title="open" src="../images/search_btn_open.gif"/>
</div>
<div id="seachbar"> <span id="seachtxt"><s:text name="msg.portalMS.product.query"/></span>
<s:form action="findService" id="queryForm" theme="simple">
<div >
<ul>
<li><s:text name="msg.portalMS.productmgr.prodofferingCode" /><s:text name="msg.portalMS.colon.label"/>
<s:textfield name="product.prodofferingCode" theme="simple" maxlength="120"></s:textfield></li>
<li><s:text name="msg.portalMS.productmgr.prodofferingName" /><s:text name="msg.portalMS.colon.label"/>
<s:textfield name="product.prodofferingName" theme="simple" maxlength="120"></s:textfield></li>
<li><input type="image" src="../images/button_3_<%=language%>.gif" οnclick="submitQuery();setTimeout(function(){load()},tipTime);" /></li>
<li><input name="reset" border="0" type="image" value='<s:text name="msg.portalMS.system.reset"/>' src="../images/reset_<%=language%>.gif" οnclick="clearForm();"></li>
</ul>
<div class="right"><img src="../images/se_ic.jpg" /></div>
</div>
</s:form>
</div>
<s:if test="pager.totalRows !=0">
<div class="page_tb">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="in_table long">
<tr >
<th width="10%" align="center" ></th>
<th align="center" ><s:text name="msg.portalMS.productmgr.prodofferingCode"/></th>
<th align="center" ><s:text name="msg.portalMS.productmgr.prodofferingName"/></th>
<th align="center" ><s:text name="msg.portalMS.productmgr.accessUrl"/> </th>
<pageShow:pageShow tag="common.cityCode">
<th width="15%" align="center" ><s:text name="msg.portalMS.businessMapMgr.city"/> </th>
</pageShow:pageShow>
</tr>
<s:iterator value="pager" status="ind" id="product">
<tr <s:if test="#ind.index % 2 == 0">class="bule"</s:if> οnmοuseοut="this.style.backgroundColor=''" οnmοuseοver="this.style.backgroundColor='#fffed9'">
<td ><input type="radio" name="prodofferingCode" id="radio2" value="<s:property value="#product.prodofferingCode"/>" οnclick="selectProducts('<s:property value="#product.prodofferingCode"/>','<s:property value="#product.prodofferingName"/>')"/></td>
<td><s:property value="#product.prodofferingCode"/></td>
<td><s:property value="#product.prodofferingName"/></td>
<td ><s:property value="#product.accessUrl" /></td>
<pageShow:pageShow tag="common.cityCode">
<td ><s:property value="#product.cityName" /></td>
</pageShow:pageShow>
</tr>
</s:iterator>
</table>
</div>
</s:if>
<s:if test="pager.totalRows !=0">
<div class="page_line">
<div class="left"><img src="../images/in_l.jpg" width="5" height="30" /></div>
<page:paginated id="1"/>
</div></s:if>
<s:if test="pager.totalRows ==0">
<div class="no_search"><img src="../images/smile_sad.jpg" width="22" height="22" /><s:text name="msg.portalMS.page.no.research.result" /></div>
</s:if>
</div>
</body>
</html>
product_list.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="page" uri="/WEB-INF/tlds/paginated.tld"%>
<%@ taglib uri="/WEB-INF/tlds/pageShow.tld" prefix="pageShow" %>
<%@ include file="../common/language.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../jsCBB/jquery.js" ></script>
<script type="text/javascript" src="../js/dialogShow.js"></script>
<script type="text/javascript">
function selectProducts(goodsCode,goodsName,status)
{
parent.document.getElementById("authProduct.goodsName").value = goodsName;
parent.document.getElementById("productName").value = goodsName;
parent.document.getElementById("authProduct.productCode").value = goodsCode;
parent.document.getElementById("authProduct.status").value = status;
}
function submitQuery(){
document.getElementById('findProductForm').submit();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>choose_site</title>
<link href="../style/base<%=language_css%>.css" rel="stylesheet" type="text/css" />
<link href="../style/ui.all.css" rel="stylesheet" type="text/css" />
</head>
<body style="background: none;">
<div class="r_main">
<div id="searchItemSwitchDiv" style="cursor: pointer;margin-top: 10px; margin-bottom: 10px; position: relative;border: 1px solid #97B9DF;background: #EAF2FD;" align="center">
<img id="closeSearchImg" οnclick="changeSearchDiv('close');" title="close" src="../images/search_btn_close.gif"/>
<img id="openSearchImg" style="display: none" οnclick="changeSearchDiv('open');" title="open" src="../images/search_btn_open.gif"/>
</div>
<div id="seachbar"> <span id="seachtxt"><s:text name="msg.portalMS.product.query"/></span>
<s:form action="findProduct" id="queryForm" theme="simple">
<div >
<ul>
<li><s:text name="msg.portalMS.goods.prodofferingCode" />:
<s:textfield name="goods.goodsCode" theme="simple" maxlength="120"></s:textfield></li>
<li><s:text name="msg.portalMS.category.proname" />:
<s:textfield name="goods.goodsName" theme="simple" maxlength="120"></s:textfield></li>
<li><input type="image" src="../images/button_3_<%=language%>.gif" οnclick="submitQuery() ;setTimeout(function(){load()},tipTime);"/></li>
<li><input name="reset" border="0" type="image" value='<s:text name="msg.portalMS.system.reset"/>' src="../images/reset_<%=language%>.gif" οnclick="clearForm();"></li>
</ul>
<div class="right"><img src="../images/se_ic.jpg" /></div>
</div>
</s:form>
</div>
<s:if test="pager.totalRows !=0">
<div class="page_tb">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="in_table long">
<tr >
<th width="10%" align="center" ></th>
<th align="center" ><s:text name="msg.portalMS.goods.prodofferingCode" /></th>
<th align="center" ><s:text name="msg.portalMS.category.proname" /></th>
<pageShow:pageShow tag="common.cityCode">
<th width="15%" align="center" ><s:text name="msg.portalMS.businessMapMgr.city"/> </th>
</pageShow:pageShow>
</tr>
<s:iterator value="pager" status="ind" id="goods">
<tr <s:if test="#ind.index % 2 == 0">class="bule"</s:if> οnmοuseοut="this.style.backgroundColor=''" οnmοuseοver="this.style.backgroundColor='#fffed9'">
<td ><input type="radio" name="goodsCode" id="radio2" value="<s:property value="#goods.goodsCode"/>" οnclick="selectProducts('<s:property value="#goods.goodsCode"/>','<s:property value="#goods.goodsName"/>','<s:property value="#goods.status"/>')"/></td>
<td><s:property value="#goods.goodsCode"/></td>
<td><s:property value="#goods.goodsName"/>
<s:if test="#goods.status == 1"><span style="color:#ff0000;margin: 0px; padding: 0px;">(<s:text name="msg.portalMS.system.pause"/>)</span></s:if>
</td>
<pageShow:pageShow tag="common.cityCode">
<td><s:property value="#goods.cityName"/></td>
</pageShow:pageShow>
</tr>
</s:iterator>
</table>
</div>
</s:if>
<s:if test="pager.totalRows !=0">
<div class="page_line">
<div class="left"><img src="../images/in_l.jpg" width="5" height="30" /></div>
<page:paginated id="1"/>
</div></s:if>
<s:if test="pager.totalRows ==0">
<div class="no_search"><img src="../images/smile_sad.jpg" width="22" height="22" /><s:text name="msg.portalMS.page.no.research.result" /></div>
</s:if>
</div>
</body>
</html>
service_list.jsp