Loading...

          java .net

          Gwt中為加載中的Frame加上wait

          Gwt中調用panel的setUrl方法嵌入一個網頁
          在網頁加載過程中加入wait
          在頁面中加入javascript
          var ready = false; 
          $j(document).ready(function(){
          ready = true; 
          });//這里用了jquery

          然后再java中聲明
          public native boolean ready(Element frame)/*-{
          return frame.contentWindow.ready?true:false;
          }-*/;

          然后在設置Frame的url時
          olapFrame = centerCp.setUrl(GWT.getHostPageBaseURL()
          + com.google.gwt.http.client.URL.encode("jsp/showOlap.jsp?dim="
          + dims + "&dimname=" + colLabels + ""));
          final MessageBox box = MessageBox.wait("等待", "正在查詢數據,請稍后...", "查詢中...");
          final Element frame = olapFrame.getElement();
          final Timer t = new Timer() {
          @Override
          public void run() {
          if (ready(frame)) {
          this.cancel();
          box.close();
          }
          }
          };
          t.scheduleRepeating(100);

          posted on 2010-05-19 09:54 閱讀(479) 評論(0)  編輯  收藏 所屬分類: gwt

          公告

          希望有一天

          我能用鼠標雙擊我的錢包

          然后選中一張100元

          按住“ctrl+c”

          接著不停的“ctrl+v”

          嘻嘻~~~笑醒~~~



          導航

          <2010年5月>
          2526272829301
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          統計

          常用鏈接

          留言簿(6)

          隨筆分類(102)

          隨筆檔案(398)

          文章分類

          文章檔案(10)

          有趣網絡

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 霍州市| 西贡区| 景东| 武强县| 扶绥县| 贞丰县| 双流县| 府谷县| 城口县| 石河子市| 师宗县| 乐山市| 厦门市| 定日县| 鄢陵县| 石河子市| 剑阁县| 克拉玛依市| 尉犁县| 漯河市| 锦屏县| 香河县| 鄂州市| 松潘县| 平凉市| 绍兴市| 望城县| 遂宁市| 资阳市| 札达县| 乌什县| 延边| 思茅市| 临桂县| 双牌县| 凤阳县| 大洼县| 区。| 宣恩县| 文化| 嵩明县|