+ -
当前位置:首页 → 问答吧 → DWR选择推送问题 急!

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()方法。如何实现。

作者: 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

热门下载

更多