DWR选择推送问题 急!
时间:2011-10-21
来源:互联网
public class OnlineService {
.....
ublic void send(String sender,
String senderName,
String sendDeptName,
String strResceiver,
String globalFlg,
String callId,
String parUserid,
String modeType,
String FilesId,
String msg,
String roomId,
HttpServletRequest request){
.....
ServletContext sc = request.getSession().getServletContext();
ServerContext sctx = ServerContextFactory.get(sc);
//获得当前浏览 customerService.jsp 页面的所有脚本session
Collection session = sctx.getScriptSessionsByPage("/oa/modules/online/CallPage.jsp");
Util util = new Util(session);
util.setValue("callId", callId);
util.addFunctionCall("receiveMsg_call", mingcheng,sendDeptName, msg,flag);
}
......
获取了所有浏览CallPage.jsp页面的ScriptSessions,实现推送。现在CallPage.jsp页面有<input type="hidden" name="roomId" id="roomId" value="<%=accId%>"/> 通过roomId来筛选推送。可Util 没有getValue()方法。如何实现。
.....
ublic void send(String sender,
String senderName,
String sendDeptName,
String strResceiver,
String globalFlg,
String callId,
String parUserid,
String modeType,
String FilesId,
String msg,
String roomId,
HttpServletRequest request){
.....
ServletContext sc = request.getSession().getServletContext();
ServerContext sctx = ServerContextFactory.get(sc);
//获得当前浏览 customerService.jsp 页面的所有脚本session
Collection session = sctx.getScriptSessionsByPage("/oa/modules/online/CallPage.jsp");
Util util = new Util(session);
util.setValue("callId", callId);
util.addFunctionCall("receiveMsg_call", mingcheng,sendDeptName, msg,flag);
}
......
获取了所有浏览CallPage.jsp页面的ScriptSessions,实现推送。现在CallPage.jsp页面有<input type="hidden" name="roomId" id="roomId" value="<%=accId%>"/> 通过roomId来筛选推送。可Util 没有getValue()方法。如何实现。
作者: ysyu119 发布时间: 2011-10-21
每个人打开CallPage.jsp的accId不同,在OnlineService的send()方法中获取到accId的值,通过此值来判断要给谁推送 if(accId.equals("232"))util.addFunctionCall("receiveMsg_call", mingcheng,sendDeptName, msg,flag); 这个目的。
作者: ysyu119 发布时间: 2011-10-21
不是很懂喃 0.0 不过可以顶下啊
作者: God_Girl 发布时间: 2011-10-21
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28