示例#1
0
 public void changePage(int page, String sessionID, MsgRecordPanel panel) throws Exception {
   int offset = (page - 1) * Constants.SHOW_MESSAGE_PER_PAGE;
   List<ChatRecord> records =
       (List<ChatRecord>)
           Vovo.exeS(
               "dataStore", "getChatRecord", sessionID, Constants.SHOW_MESSAGE_PER_PAGE, offset);
   panel.changeData(records);
 }
示例#2
0
 public void getLatestRecord(int beanId, MsgRecordPanel panel) throws Exception {
   String sessionID = getSessionID(beanId);
   int count = (Integer) Vovo.exeS("dataStore", "getRecordNum", sessionID);
   int totalPage = count / Constants.SHOW_MESSAGE_PER_PAGE + 1;
   int offset = (totalPage - 1) * Constants.SHOW_MESSAGE_PER_PAGE;
   List<ChatRecord> records =
       (List<ChatRecord>)
           Vovo.exeS(
               "dataStore", "getChatRecord", sessionID, Constants.SHOW_MESSAGE_PER_PAGE, offset);
   panel.initInfo(totalPage, totalPage, records, sessionID);
 }