配置文件:
/fy_vip_SVN/framework/customize/src/com/metasphere/flexPlanXml/SbanSocketPolicyServer.java:
/fy_vip_SVN/framework/customize/webapp/io/flash/configxml/globle.xml:
/fy_vip_SVN/framework/customize/webapp/io/flash/config.xml
发送消息的函数:
function showNewMessage(conten){
var strs = new Array();
var noticeMessage = "";
strs = conten.split("#");
// alert('strs:'+strs+' size:'+strs.length+" "+strs[0]);
// alert("dispatchCarNofityGrid = "+dispatchCarNofityGrid+" # gaochangjingangGrid="+gaochangjingangGrid+" # twoCabinServicesTicketGrid = "+twoCabinServicesTicketGrid+" # currentGuanMingLvKeGrid = "+currentGuanMingLvKeGrid+" # flightInfoGrid = "+flightInfoGrid+" # cip1Grid = "+cip1Grid+" # cip2Grid = "+cip2Grid+" # gmGrid = "+gmGrid+" # currentGMGrid = "+currentGMGrid);
if(strs[0] == 'updateNum'){
conten = strs[1];
testM(conten);
if(recoredgrid != null && recoredgrid != ""){
//recoredgrid.getStore().reload();
}
}
var pkid = "";
if(strs.length >= 2){
// if(strs.length > 2 ){
// if(recoredgrid != null && recoredgrid != ""){
// //recoredgrid.getStore().reload();
// }
// pkid = strs[2];
// Ext.Ajax.request({
// url: '/customize/control/selectRecordMessage',
// params: {pkid:''},
// method: 'POST',
// success: function(response) {
// var respText = Ext.util.JSON.decode(response.responseText);
// var data = respText.msg;
// if(data == 'success'){
// var sum = respText.sum;
// var ready = respText.ready;
// var unready = respText.unready;
// document.getElementById("sumid").innerHTML = sum;//sum number
// document.getElementById("unreadyid").innerHTML = unready;//unready number
//
// /*
// var at = $("#sumid").html();
// var bt = parseInt(at) +1;
// document.getElementById("sumid").innerHTML = bt;//sum number
// var unreadyn = $("#unreadyid").html();
// document.getElementById("unreadyid").innerHTML = parseInt(unreadyn) +1;//unready number
// */
// }
// },
// failure: function(response) {
// }
// });
// }
if(strs[0]=="guanMingRefresh"){
conten = strs[1];
if(guanMingGrid2!=""){
//guanMingGrid2.getStore().reload();
}
}
if(strs[0]=="gaochangjingang"){
conten = strs[1];
if(undefined != gaochangjingangGrid){
//gaochangjingangGrid.getStore().reload();
}
}
if(strs[0]=="twoCabinServicesTicket"){
conten = strs[1];
if(undefined != twoCabinServicesTicketGrid){
//twoCabinServicesTicketGrid.getStore().reload();
}
}
if(strs[0]=="flightInfo"){
conten = strs[1];
if(undefined != flightInfoGrid){
flightInfoGrid.getStore().reload();
}
if(undefined != gmGrid){
//gmGrid.getStore().reload();
}
if(undefined != currentGMGrid){
//currentGMGrid.getStore().reload();
}
}
if(strs[0]=="dispatchCarNofity"){
conten = strs[1];
if(undefined != dispatchCarNofityGrid){
//dispatchCarNofityGrid.getStore().reload();
}
}
if(strs[0]=="orderHY"){
conten = strs[1];
}
if(strs[0]=="currentGuanMingLvKeGridRefresh"){
conten = strs[1];
if(undefined != currentGuanMingLvKeGrid){
currentGuanMingLvKeGrid.getStore().reload();
}
}
if(strs[0]=="cip1"){
conten = strs[1];
if(undefined != cip1Grid){
cip1Grid.getStore().reload();
}
}
if(strs[0]=="cip2"){
conten = strs[1];
if(undefined != cip1Grid){
cip2Grid.getStore().reload();
}
}
if(strs[0]=="gmGridRefresh"){
conten = strs[1];
if(undefined != gmGrid){
gmGrid.getStore().reload();
}
}
if(strs[0]=="currentGMGrid"){
conten = strs[1];
if(undefined != currentGMGrid){
currentGMGrid.getStore().reload();
}
if(undefined != flightInfoGrid){
flightInfoGrid.getStore().reload();
}
}
}
if("" != conten ){
$.messager.show({
title:'${uiLabelMap.newMessage}',
msg:conten,
showType:'slide',
height:160,
timeout:5000,
width:243
});
if(pkid != ""){
$(".panel-tool-close").click(function(){
$(this).parent().parent().hide('slow');
//alert(pkid);
Ext.Ajax.request({
url: '/customize/control/readyUpdate',
params: {pkid:pkid},
method: 'POST',
success: function(response) {
var respText = Ext.util.JSON.decode(response.responseText);
var data = respText.msg;
if(data == 'success'){
if(recoredgrid != null && recoredgrid != ""){
//recoredgrid.getStore().load();
}
}
else
{
//Ext.Msg.alert('警告', '操作失败!');
}
//myMask.hide();
},
failure: function(response) {
//Ext.Msg.alert('警告', '网络超时,请稍候再试!');
//myMask.hide();
}
});
});
}
}
}
消息框解释链接:http://www.cnblogs.com/xxt19970908/p/5424090.html
访问项目格式:
http://192.168.1.59:8080/customize/control/login
注意:本机ip:端口/customize/control/login,不能使用localhost或者127.0.0.1 的形式访问。