posts - 48, comments - 13, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          dwr的reverse ajax與tapestry的結(jié)合

          Posted on 2009-03-23 14:40 董銳 閱讀(291) 評論(0)  編輯  收藏
          在tapestry5的頁面中,添加如下代碼
          @Inject
                  @Service("ApplicationGlobals")
                  private ApplicationGlobals applicationGlobals;

                  @SetupRender
                  void setListener(){
                          Clock.setListener(this);
                  }

          public void setClockDisplay(final String output) {

          Browser.withPage(ServerContextFactory.get(applicationGlobals.getServletContext()),"/manageCar/Dwrtracker", new Runnable() {
                      public void run() {
                         // Util.setValue("clockDisplay", output);
                      System.out.println("updateClockValue");
                          ScriptSessions.addFunctionCall("updateClockValue", output);
                 
                      }
                  });
          }
          interface IClockListener {
           public void setClockDisplay(final String output);
          }

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 隆林| 沽源县| 苍南县| 彭州市| 沂源县| 博湖县| 乌鲁木齐县| 隆安县| 临高县| 长武县| 龙陵县| 松潘县| 娄底市| 新宁县| 胶南市| 湖州市| 石嘴山市| 河北省| 东城区| 防城港市| 永城市| 探索| 肥东县| 望都县| 金乡县| 江阴市| 大渡口区| 西丰县| 嘉禾县| 榆社县| 通榆县| 阳东县| 武功县| 石景山区| 睢宁县| 怀宁县| 尤溪县| 武陟县| 孟州市| 兰溪市| 江华|