- 浏览: 206860 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
werty45775:
<property name="allowUr ...
Spring mvc 拦截器 配置心得 -
fly_to_the_winds:
请问能拦截.jsp结尾的访问吗?
Spring mvc 拦截器 配置心得 -
yong230:
楼主能把这个SessionTimeoutException类贴 ...
Spring mvc 拦截器 配置心得 -
daoyongyu:
楼主写的挺好,谢谢!
我补充一下映射路径的说明:
<mv ...
Spring mvc 拦截器 配置心得 -
liruihui:
不好使,骗人的
The method getJspApplicationContext(ServletContext) is undefined for the typ
<%@ page pageEncoding="UTF-8"%>
<%@ page language="java" import="java.util.*" errorPage=""%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="newstag" uri="http://www.sobey.com/news/taglib/news"%>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/jquery.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/widgets/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/widgets/ext/ext-all.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/widgets/ext/resources/dateTimeFieldAddSecond.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/tree.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/hpmIconBinding.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/hpmsBusinessBehaviorStore.js" /></script>
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/css/tree2.css" />
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/styles/css.css" />
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/widgets/ext/resources/css/ext-all.css" />
<link rel="STYLESHEET" type="text/css"
href="<%=request.getContextPath()%>/styles/page.css" />
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '<c:url value="/widgets/ext/resources/images/default/s.gif"/>';
var folderSelector = null;
</script>
<html>
<script language="javascript" type="text/javascript">
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body onload="">
<%@ include file="/widgets/peopleTree/treeV3.jsp"%>
<table height="40" border="0" style="margin-left: 10px; margin-top: 5px"
cellpadding="0" cellspacing="0">
<tr>
<%--左侧树形框--%>
<td valign="top" height="660">
<table width="320" height="660" cellpadding="0" cellspacing="0"
bordercolorlight="#FFFFFF" bordercolordark="#003366" border="1"
bgcolor="#535552" style="margin-left: 10px; margin-top: 3px">
<tr>
<td align="left" valign="top" height="100%">
<div id="exttree-div" style="width: 250px;"></div>
</td>
</tr>
</table>
</td>
<%--右侧列表框--%>
<td>
<table width="640" height="660" cellpadding="0" cellspacing="0"
bordercolorlight="#FFFFFF" bordercolordark="#003366" border="1"
bgcolor="#535552" style="margin-left: 10px; margin-top: 3px">
<tr>
<td align="left" valign="top" height="100%">
<div id="scoreGrade_center" oncontextmenu="return false;">
<div id="list_grid_panel" style="width: 100%; height: 100%;"></div>
<div id="listColumnPolicy"></div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 栏目策略设置 -->
<div id="editColumnPolicy_Panel"
style="visibility: hidden; position: absolute; top: 0px">
<div class="x-dlg-hd"><bean:message
key="columnpolicy.label.titleSet" /></div>
<div class="x-dlg-bd">
<div class="x-dlg-tab"
title="<bean:message key="columnpolicy.label.titleSet"/>">
<div class="inner-tab">
<form id="editColumnPolicyForm" method="POST"
action="<c:url value='/channel/saveColumnPolicy.do'/>">
<table border="0" width="100%" cellpadding="0" cellspacing="0"
align="left" style="margin: 10px 0px 0px 15px" id="policyTab">
<tr class="utype">
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.useType" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="useType" key="${columnPolicy.usetype}"
id="columnPolicy.usetype" name="columnPolicy.usetype">
<option></option>
</newstag:basicdatalist></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.sendType" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="sendtype" key="${columnPolicy.sendtype}"
id="columnPolicy.sendtype" name="columnPolicy.sendtype">
<option></option>
</newstag:basicdatalist></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.serverIp" />:</td>
<td align="left"><input name="columnPolicy.serverip"
id="columnPolicy.serverip" type="text" size="10"></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.mosId" />:</td>
<td align="left"><input name="columnPolicy.mosid"
id="columnPolicy.mosid" type="text" size="10"></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.isChannel" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="ischannel" key="" id="columnPolicy.ischannel"
name="columnPolicy.ischannel">
<option></option>
</newstag:basicdatalist> <input type="hidden" id="columnPolicy.policyid"
name="columnPolicy.policyid" value="${columnPolicy.policyid}">
<input type="hidden" id="columnPolicy.columnid"
name="columnPolicy.columnid" value="${columnPolicy.columnid}">
</td>
</tr>
<tr>
<td height="25" align="left" width="120">备注:</td>
<td align="left"><textarea rows="3" cols="15"
name="columnPolicy.notes" id="columnPolicy.notes"><c:out
value="${columnPolicy.notes}" /></textarea></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!-- 栏目参数配置 -->
<div id="columnPathConfig_Panel"
style="visibility: hidden; position: absolute; top: 0px">
<div class="x-dlg-hd"><bean:message
key="columnpolicy.label.columnPathConfig" /></div>
<div class="x-dlg-bd">
<div class="x-dlg-tab"
title="<bean:message key="columnpolicy.label.columnPathConfig"/>">
<div class="inner-tab">
<form id="editColumnPathConfigForm" method="POST"
action="<c:url value='/channel/saveColumnPathConfig.do'/>">
<div id="treeSelector" style="display: none;"></div>
<table id="cmsdata" border="0" width="100%" cellpadding="0" cellspacing="0"
align="left" style="margin: 10px 0px 0px 15px">
<tr><td height="25"></td></tr>
<c:forEach var="t" items="${basicDataType}">
<tr class="program" typeid="${t.id}">
<td height="25" align="left" width="180">${t.data}节目目录:</td>
<td align="left">
<input name="basicDataType_programid" class='folderId' type="text" size="10" readonly="readonly" />
<input type="button" value="选择" siteType="${t.id}" class="folderSelector" />
<input type="hidden" class="siteId" name="siteidContainer"/>
</td>
</tr>
<tr class="material" typeid="${t.id}">
<td height="25" align="left" width="180">${t.data}素材目录:</td>
<td align="left">
<input name="basicDataType_materialid" type="text" size="10" class='folderId' readonly="readonly" />
<input type="button" value="选择" siteType="${t.id}" class="folderSelector" />
<input type="hidden" class="siteId" name="siteidContainer"/>
</td>
</tr>
</c:forEach>
<tr>
<td><bean:message key="columnpolicy.label.columnTaskType" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="column_task_type" key="" id="columnTaskType"
name="columnTaskType">
<option></option>
</newstag:basicdatalist>
<input type="hidden" id="policyid" name="policyid" value="${columnPolicy.policyid}">
<input type="hidden" id="MLcolumnid" name="columnPolicy.columnid" value="${columnPolicy.columnid}">
<input type="hidden" id="basicDataTypeArray" name="basicDataTypeArray" >
<input type="hidden" id="useType" name="useType" >
</td>
</tr>
<tr><td><div id="configContent" style="display: block; color: red"></div></td></tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!--栏目设置 -->
<div id="edit_Panel"
style="visibility: hidden; position: absolute; top: 0px">
<div class="x-dlg-hd"><bean:message key="label.page.title" /></div>
<div class="x-dlg-bd">
<div class="x-dlg-tab" title="<bean:message key="label.page.title"/>">
<div class="inner-tab">
<form id="editForm" method="POST"
action="<c:url value='/channel/saveObject.do'/>">
<table id='cmsTable' border="0" width="100%" cellpadding="0" cellspacing="0"
align="left" style="margin: 10px 0px 0px 15px">
<tr>
<td height="25" align="left"><bean:message
key="label.page.nodetype" />:</td>
<td align="left"><input name="nodeType" id="nodeType" type="text"
size="20" readonly="readonly"></td>
</tr>
<tr>
<td height="25" align="left"><bean:message
key="label.page.nodename" />:</td>
<td align="left"><input name="vo.CName" id="vo.CName" type="text"
size="20"> <input type="hidden" name="vo.PID" id="vo.PID" />
<input type="hidden" name="vo.CID" id="vo.CID" /> <input
type="hidden" name="vo.leaf" id="vo.leaf" /> <input type="hidden"
name="vo.depth" id="vo.depth" /> <input type="hidden"
name="vo.CCode" id="vo.CCode" /> <input type="hidden"
name="vo.ownCanModify" id="vo.ownCanModify" /></td>
</tr>
<tr id="isShowdate">
<td height="25" align="left">播出时间:</td>
<td align="left"><input readonly="readonly" name="vo.showdate"
id="vo.showdate" style="width: 125px"
value='<fmt:formatDate value="${vo.showdate}" pattern="yyyy-MM-dd HH:mm:ss"/>' />
</td>
</tr>
<tr id="temp1">
<td height="40" align="left"><input type="checkbox"
name="checkbox" id="checkbox"></td>
<td align="left">
<div style="width: 150px">允许用户在没有权限情况下修改和删除自己建的资源
<div>
</td>
</tr>
<tr id="Note">
<td height="25" align="left"><bean:message
key="label.page.nodenote" />:</td>
<td align="left"><input name="vo.CNote" id="vo.CNote" type="text">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//Ext TREE
var _tempTree;
var selectedNode;
var parentNode;
var columnpolicyDialog;
var columnPathConfigDialog;
var explorerPanelDialog;
var RepSelM;
var dataSource;
var dateField;
//初始化ext date
var extDateArray=new Array();
initExtDate=function(){
var shotDateTimeExt=new Ext.form.DateTimeFieldAddSecond({
allowBlank:true,
format:'Y-m-d H:i:s'
});
shotDateTimeExt.applyTo('vo.showdate');
extDateArray.push(shotDateTimeExt);
}
function DataItem(){
this.programFolder=new Object();
this.programSite=new Object();
this.materialFolder=new Object();
this.materialSite=new Object();
}
function obj2str(o){
var r = [];
if(typeof o =="string") return "\""+o.replace(/([\'\"\\])/g,"\\$1").replace(/(\n)/g,"\\n").replace(/(\r)/g,"\\r").replace(/(\t)/g,"\\t")+"\"";
if(typeof o == "object"){
if(!o.sort){
for(var i in o)
r.push(i+":"+obj2str(o[i]));
if(!!document.all && !/^\n?function\s*toString\(\)\s*\{\n?\s*\[native code\]\n?\s*\}\n?\s*$/.test(o.toString)){
r.push("toString:"+o.toString.toString());
}
r="{"+r.join()+"}";
}else{
for(var i =0;i<o.length;i++){
r.push(obj2str(o[i]));
}
r="["+r.join()+"]";
}
return r;
}
return o.toString();
}
Ext.onReady(function(){
initExtDate();
var Tree = Ext.tree;
var mytreeLoader = new Tree.TreeLoader({
dataUrl:'<c:url value="/channel/getAllChannelByPID.do"/>'
});
mytreeLoader.on("beforeload", function(treeLoader, node) {
this.baseParams.id = node.attributes.id;
this.baseParams.depth = node.getDepth();
}, mytreeLoader);
_tempTree = new Tree.TreePanel('exttree-div', {
animate:true,
loader: mytreeLoader,
enableDD:false,
containerScroll: true
});
// set the root node
var root = new Tree.AsyncTreeNode({
text: "<bean:message key="label.root.title"/>",
draggable:false,
id:'0'
});
_tempTree.on("click", function(node, eventObject) {
selectedNode = node;
clearContent();
refreshGrid();
}, _tempTree);
_tempTree.on("dblclick", function(node, eventObject) {
selectedNode = node;
editChildren();
}, _tempTree);
_tempTree.on("contextmenu", function(node, eventObject) {
selectedNode = node;
var menu = new Ext.menu.Menu();
var item;
if(selectedNode.getDepth() < 3){
item = menu.add({text:"<bean:message key="label.menu.add"/>",handler:function(){addChildren();}});
}
if(selectedNode.getDepth() > 0){
item = menu.add({text:"<bean:message key="label.menu.update"/>",handler:function(){editChildren();}});
item = menu.add({text:"<bean:message key="label.menu.delete"/>",handler:function(){removeChildren();}});
}
item = menu.add({text:"<bean:message key="label.menu.refresh"/>",handler:function(){refreshTree();}});
var coords = eventObject.getXY();
menu.showAt([coords[0], coords[1]]);
}, _tempTree);
_tempTree.setRootNode(root);
_tempTree.render();
root.expand();
initMainGrid();
changeStatus();
<%--选择按钮点击事件 start --%>
$('.folderSelector').live('click',function(){
var trigger = $(this);
var siteType = trigger.attr('siteType');
$('#treeSelector').empty();
$('#treeSelector').css('left', trigger.position().left+50).css('top',trigger.position().top);
$('#treeSelector').show();
constructFolderSelector('', '','',siteType,function() {
trigger.parent().find('.folderId').val(this.getData().id);
trigger.parent().find('.siteId').val(this.getData().siteId);
$('#treeSelector').hide();
});
});
<%--method start --%>
function constructFolderSelector(url,username,password, type, callback) {
var rootData = {
id : '0',
siteId:'0',
label : '选择根目录',
businessType : 'folder',
nodeType : 'ajax',
folderType:type,
expand : true
};
var businessBehaviorStore = {
'folder' : {
'click' : callback,
'loadChildrenData' : function(){
var node = this;
return this.loadJSON('/news-manage/configuration/getFolderChildren.do',{
siteId:this.getData().siteId,
rootId:this.getData().id,
folderType:this.getData().folderType
});
}
}
};
var optionsData = {
target : '#folderSelector',
businessBehaviorStore : businessBehaviorStore,
businessIconStore : hpmIconBinding,
menu : null
}
if (folderSelector) {
folderSelector.options.functions.destory(folderSelector);
}
$('#treeSelector').show();
folderSelector = $('#treeSelector').tree(optionsData, rootData);
}
<%--method end --%>
<%-- onChange start --%>
$("[id='columnPolicy.usetype']").change(function(){
var a=$("[id='columnPolicy.usetype']").val();
var notes = document.getElementById("columnPolicy.notes").value;
document.getElementsByName("basicDataType_programid").value="";
document.getElementsByName("basicDataType_materialid").value="";
if(a==30){
columnpolicyDialog.hide();
columnPathConfigPolicy();
return;
}else{
showColumnpolicyDialog();
}
});
<%-- onChange end --%>
});
//编辑节点
var editChildren = function(){
showExplorerPanelDialog();
var depth = selectedNode.getDepth();
var id = selectedNode.id;
document.getElementById("vo.showdate").value = "";
Ext.Ajax.request({
url: '<c:url value="/channel/getObjectByID.do"/>?id=' + id + "&depth=" + depth,
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
var obj = json.vo;
document.getElementById("checkbox").checked = false;
document.getElementById("vo.CName").value = obj.CName;
document.getElementById("vo.CCode").value = obj.CCode;
document.getElementById("vo.PID").value = obj.PID;
document.getElementById("vo.CID").value = obj.CID;
document.getElementById("vo.depth").value = depth;
document.getElementById("vo.ownCanModify").value = obj.ownCanModify;
if(obj.showdate != null){
document.getElementById("vo.showdate").value = obj.showdate;
}
if(depth == 1){
document.getElementById("vo.CNote").value = obj.CNote;
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.channel"/>";
document.getElementById("note").style.display = '';
document.getElementById("isShowdate").style.display = 'none';
document.getElementById("temp1").style.display = 'none';
}else if(depth == 2){
document.getElementById("vo.CNote").value = obj.CNote;
var a2 = "<bean:message key="label.nodeType.timesect"/>";
$('#nodeType').val(a2);
$('#note').show();
$('#isShowdate').hide();
document.getElementById("temp1").style.display = 'none';
}else if(depth == 3){
document.getElementById("vo.CNote").value = "";
var aaa = "<bean:message key="label.nodeType.column"/>";
$('#nodeType').val(aaa);
$('#note').hide();
document.getElementById("isShowdate").style.display = '';
document.getElementById("temp1").style.display = '';
if(document.getElementById("vo.ownCanModify").value == 1){
document.getElementById("checkbox").checked = true;
}
}
explorerPanelDialog.show();
}
},
failure: function () {
Ext.MessageBox.alert("581","<bean:message key="label.action.operationfailed"/>");
}
});
}
var showExplorerPanelDialog = function(){
if(!explorerPanelDialog){
explorerPanelDialog = new Ext.BasicDialog('edit_Panel', {
autoTabs:true,
width:550,
height:350,
shadow:false,
minWidth:300,
minHeight:300,
proxyDrag: true,
modal:true,
resizable: true
});
explorerPanelDialog.setContentSize(300, 300);
explorerPanelDialog.center();
explorerPanelDialog.addKeyListener(27, explorerPanelDialog.hide, explorerPanelDialog);
explorerPanelDialog.addButton("<bean:message key="label.page.ok"/>", saveChildren, explorerPanelDialog);
explorerPanelDialog.addButton("<bean:message key="label.page.cancel"/>", explorerPanelDialog.hide, explorerPanelDialog);
}
}
//增加节点
var addChildren = function(){
showExplorerPanelDialog();
var depth = selectedNode.getDepth() + 1;
if(depth == 4){
Ext.MessageBox.alert("","<bean:message key="label.action.nocreate"/>");
return;
}
document.getElementById("checkbox").checked = false;
var pid = selectedNode.id;
document.getElementById("vo.PID").value = pid;
document.getElementById("vo.CName").value = "";
document.getElementById("vo.CCode").value = "";
document.getElementById("vo.CNote").value = "";
document.getElementById("vo.CID").value = "";
document.getElementById("vo.depth").value = depth;
if(depth == 1){
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.channel"/>";
document.getElementById("note").style.display = '';
document.getElementById("temp1").style.display = 'none';
}else if(depth == 2){
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.timesect"/>";
document.getElementById("note").style.display = '';
document.getElementById("temp1").style.display = 'none';
}else if(depth == 3){
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.column"/>";
document.getElementById("note").style.display = 'none';
document.getElementById("temp1").style.display = '';
}
explorerPanelDialog.show();
}
//删除节点
var removeChildren = function(){
showExplorerPanelDialog();
selectedNode.expand(1,true,function(){
if(selectedNode.childNodes.length > 0){
Ext.MessageBox.alert("","<bean:message key="label.action.nodelete"/>");
return false;
}
if(selectedNode.childNodes.length <= 0 && window.confirm("<bean:message key="msg.channel.dodelete"/>")){
var depth = selectedNode.getDepth();
//从后台得到数据
Ext.Ajax.request({
url: '<c:url value="/channel/removeObject.do"/>?id=' +selectedNode.id + "&depth=" + depth,
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var pNode = selectedNode.parentNode;
pNode.removeChild(selectedNode);
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}
},
failure: function () {
Ext.MessageBox.alert("660","<bean:message key="label.action.operationfailed"/>");
}
});
}
});
}
//保存节点
var saveChildren = function(){
if(document.getElementById("vo.CName").value == ""){
alert("<bean:message key="label.action.nameisnull"/>");return false;
}
var depth = selectedNode.getDepth();
if (depth=="3") {
if(document.getElementById("vo.showdate").value == ""){
alert("播出时间不能为空");return false;
}
}
if(document.getElementById("checkbox").checked == true){
document.getElementById("vo.ownCanModify").value = 1;
}else{
document.getElementById("vo.ownCanModify").value = 0;
}
explorerPanelDialog.hide();
Ext.Ajax.request({
form: document.forms["editForm"],
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
if(document.getElementById("vo.CID").value != ""){
//修改后的设置
selectedNode.setText(document.getElementById("vo.CName").value);
}else{
var ID = json.ID;
//新增后的设置
var node = new Ext.tree.TreeNode({id:ID, text:document.getElementById("vo.CName").value});
selectedNode.appendChild(node);
selectedNode.expand();
}
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}
},
failure: function () {
Ext.MessageBox.alert("704","<bean:message key="label.action.operationfailed"/>");
}
});
}
//刷新菜单
var refreshTree = function(){
_tempTree.root.reload();
}
//初始化右侧栏目策略grid
function initMainGrid(){
var rowclick=function(grid,rowindex,e){
var Ite=Ext.menu.Item;
var addItem=new Ite({
text: "<bean:message key="columnpolicy.label.add"/>",
icon:"../images/add.png",
handler: function(ite, e){
addColumnPolicy();
}
});
var editItem=new Ite({
text: "<bean:message key="columnpolicy.label.update"/>",
icon:"../images/edit.png",
handler: function(ite, e){
editColumnPolicy();
}
});
var deleteItem=new Ite({
text: "<bean:message key="columnpolicy.label.delete"/>",
icon:"../images/del.png",
handler: function(ite, e){
delColumnPolicy();
}
});
var cMenu = new Ext.menu.Menu({
id: 'cmtmenu', // the menu's id we use later to assign as submenu
items: [addItem,editItem,deleteItem]
});
cMenu.show(e.getTarget());
};
var rowdbclick=function(grid,rowindex,e){
editColumnPolicy();
};
var fm = Ext.form,
Ed = Ext.grid.GridEditor,
Sm=Ext.grid.RowSelectionModel;
var selModel=new Sm({singleSelect:true});
var cm = new Ext.grid.ColumnModel([{
header: "<bean:message key="columnpolicy.label.useType"/>",
dataIndex: 'usetypeString',
width: 150
},{
header: "<bean:message key="columnpolicy.label.sendType"/>",
dataIndex: 'sendtypeString',
width: 150
},{
header: "<bean:message key="columnpolicy.label.serverIp"/>",
dataIndex: 'serverip',
width: 150
},{
header: "<bean:message key="columnpolicy.label.mosId"/>",
dataIndex: 'mosid',
width: 150
}]);
cm.defaultSortable = true;
var Plant = Ext.data.Record.create([
{name: 'usetypeString', type: 'string'},
{name: 'sendtypeString', type: 'string'},
{name: 'serverip', type: 'string'},
{name: 'mosid', type: 'string'}
]);
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"<%=request.getContextPath()%>/channel/queryNewsColumnpolicy.do"}),
reader: new Ext.data.JsonReader({root:'data',id:'gradeid',
totalProperty: 'total'}, Plant)
});
dataSource = ds;
var grid = new Ext.grid.EditorGrid('listColumnPolicy', {
ds: ds,
cm: cm,
selModel:selModel,
enableColLock:false,
loadMask: true
});
RepSelM=selModel;
var layout = Ext.BorderLayout.create({
center: {
margins:{left:0,top:0,right:0,bottom:0},
panels: [new Ext.GridPanel(grid)]
}
}, 'list_grid_panel');
grid.addListener("rowcontextmenu",rowclick);
grid.addListener("rowdblclick",rowdbclick);
grid.render();
var gridHead = grid.getView().getHeaderPanel(true);
var tb = new Ext.Toolbar(gridHead, [{
text: '<bean:message key="columnpolicy.label.toolMenu"/>',
menu:{
id:"first_menu",
items:[{
text: "<bean:message key="columnpolicy.label.add"/>",
icon:"../images/add.png",
handler: addColumnPolicy
},{
text: "<bean:message key="columnpolicy.label.update"/>",
icon:"../images/edit.png",
handler: editColumnPolicy
}, {
text: "<bean:message key="columnpolicy.label.delete"/>",
icon:"../images/del.png",
handler: delColumnPolicy
}]
}
}]);
var gridFoot = grid.getView().getFooterPanel(true);
// add a paging toolbar to the grid's footer
var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 20,
displayInfo: true,
displayMsg: '{0}-{1}/{2}',
emptyMsg: 'No records'
});
ds.load({params:{start:0, limit:20}});
}
//添加栏目策略
function addColumnPolicy(){
if(!selectedNode){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
//当此对话框出现时,触发change事件,确保select的初始值不变
document.getElementById("columnPolicy.usetype").value = 10;
$("[id='columnPolicy.usetype']").trigger('change');
var depth = selectedNode.getDepth();
var id = selectedNode.id;
if(depth==0||depth==2){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
document.getElementById("policyid").value = "";
if(depth==1){//频道策略
document.getElementById("columnPolicy.ischannel").value = 1;
document.getElementById("columnPolicy.columnid").value = id;
}else if(depth==3){//栏目策略
document.getElementById("columnPolicy.ischannel").value = 0;
document.getElementById("columnPolicy.columnid").value = id;
}
showColumnpolicyDialog();
columnpolicyDialog.show();
}
//栏目参数配置
function columnPathConfigPolicy(){
if(!selectedNode){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
var depth = selectedNode.getDepth();
var id = selectedNode.id;
if(depth==0||depth==2){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
document.getElementById("MLcolumnid").value = id;
showColumnPathConfigDialog();
columnPathConfigDialog.show();
}
function showColumnpolicyDialog(){
if (!columnpolicyDialog){
columnpolicyDialog = new Ext.BasicDialog("editColumnPolicy_Panel",{
autoTabs:true,
width:550,
height:350,
shadow:false,
minWidth:300,
minHeight:300,
proxyDrag: true,
modal:true,
resizable: false
});
columnpolicyDialog.addKeyListener(27, columnpolicyDialog.hide, columnpolicyDialog);
columnpolicyDialog.addButton("<bean:message key="label.page.ok"/>", saveColumnPolicy, columnpolicyDialog);
columnpolicyDialog.addButton("<bean:message key="label.page.cancel"/>", columnpolicyDialog.hide, columnpolicyDialog);
}
}
//栏目参数配置对话框
function showColumnPathConfigDialog(){
if (!columnPathConfigDialog){
columnPathConfigDialog = new Ext.BasicDialog("columnPathConfig_Panel",{
autoTabs:true,
width:550,
height:350,
shadow:false,
minWidth:300,
minHeight:300,
proxyDrag: true,
modal:true,
resizable: false
});
columnPathConfigDialog.addKeyListener(27, columnPathConfigDialog.hide, columnPathConfigDialog);
columnPathConfigDialog.addButton("<bean:message key="label.page.ok"/>", saveColumnPathConfig, columnPathConfigDialog);
columnPathConfigDialog.addButton("<bean:message key="label.page.cancel"/>", columnPathConfigDialog.hide, columnPathConfigDialog);
}
}
//编辑栏目策略
function editColumnPolicy(){
if(!RepSelM.getSelected()){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectOne"/>");
return;
}
showColumnpolicyDialog();
document.getElementById("columnPolicy.usetype").value = RepSelM.getSelected().json.usetype;
document.getElementById("columnPolicy.policyid").value = RepSelM.getSelected().json.policyid;
document.getElementById("columnPolicy.sendtype").value = RepSelM.getSelected().json.sendtype;
document.getElementById("columnPolicy.serverip").value = RepSelM.getSelected().json.serverip;
document.getElementById("columnPolicy.mosid").value = RepSelM.getSelected().json.mosid;
document.getElementById("columnPolicy.ischannel").value = RepSelM.getSelected().json.ischannel;
document.getElementById("columnPolicy.columnid").value = RepSelM.getSelected().json.columnid;
// document.getElementById("columnPolicy.notes").value = RepSelM.getSelected().json.notes == "" ? "" : Ext.util.JSON.encode(RepSelM.getSelected().json.notes);
//内容管理参数的id约定为30,如果是操作的对象是内容管理参数,则进行以下操作
var a=$("[id='columnPolicy.usetype']").val();
if(a==30){
// alert(RepSelM.getSelected().json.policyid);
//将数据库返回的json值赋值给data , 这个值是string格式的
var data = RepSelM.getSelected().json.notes == "" ? "" : Ext.util.JSON.encode(RepSelM.getSelected().json.notes);
//将string转换成json
var c = eval('('+data+')');
var programSite = new Array();
var materialFolder = new Array();
var materialSite = new Array();
var programFolder = new Array();
var columnTaskType = null;
//遍历这个json数据,将相同名字的值传到相应的数组里面
var num=0;
for(var i in c){
if(typeof(c[i]) == "string"){
columnTaskType=c[i];
}else{
programSite[num] = c[i].programSite;
materialFolder[num] = c[i].materialFolder;
materialSite[num] = c[i].materialSite;
programFolder[num] = c[i].programFolder;
num++;
}
}
//将值赋值给相应的控件
$('#cmsdata .program').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
$tr.find('.folderId').attr("value",programFolder[typeid]);
$tr.find('.siteId').attr("value",programSite[typeid]);
});
$('#cmsdata .material').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
$tr.find('.folderId').attr("value",materialFolder[typeid]);
$tr.find('.siteId').attr("value",materialSite[typeid]);
});
document.getElementById("columnTaskType").value = columnTaskType;
document.getElementById("policyid").value = RepSelM.getSelected().json.policyid;
columnpolicyDialog.hide();
columnPathConfigPolicy();
return;
}
columnpolicyDialog.show();
}
//删除栏目策略
function delColumnPolicy(){
if(!RepSelM.getSelected()){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectOne"/>");
return;
}
Ext.Ajax.request({
url: '<c:url value="/channel/removeColumnPolicy.do"/>?columnPolicy.policyid=' +RepSelM.getSelected().json.policyid,
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
if(json&&json.message){
if(json.message="success"){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}
refreshGrid();
}
}
},
failure: function () {
Ext.MessageBox.alert("926","<bean:message key="label.action.operationfailed"/>");
}
});
}
//保存栏目策略
function saveColumnPolicy(){
columnpolicyDialog.hide();
document.getElementById("columnPolicy.ischannel").disabled=false;
Ext.Ajax.request({
form: document.forms["editColumnPolicyForm"],
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
//alert(json.columnPolicy.policyid);
if(json.isok == "true" && json.columnPolicy.policyid){
document.getElementById("columnPolicy.policyid").value = json.columnPolicy.policyid;
refreshGrid();
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}else{
Ext.MessageBox.alert("","保存失败!已有相同类型的策略!");
}
}
},
failure: function () {
Ext.MessageBox.alert("erorr","<bean:message key="label.action.operationfailed"/>");
}
});
changeStatus();
}
//保存栏目参数配置
function saveColumnPathConfig(){
getBasicDataType();
columnPathConfigDialog.hide();
Ext.Ajax.request({
form: document.forms["editColumnPathConfigForm"],
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
//alert(json.columnPolicy.policyid);
if(json.isok == "true" && json.columnPolicy.policyid){
document.getElementById("policyid").value = json.columnPolicy.policyid;
refreshGrid();
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}else{
Ext.MessageBox.alert("","保存失败!已有相同类型的配置!");
}
}
},
failure: function () {
Ext.MessageBox.alert("949","<bean:message key="label.action.operationfailed"/>");
}
});
changeStatus();
}
//得到基础数据,传给ChannelManageCommand.java 的saveColumnPathConfig()的basicDataTypeArray
function getBasicDataType(){
var data = {};
$('#cmsdata .program').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
data[typeid]=new DataItem();
data[typeid].programFolder = $tr.find('.folderId').val();
data[typeid].programSite = $tr.find('.siteId').val();
});
$('#cmsdata .material').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
data[typeid].materialFolder = $tr.find('.folderId').val();
data[typeid].materialSite = $tr.find('.siteId').val();
});
document.getElementById("basicDataTypeArray").value = obj2str(data);
document.getElementById("useType").value = $("[id='columnPolicy.usetype']").val();;
}
//刷新grid
function refreshGrid(){
var depth = selectedNode.getDepth();
var id = selectedNode.id;
if(depth==0||depth==2){
return;
}
var args={};
if(id!=null)
args.columnid=id;
if(depth!=null){
args.depth=depth;
}
args.start = 0;
args.limit = 20;
dataSource.load({params:args});
}
//改变各状态
function changeStatus(){
document.getElementById("columnPolicy.ischannel").disabled=true;
}
//清空内容管理目录,在每次节点点击事件的时候调用
function clearContent(){
$('#cmsdata .program').each(function(i){
var $tr = $(this);
$tr.find('.folderId').attr("value","");
$tr.find('.siteId').attr("value","");
});
$('#cmsdata .material').each(function(i){
var $tr = $(this);
$tr.find('.folderId').attr("value","");
$tr.find('.siteId').attr("value","");
});
document.getElementById("policyid").value="";
}
</script>
</html>
============================================================
今天终于把最后一个bug解决了,感觉后台的东西都好搞定,jquery前台的赋值取值技术要是不熟就只有傻眼了,看来要加强这方面的练习.
<%@ page language="java" import="java.util.*" errorPage=""%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="newstag" uri="http://www.sobey.com/news/taglib/news"%>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/jquery.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/widgets/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/widgets/ext/ext-all.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/widgets/ext/resources/dateTimeFieldAddSecond.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/tree.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/hpmIconBinding.js" /></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/tree/hpmsBusinessBehaviorStore.js" /></script>
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/css/tree2.css" />
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/styles/css.css" />
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/widgets/ext/resources/css/ext-all.css" />
<link rel="STYLESHEET" type="text/css"
href="<%=request.getContextPath()%>/styles/page.css" />
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '<c:url value="/widgets/ext/resources/images/default/s.gif"/>';
var folderSelector = null;
</script>
<html>
<script language="javascript" type="text/javascript">
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body onload="">
<%@ include file="/widgets/peopleTree/treeV3.jsp"%>
<table height="40" border="0" style="margin-left: 10px; margin-top: 5px"
cellpadding="0" cellspacing="0">
<tr>
<%--左侧树形框--%>
<td valign="top" height="660">
<table width="320" height="660" cellpadding="0" cellspacing="0"
bordercolorlight="#FFFFFF" bordercolordark="#003366" border="1"
bgcolor="#535552" style="margin-left: 10px; margin-top: 3px">
<tr>
<td align="left" valign="top" height="100%">
<div id="exttree-div" style="width: 250px;"></div>
</td>
</tr>
</table>
</td>
<%--右侧列表框--%>
<td>
<table width="640" height="660" cellpadding="0" cellspacing="0"
bordercolorlight="#FFFFFF" bordercolordark="#003366" border="1"
bgcolor="#535552" style="margin-left: 10px; margin-top: 3px">
<tr>
<td align="left" valign="top" height="100%">
<div id="scoreGrade_center" oncontextmenu="return false;">
<div id="list_grid_panel" style="width: 100%; height: 100%;"></div>
<div id="listColumnPolicy"></div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 栏目策略设置 -->
<div id="editColumnPolicy_Panel"
style="visibility: hidden; position: absolute; top: 0px">
<div class="x-dlg-hd"><bean:message
key="columnpolicy.label.titleSet" /></div>
<div class="x-dlg-bd">
<div class="x-dlg-tab"
title="<bean:message key="columnpolicy.label.titleSet"/>">
<div class="inner-tab">
<form id="editColumnPolicyForm" method="POST"
action="<c:url value='/channel/saveColumnPolicy.do'/>">
<table border="0" width="100%" cellpadding="0" cellspacing="0"
align="left" style="margin: 10px 0px 0px 15px" id="policyTab">
<tr class="utype">
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.useType" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="useType" key="${columnPolicy.usetype}"
id="columnPolicy.usetype" name="columnPolicy.usetype">
<option></option>
</newstag:basicdatalist></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.sendType" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="sendtype" key="${columnPolicy.sendtype}"
id="columnPolicy.sendtype" name="columnPolicy.sendtype">
<option></option>
</newstag:basicdatalist></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.serverIp" />:</td>
<td align="left"><input name="columnPolicy.serverip"
id="columnPolicy.serverip" type="text" size="10"></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.mosId" />:</td>
<td align="left"><input name="columnPolicy.mosid"
id="columnPolicy.mosid" type="text" size="10"></td>
</tr>
<tr>
<td height="25" align="left" width="120"><bean:message
key="columnpolicy.label.isChannel" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="ischannel" key="" id="columnPolicy.ischannel"
name="columnPolicy.ischannel">
<option></option>
</newstag:basicdatalist> <input type="hidden" id="columnPolicy.policyid"
name="columnPolicy.policyid" value="${columnPolicy.policyid}">
<input type="hidden" id="columnPolicy.columnid"
name="columnPolicy.columnid" value="${columnPolicy.columnid}">
</td>
</tr>
<tr>
<td height="25" align="left" width="120">备注:</td>
<td align="left"><textarea rows="3" cols="15"
name="columnPolicy.notes" id="columnPolicy.notes"><c:out
value="${columnPolicy.notes}" /></textarea></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!-- 栏目参数配置 -->
<div id="columnPathConfig_Panel"
style="visibility: hidden; position: absolute; top: 0px">
<div class="x-dlg-hd"><bean:message
key="columnpolicy.label.columnPathConfig" /></div>
<div class="x-dlg-bd">
<div class="x-dlg-tab"
title="<bean:message key="columnpolicy.label.columnPathConfig"/>">
<div class="inner-tab">
<form id="editColumnPathConfigForm" method="POST"
action="<c:url value='/channel/saveColumnPathConfig.do'/>">
<div id="treeSelector" style="display: none;"></div>
<table id="cmsdata" border="0" width="100%" cellpadding="0" cellspacing="0"
align="left" style="margin: 10px 0px 0px 15px">
<tr><td height="25"></td></tr>
<c:forEach var="t" items="${basicDataType}">
<tr class="program" typeid="${t.id}">
<td height="25" align="left" width="180">${t.data}节目目录:</td>
<td align="left">
<input name="basicDataType_programid" class='folderId' type="text" size="10" readonly="readonly" />
<input type="button" value="选择" siteType="${t.id}" class="folderSelector" />
<input type="hidden" class="siteId" name="siteidContainer"/>
</td>
</tr>
<tr class="material" typeid="${t.id}">
<td height="25" align="left" width="180">${t.data}素材目录:</td>
<td align="left">
<input name="basicDataType_materialid" type="text" size="10" class='folderId' readonly="readonly" />
<input type="button" value="选择" siteType="${t.id}" class="folderSelector" />
<input type="hidden" class="siteId" name="siteidContainer"/>
</td>
</tr>
</c:forEach>
<tr>
<td><bean:message key="columnpolicy.label.columnTaskType" />:</td>
<td align="left"><newstag:basicdatalist showtype="select"
uniquename="column_task_type" key="" id="columnTaskType"
name="columnTaskType">
<option></option>
</newstag:basicdatalist>
<input type="hidden" id="policyid" name="policyid" value="${columnPolicy.policyid}">
<input type="hidden" id="MLcolumnid" name="columnPolicy.columnid" value="${columnPolicy.columnid}">
<input type="hidden" id="basicDataTypeArray" name="basicDataTypeArray" >
<input type="hidden" id="useType" name="useType" >
</td>
</tr>
<tr><td><div id="configContent" style="display: block; color: red"></div></td></tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!--栏目设置 -->
<div id="edit_Panel"
style="visibility: hidden; position: absolute; top: 0px">
<div class="x-dlg-hd"><bean:message key="label.page.title" /></div>
<div class="x-dlg-bd">
<div class="x-dlg-tab" title="<bean:message key="label.page.title"/>">
<div class="inner-tab">
<form id="editForm" method="POST"
action="<c:url value='/channel/saveObject.do'/>">
<table id='cmsTable' border="0" width="100%" cellpadding="0" cellspacing="0"
align="left" style="margin: 10px 0px 0px 15px">
<tr>
<td height="25" align="left"><bean:message
key="label.page.nodetype" />:</td>
<td align="left"><input name="nodeType" id="nodeType" type="text"
size="20" readonly="readonly"></td>
</tr>
<tr>
<td height="25" align="left"><bean:message
key="label.page.nodename" />:</td>
<td align="left"><input name="vo.CName" id="vo.CName" type="text"
size="20"> <input type="hidden" name="vo.PID" id="vo.PID" />
<input type="hidden" name="vo.CID" id="vo.CID" /> <input
type="hidden" name="vo.leaf" id="vo.leaf" /> <input type="hidden"
name="vo.depth" id="vo.depth" /> <input type="hidden"
name="vo.CCode" id="vo.CCode" /> <input type="hidden"
name="vo.ownCanModify" id="vo.ownCanModify" /></td>
</tr>
<tr id="isShowdate">
<td height="25" align="left">播出时间:</td>
<td align="left"><input readonly="readonly" name="vo.showdate"
id="vo.showdate" style="width: 125px"
value='<fmt:formatDate value="${vo.showdate}" pattern="yyyy-MM-dd HH:mm:ss"/>' />
</td>
</tr>
<tr id="temp1">
<td height="40" align="left"><input type="checkbox"
name="checkbox" id="checkbox"></td>
<td align="left">
<div style="width: 150px">允许用户在没有权限情况下修改和删除自己建的资源
<div>
</td>
</tr>
<tr id="Note">
<td height="25" align="left"><bean:message
key="label.page.nodenote" />:</td>
<td align="left"><input name="vo.CNote" id="vo.CNote" type="text">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//Ext TREE
var _tempTree;
var selectedNode;
var parentNode;
var columnpolicyDialog;
var columnPathConfigDialog;
var explorerPanelDialog;
var RepSelM;
var dataSource;
var dateField;
//初始化ext date
var extDateArray=new Array();
initExtDate=function(){
var shotDateTimeExt=new Ext.form.DateTimeFieldAddSecond({
allowBlank:true,
format:'Y-m-d H:i:s'
});
shotDateTimeExt.applyTo('vo.showdate');
extDateArray.push(shotDateTimeExt);
}
function DataItem(){
this.programFolder=new Object();
this.programSite=new Object();
this.materialFolder=new Object();
this.materialSite=new Object();
}
function obj2str(o){
var r = [];
if(typeof o =="string") return "\""+o.replace(/([\'\"\\])/g,"\\$1").replace(/(\n)/g,"\\n").replace(/(\r)/g,"\\r").replace(/(\t)/g,"\\t")+"\"";
if(typeof o == "object"){
if(!o.sort){
for(var i in o)
r.push(i+":"+obj2str(o[i]));
if(!!document.all && !/^\n?function\s*toString\(\)\s*\{\n?\s*\[native code\]\n?\s*\}\n?\s*$/.test(o.toString)){
r.push("toString:"+o.toString.toString());
}
r="{"+r.join()+"}";
}else{
for(var i =0;i<o.length;i++){
r.push(obj2str(o[i]));
}
r="["+r.join()+"]";
}
return r;
}
return o.toString();
}
Ext.onReady(function(){
initExtDate();
var Tree = Ext.tree;
var mytreeLoader = new Tree.TreeLoader({
dataUrl:'<c:url value="/channel/getAllChannelByPID.do"/>'
});
mytreeLoader.on("beforeload", function(treeLoader, node) {
this.baseParams.id = node.attributes.id;
this.baseParams.depth = node.getDepth();
}, mytreeLoader);
_tempTree = new Tree.TreePanel('exttree-div', {
animate:true,
loader: mytreeLoader,
enableDD:false,
containerScroll: true
});
// set the root node
var root = new Tree.AsyncTreeNode({
text: "<bean:message key="label.root.title"/>",
draggable:false,
id:'0'
});
_tempTree.on("click", function(node, eventObject) {
selectedNode = node;
clearContent();
refreshGrid();
}, _tempTree);
_tempTree.on("dblclick", function(node, eventObject) {
selectedNode = node;
editChildren();
}, _tempTree);
_tempTree.on("contextmenu", function(node, eventObject) {
selectedNode = node;
var menu = new Ext.menu.Menu();
var item;
if(selectedNode.getDepth() < 3){
item = menu.add({text:"<bean:message key="label.menu.add"/>",handler:function(){addChildren();}});
}
if(selectedNode.getDepth() > 0){
item = menu.add({text:"<bean:message key="label.menu.update"/>",handler:function(){editChildren();}});
item = menu.add({text:"<bean:message key="label.menu.delete"/>",handler:function(){removeChildren();}});
}
item = menu.add({text:"<bean:message key="label.menu.refresh"/>",handler:function(){refreshTree();}});
var coords = eventObject.getXY();
menu.showAt([coords[0], coords[1]]);
}, _tempTree);
_tempTree.setRootNode(root);
_tempTree.render();
root.expand();
initMainGrid();
changeStatus();
<%--选择按钮点击事件 start --%>
$('.folderSelector').live('click',function(){
var trigger = $(this);
var siteType = trigger.attr('siteType');
$('#treeSelector').empty();
$('#treeSelector').css('left', trigger.position().left+50).css('top',trigger.position().top);
$('#treeSelector').show();
constructFolderSelector('', '','',siteType,function() {
trigger.parent().find('.folderId').val(this.getData().id);
trigger.parent().find('.siteId').val(this.getData().siteId);
$('#treeSelector').hide();
});
});
<%--method start --%>
function constructFolderSelector(url,username,password, type, callback) {
var rootData = {
id : '0',
siteId:'0',
label : '选择根目录',
businessType : 'folder',
nodeType : 'ajax',
folderType:type,
expand : true
};
var businessBehaviorStore = {
'folder' : {
'click' : callback,
'loadChildrenData' : function(){
var node = this;
return this.loadJSON('/news-manage/configuration/getFolderChildren.do',{
siteId:this.getData().siteId,
rootId:this.getData().id,
folderType:this.getData().folderType
});
}
}
};
var optionsData = {
target : '#folderSelector',
businessBehaviorStore : businessBehaviorStore,
businessIconStore : hpmIconBinding,
menu : null
}
if (folderSelector) {
folderSelector.options.functions.destory(folderSelector);
}
$('#treeSelector').show();
folderSelector = $('#treeSelector').tree(optionsData, rootData);
}
<%--method end --%>
<%-- onChange start --%>
$("[id='columnPolicy.usetype']").change(function(){
var a=$("[id='columnPolicy.usetype']").val();
var notes = document.getElementById("columnPolicy.notes").value;
document.getElementsByName("basicDataType_programid").value="";
document.getElementsByName("basicDataType_materialid").value="";
if(a==30){
columnpolicyDialog.hide();
columnPathConfigPolicy();
return;
}else{
showColumnpolicyDialog();
}
});
<%-- onChange end --%>
});
//编辑节点
var editChildren = function(){
showExplorerPanelDialog();
var depth = selectedNode.getDepth();
var id = selectedNode.id;
document.getElementById("vo.showdate").value = "";
Ext.Ajax.request({
url: '<c:url value="/channel/getObjectByID.do"/>?id=' + id + "&depth=" + depth,
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
var obj = json.vo;
document.getElementById("checkbox").checked = false;
document.getElementById("vo.CName").value = obj.CName;
document.getElementById("vo.CCode").value = obj.CCode;
document.getElementById("vo.PID").value = obj.PID;
document.getElementById("vo.CID").value = obj.CID;
document.getElementById("vo.depth").value = depth;
document.getElementById("vo.ownCanModify").value = obj.ownCanModify;
if(obj.showdate != null){
document.getElementById("vo.showdate").value = obj.showdate;
}
if(depth == 1){
document.getElementById("vo.CNote").value = obj.CNote;
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.channel"/>";
document.getElementById("note").style.display = '';
document.getElementById("isShowdate").style.display = 'none';
document.getElementById("temp1").style.display = 'none';
}else if(depth == 2){
document.getElementById("vo.CNote").value = obj.CNote;
var a2 = "<bean:message key="label.nodeType.timesect"/>";
$('#nodeType').val(a2);
$('#note').show();
$('#isShowdate').hide();
document.getElementById("temp1").style.display = 'none';
}else if(depth == 3){
document.getElementById("vo.CNote").value = "";
var aaa = "<bean:message key="label.nodeType.column"/>";
$('#nodeType').val(aaa);
$('#note').hide();
document.getElementById("isShowdate").style.display = '';
document.getElementById("temp1").style.display = '';
if(document.getElementById("vo.ownCanModify").value == 1){
document.getElementById("checkbox").checked = true;
}
}
explorerPanelDialog.show();
}
},
failure: function () {
Ext.MessageBox.alert("581","<bean:message key="label.action.operationfailed"/>");
}
});
}
var showExplorerPanelDialog = function(){
if(!explorerPanelDialog){
explorerPanelDialog = new Ext.BasicDialog('edit_Panel', {
autoTabs:true,
width:550,
height:350,
shadow:false,
minWidth:300,
minHeight:300,
proxyDrag: true,
modal:true,
resizable: true
});
explorerPanelDialog.setContentSize(300, 300);
explorerPanelDialog.center();
explorerPanelDialog.addKeyListener(27, explorerPanelDialog.hide, explorerPanelDialog);
explorerPanelDialog.addButton("<bean:message key="label.page.ok"/>", saveChildren, explorerPanelDialog);
explorerPanelDialog.addButton("<bean:message key="label.page.cancel"/>", explorerPanelDialog.hide, explorerPanelDialog);
}
}
//增加节点
var addChildren = function(){
showExplorerPanelDialog();
var depth = selectedNode.getDepth() + 1;
if(depth == 4){
Ext.MessageBox.alert("","<bean:message key="label.action.nocreate"/>");
return;
}
document.getElementById("checkbox").checked = false;
var pid = selectedNode.id;
document.getElementById("vo.PID").value = pid;
document.getElementById("vo.CName").value = "";
document.getElementById("vo.CCode").value = "";
document.getElementById("vo.CNote").value = "";
document.getElementById("vo.CID").value = "";
document.getElementById("vo.depth").value = depth;
if(depth == 1){
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.channel"/>";
document.getElementById("note").style.display = '';
document.getElementById("temp1").style.display = 'none';
}else if(depth == 2){
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.timesect"/>";
document.getElementById("note").style.display = '';
document.getElementById("temp1").style.display = 'none';
}else if(depth == 3){
document.getElementById("nodeType").value = "<bean:message key="label.nodeType.column"/>";
document.getElementById("note").style.display = 'none';
document.getElementById("temp1").style.display = '';
}
explorerPanelDialog.show();
}
//删除节点
var removeChildren = function(){
showExplorerPanelDialog();
selectedNode.expand(1,true,function(){
if(selectedNode.childNodes.length > 0){
Ext.MessageBox.alert("","<bean:message key="label.action.nodelete"/>");
return false;
}
if(selectedNode.childNodes.length <= 0 && window.confirm("<bean:message key="msg.channel.dodelete"/>")){
var depth = selectedNode.getDepth();
//从后台得到数据
Ext.Ajax.request({
url: '<c:url value="/channel/removeObject.do"/>?id=' +selectedNode.id + "&depth=" + depth,
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var pNode = selectedNode.parentNode;
pNode.removeChild(selectedNode);
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}
},
failure: function () {
Ext.MessageBox.alert("660","<bean:message key="label.action.operationfailed"/>");
}
});
}
});
}
//保存节点
var saveChildren = function(){
if(document.getElementById("vo.CName").value == ""){
alert("<bean:message key="label.action.nameisnull"/>");return false;
}
var depth = selectedNode.getDepth();
if (depth=="3") {
if(document.getElementById("vo.showdate").value == ""){
alert("播出时间不能为空");return false;
}
}
if(document.getElementById("checkbox").checked == true){
document.getElementById("vo.ownCanModify").value = 1;
}else{
document.getElementById("vo.ownCanModify").value = 0;
}
explorerPanelDialog.hide();
Ext.Ajax.request({
form: document.forms["editForm"],
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
if(document.getElementById("vo.CID").value != ""){
//修改后的设置
selectedNode.setText(document.getElementById("vo.CName").value);
}else{
var ID = json.ID;
//新增后的设置
var node = new Ext.tree.TreeNode({id:ID, text:document.getElementById("vo.CName").value});
selectedNode.appendChild(node);
selectedNode.expand();
}
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}
},
failure: function () {
Ext.MessageBox.alert("704","<bean:message key="label.action.operationfailed"/>");
}
});
}
//刷新菜单
var refreshTree = function(){
_tempTree.root.reload();
}
//初始化右侧栏目策略grid
function initMainGrid(){
var rowclick=function(grid,rowindex,e){
var Ite=Ext.menu.Item;
var addItem=new Ite({
text: "<bean:message key="columnpolicy.label.add"/>",
icon:"../images/add.png",
handler: function(ite, e){
addColumnPolicy();
}
});
var editItem=new Ite({
text: "<bean:message key="columnpolicy.label.update"/>",
icon:"../images/edit.png",
handler: function(ite, e){
editColumnPolicy();
}
});
var deleteItem=new Ite({
text: "<bean:message key="columnpolicy.label.delete"/>",
icon:"../images/del.png",
handler: function(ite, e){
delColumnPolicy();
}
});
var cMenu = new Ext.menu.Menu({
id: 'cmtmenu', // the menu's id we use later to assign as submenu
items: [addItem,editItem,deleteItem]
});
cMenu.show(e.getTarget());
};
var rowdbclick=function(grid,rowindex,e){
editColumnPolicy();
};
var fm = Ext.form,
Ed = Ext.grid.GridEditor,
Sm=Ext.grid.RowSelectionModel;
var selModel=new Sm({singleSelect:true});
var cm = new Ext.grid.ColumnModel([{
header: "<bean:message key="columnpolicy.label.useType"/>",
dataIndex: 'usetypeString',
width: 150
},{
header: "<bean:message key="columnpolicy.label.sendType"/>",
dataIndex: 'sendtypeString',
width: 150
},{
header: "<bean:message key="columnpolicy.label.serverIp"/>",
dataIndex: 'serverip',
width: 150
},{
header: "<bean:message key="columnpolicy.label.mosId"/>",
dataIndex: 'mosid',
width: 150
}]);
cm.defaultSortable = true;
var Plant = Ext.data.Record.create([
{name: 'usetypeString', type: 'string'},
{name: 'sendtypeString', type: 'string'},
{name: 'serverip', type: 'string'},
{name: 'mosid', type: 'string'}
]);
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"<%=request.getContextPath()%>/channel/queryNewsColumnpolicy.do"}),
reader: new Ext.data.JsonReader({root:'data',id:'gradeid',
totalProperty: 'total'}, Plant)
});
dataSource = ds;
var grid = new Ext.grid.EditorGrid('listColumnPolicy', {
ds: ds,
cm: cm,
selModel:selModel,
enableColLock:false,
loadMask: true
});
RepSelM=selModel;
var layout = Ext.BorderLayout.create({
center: {
margins:{left:0,top:0,right:0,bottom:0},
panels: [new Ext.GridPanel(grid)]
}
}, 'list_grid_panel');
grid.addListener("rowcontextmenu",rowclick);
grid.addListener("rowdblclick",rowdbclick);
grid.render();
var gridHead = grid.getView().getHeaderPanel(true);
var tb = new Ext.Toolbar(gridHead, [{
text: '<bean:message key="columnpolicy.label.toolMenu"/>',
menu:{
id:"first_menu",
items:[{
text: "<bean:message key="columnpolicy.label.add"/>",
icon:"../images/add.png",
handler: addColumnPolicy
},{
text: "<bean:message key="columnpolicy.label.update"/>",
icon:"../images/edit.png",
handler: editColumnPolicy
}, {
text: "<bean:message key="columnpolicy.label.delete"/>",
icon:"../images/del.png",
handler: delColumnPolicy
}]
}
}]);
var gridFoot = grid.getView().getFooterPanel(true);
// add a paging toolbar to the grid's footer
var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 20,
displayInfo: true,
displayMsg: '{0}-{1}/{2}',
emptyMsg: 'No records'
});
ds.load({params:{start:0, limit:20}});
}
//添加栏目策略
function addColumnPolicy(){
if(!selectedNode){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
//当此对话框出现时,触发change事件,确保select的初始值不变
document.getElementById("columnPolicy.usetype").value = 10;
$("[id='columnPolicy.usetype']").trigger('change');
var depth = selectedNode.getDepth();
var id = selectedNode.id;
if(depth==0||depth==2){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
document.getElementById("policyid").value = "";
if(depth==1){//频道策略
document.getElementById("columnPolicy.ischannel").value = 1;
document.getElementById("columnPolicy.columnid").value = id;
}else if(depth==3){//栏目策略
document.getElementById("columnPolicy.ischannel").value = 0;
document.getElementById("columnPolicy.columnid").value = id;
}
showColumnpolicyDialog();
columnpolicyDialog.show();
}
//栏目参数配置
function columnPathConfigPolicy(){
if(!selectedNode){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
var depth = selectedNode.getDepth();
var id = selectedNode.id;
if(depth==0||depth==2){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectColumnOrChannel"/>");
return;
}
document.getElementById("MLcolumnid").value = id;
showColumnPathConfigDialog();
columnPathConfigDialog.show();
}
function showColumnpolicyDialog(){
if (!columnpolicyDialog){
columnpolicyDialog = new Ext.BasicDialog("editColumnPolicy_Panel",{
autoTabs:true,
width:550,
height:350,
shadow:false,
minWidth:300,
minHeight:300,
proxyDrag: true,
modal:true,
resizable: false
});
columnpolicyDialog.addKeyListener(27, columnpolicyDialog.hide, columnpolicyDialog);
columnpolicyDialog.addButton("<bean:message key="label.page.ok"/>", saveColumnPolicy, columnpolicyDialog);
columnpolicyDialog.addButton("<bean:message key="label.page.cancel"/>", columnpolicyDialog.hide, columnpolicyDialog);
}
}
//栏目参数配置对话框
function showColumnPathConfigDialog(){
if (!columnPathConfigDialog){
columnPathConfigDialog = new Ext.BasicDialog("columnPathConfig_Panel",{
autoTabs:true,
width:550,
height:350,
shadow:false,
minWidth:300,
minHeight:300,
proxyDrag: true,
modal:true,
resizable: false
});
columnPathConfigDialog.addKeyListener(27, columnPathConfigDialog.hide, columnPathConfigDialog);
columnPathConfigDialog.addButton("<bean:message key="label.page.ok"/>", saveColumnPathConfig, columnPathConfigDialog);
columnPathConfigDialog.addButton("<bean:message key="label.page.cancel"/>", columnPathConfigDialog.hide, columnPathConfigDialog);
}
}
//编辑栏目策略
function editColumnPolicy(){
if(!RepSelM.getSelected()){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectOne"/>");
return;
}
showColumnpolicyDialog();
document.getElementById("columnPolicy.usetype").value = RepSelM.getSelected().json.usetype;
document.getElementById("columnPolicy.policyid").value = RepSelM.getSelected().json.policyid;
document.getElementById("columnPolicy.sendtype").value = RepSelM.getSelected().json.sendtype;
document.getElementById("columnPolicy.serverip").value = RepSelM.getSelected().json.serverip;
document.getElementById("columnPolicy.mosid").value = RepSelM.getSelected().json.mosid;
document.getElementById("columnPolicy.ischannel").value = RepSelM.getSelected().json.ischannel;
document.getElementById("columnPolicy.columnid").value = RepSelM.getSelected().json.columnid;
// document.getElementById("columnPolicy.notes").value = RepSelM.getSelected().json.notes == "" ? "" : Ext.util.JSON.encode(RepSelM.getSelected().json.notes);
//内容管理参数的id约定为30,如果是操作的对象是内容管理参数,则进行以下操作
var a=$("[id='columnPolicy.usetype']").val();
if(a==30){
// alert(RepSelM.getSelected().json.policyid);
//将数据库返回的json值赋值给data , 这个值是string格式的
var data = RepSelM.getSelected().json.notes == "" ? "" : Ext.util.JSON.encode(RepSelM.getSelected().json.notes);
//将string转换成json
var c = eval('('+data+')');
var programSite = new Array();
var materialFolder = new Array();
var materialSite = new Array();
var programFolder = new Array();
var columnTaskType = null;
//遍历这个json数据,将相同名字的值传到相应的数组里面
var num=0;
for(var i in c){
if(typeof(c[i]) == "string"){
columnTaskType=c[i];
}else{
programSite[num] = c[i].programSite;
materialFolder[num] = c[i].materialFolder;
materialSite[num] = c[i].materialSite;
programFolder[num] = c[i].programFolder;
num++;
}
}
//将值赋值给相应的控件
$('#cmsdata .program').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
$tr.find('.folderId').attr("value",programFolder[typeid]);
$tr.find('.siteId').attr("value",programSite[typeid]);
});
$('#cmsdata .material').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
$tr.find('.folderId').attr("value",materialFolder[typeid]);
$tr.find('.siteId').attr("value",materialSite[typeid]);
});
document.getElementById("columnTaskType").value = columnTaskType;
document.getElementById("policyid").value = RepSelM.getSelected().json.policyid;
columnpolicyDialog.hide();
columnPathConfigPolicy();
return;
}
columnpolicyDialog.show();
}
//删除栏目策略
function delColumnPolicy(){
if(!RepSelM.getSelected()){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.selectOne"/>");
return;
}
Ext.Ajax.request({
url: '<c:url value="/channel/removeColumnPolicy.do"/>?columnPolicy.policyid=' +RepSelM.getSelected().json.policyid,
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
if(json&&json.message){
if(json.message="success"){
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}
refreshGrid();
}
}
},
failure: function () {
Ext.MessageBox.alert("926","<bean:message key="label.action.operationfailed"/>");
}
});
}
//保存栏目策略
function saveColumnPolicy(){
columnpolicyDialog.hide();
document.getElementById("columnPolicy.ischannel").disabled=false;
Ext.Ajax.request({
form: document.forms["editColumnPolicyForm"],
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
//alert(json.columnPolicy.policyid);
if(json.isok == "true" && json.columnPolicy.policyid){
document.getElementById("columnPolicy.policyid").value = json.columnPolicy.policyid;
refreshGrid();
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}else{
Ext.MessageBox.alert("","保存失败!已有相同类型的策略!");
}
}
},
failure: function () {
Ext.MessageBox.alert("erorr","<bean:message key="label.action.operationfailed"/>");
}
});
changeStatus();
}
//保存栏目参数配置
function saveColumnPathConfig(){
getBasicDataType();
columnPathConfigDialog.hide();
Ext.Ajax.request({
form: document.forms["editColumnPathConfigForm"],
success: function (response,options) {
if(response && response.responseText && response.responseText != ''){
var json = Ext.util.JSON.decode(response.responseText);
//alert(json.columnPolicy.policyid);
if(json.isok == "true" && json.columnPolicy.policyid){
document.getElementById("policyid").value = json.columnPolicy.policyid;
refreshGrid();
Ext.MessageBox.alert("","<bean:message key="columnpolicy.operating.success"/>");
}else{
Ext.MessageBox.alert("","保存失败!已有相同类型的配置!");
}
}
},
failure: function () {
Ext.MessageBox.alert("949","<bean:message key="label.action.operationfailed"/>");
}
});
changeStatus();
}
//得到基础数据,传给ChannelManageCommand.java 的saveColumnPathConfig()的basicDataTypeArray
function getBasicDataType(){
var data = {};
$('#cmsdata .program').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
data[typeid]=new DataItem();
data[typeid].programFolder = $tr.find('.folderId').val();
data[typeid].programSite = $tr.find('.siteId').val();
});
$('#cmsdata .material').each(function(i){
var $tr = $(this);
var typeid=$tr.attr('typeid');
data[typeid].materialFolder = $tr.find('.folderId').val();
data[typeid].materialSite = $tr.find('.siteId').val();
});
document.getElementById("basicDataTypeArray").value = obj2str(data);
document.getElementById("useType").value = $("[id='columnPolicy.usetype']").val();;
}
//刷新grid
function refreshGrid(){
var depth = selectedNode.getDepth();
var id = selectedNode.id;
if(depth==0||depth==2){
return;
}
var args={};
if(id!=null)
args.columnid=id;
if(depth!=null){
args.depth=depth;
}
args.start = 0;
args.limit = 20;
dataSource.load({params:args});
}
//改变各状态
function changeStatus(){
document.getElementById("columnPolicy.ischannel").disabled=true;
}
//清空内容管理目录,在每次节点点击事件的时候调用
function clearContent(){
$('#cmsdata .program').each(function(i){
var $tr = $(this);
$tr.find('.folderId').attr("value","");
$tr.find('.siteId').attr("value","");
});
$('#cmsdata .material').each(function(i){
var $tr = $(this);
$tr.find('.folderId').attr("value","");
$tr.find('.siteId').attr("value","");
});
document.getElementById("policyid").value="";
}
</script>
</html>
============================================================
今天终于把最后一个bug解决了,感觉后台的东西都好搞定,jquery前台的赋值取值技术要是不熟就只有傻眼了,看来要加强这方面的练习.
发表评论
-
I am back
2016-08-30 21:56 443Talend ESB bundles Service Fact ... -
Spring mvc 拦截器 配置心得
2013-11-25 14:50 44072Spring mvc 拦截器 配置心得 session超过时 ... -
Restful风格的springMVC搭配ajax请求
2013-11-15 15:46 4021最近好像很流行Restful,终于弄懂一点眉目。一个小小的aj ... -
practise
2010-10-26 00:27 871package com.io; import java.io ... -
TR069 protocol
2010-10-15 23:01 1090TR-069是由DSL论坛(www.d ... -
English introduce
2010-10-13 22:16 929My name is Shehu, I am 26years ... -
在华为
2010-03-06 16:42 1514来华为已经两个多月了。感觉这里的开发氛围很好,开发模式 ... -
反斜杠和转义符的使用
2010-01-19 08:21 2513来个例子 package Test; public ... -
用maven构建web项目
2009-10-29 17:55 3400先学习学习: http://www.blogjava.net/ ... -
jqury each的使用
2009-10-21 18:11 1607<!-- path:/WEB-INF/jsp/llis ...
相关推荐
-- ShareTo Button BEGIN --> <div class="shareto_toolbox"> <a href="http://shareto.com.cn/share.html" class="shareto_button_compact">分享到</a> <span class="shareto_separator">|</span> <a class="share...
<a href="index3.html">Info Overlay</a> <a href="index4.html">Subscribe</a> <a href="index5.html">Share</a> <a href="index6.html">Video Player</a> <a href="index7.html">Sidebar Settings...
<Serv-U-InstallDir>\Client\Web Client\Share\ShareDetails.htm Linux: <Serv-U-InstallDir>\Serv-U <Serv-U-InstallDir>\Client\Web Client\Share\GuestDownload.htm <Serv-U-InstallDir>\Client\Web ...
<share-prepared-statements>true</share-prepared-statements> </statement> </datasource> ... </datasources> ``` 2. **添加MySQL驱动**: JBoss 7.1.1可能不包含MySQL的JDBC驱动,因此需要手动添加。将`...
SSM(spring+spring MVC+mybatis)开发学生信息后台管理系统,实现学生增删改查功能设计一个简单的学生信息管理系统,要求使用SSM框架技术整合实现,用户登录后能够通过Web页面添加、删除、修改和查询学生信息 ...
UTF-8 中文 字符集表 免费share UTF-8 ---> Chinese Charset Table
<br> 改名后,用文本编辑器打开online.asp,<br> share.asp以及admin/share.asp这三个<br> 文件,在顶部第2~3行处找到旧的数据库<br> 文件名,将其改为新的数据库文件名。<br> -------------------------------------...
朗道英->汉 2.朗道汉->英 3.计算机英语->汉语 4.牛津词典) 使用说明 1.安装Stardict $sudo apt-get install stardict (ubuntu debin linux) 2.将当前文件夹下的所有文件夹解压到"/usr/share/stardict/dic" 或 "~/....
4) AA System DB Script Tool.zip --> 里面带了一个数据库脚本自动执行工具,不过需要安装PowerShell。详细说明请在百度或谷歌搜 “数据库版本控制 小鼬”即可。 5) AASystem Source Code.zip --> 源代码,得用...
color u-p-l-44"><button class="u-reset-button" open-type="share"><image class="share-icon" src="../../static/share.png"></image></button></view></top-nav><view class="u-flex-col"><add-tips vue-id="8dd...
同时,会话文件的管理也很重要,`specctra`支持通过`file->write->session->demo.ses->ok`保存当前设计状态。此外,Allegro还允许用户删除特定设计元素,比如通过`delete(ctrl+D)`命令清除错误或不需要的部分,以及...
[www.infoshare.cc]selenium-java-3.0.0-beta4.jar
-- jsessionId的path为 / 用于多个系统共享jsessionId --> <property name="path" value="/" /> <property name="httpOnly" value="true"/> </bean> <!-- 缓存相关配置 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
10. `-sysconfdir <dir>`:系统配置文件将被安装到 `<dir>`,例如 `/etc`。 11. `-examplesdir <dir>` 和 `-demosdir <dir>`:示例和演示程序的安装目录。 12. `-release`、`-debug` 和 `-debug-and-release`:...
[www.infoshare.cc]poi-3.15.jar
[www.infoshare.cc]grinder-3.11.tar.gz
2、unzip /c/Users/<user>/Downloads/openocd-esp32-win32-<version>.zip 打开终端,进入安装目录并启动 OpenOCD: 1、cd ~/esp/openocd-esp32 2、bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_...
<Context path="/fileserver" docBase="/data/share/file"> </Context> ``` - 其中`path`属性定义了Web应用的访问路径,`docBase`属性定义了Web应用对应的磁盘文件目录。 2. **web.xml配置**:同样位于Tomcat的`...
kail虚拟机的共享文件夹安装失败,所以通过git仓库来share_share-the-file-to-the-linux
创建远程代码仓库VCS->Import into Version Control->Share Project on Github3.添加项目成员setting->Contributors->Add contributor->等待对方邮件同意4.成员建立本地仓库VCS->Checkout from Version Control->...