Loading...

          java .net

          Gwt中為加載中的Frame加上wait

          Gwt中調(diào)用panel的setUrl方法嵌入一個(gè)網(wǎng)頁
          在網(wǎng)頁加載過程中加入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;
          }-*/;

          然后在設(shè)置Frame的url時(shí)
          olapFrame = centerCp.setUrl(GWT.getHostPageBaseURL()
          + com.google.gwt.http.client.URL.encode("jsp/showOlap.jsp?dim="
          + dims + "&dimname=" + colLabels + ""));
          final MessageBox box = MessageBox.wait("等待", "正在查詢數(shù)據(jù),請(qǐng)稍后...", "查詢中...");
          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 閱讀(482) 評(píng)論(0)  編輯  收藏 所屬分類: gwt

          公告

          希望有一天

          我能用鼠標(biāo)雙擊我的錢包

          然后選中一張100元

          按住“ctrl+c”

          接著不停的“ctrl+v”

          嘻嘻~~~笑醒~~~



          導(dǎo)航

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

          統(tǒng)計(jì)

          常用鏈接

          留言簿(6)

          隨筆分類(102)

          隨筆檔案(398)

          文章分類

          文章檔案(10)

          有趣網(wǎng)絡(luò)

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 都匀市| 通道| 潼南县| 寻甸| 兴安县| 丹寨县| 逊克县| 常山县| 永丰县| 大洼县| 吐鲁番市| 阿合奇县| 临夏县| 双峰县| 时尚| 中方县| 彩票| 齐河县| 无极县| 罗定市| 花莲市| 安徽省| 庆云县| 绥江县| 青铜峡市| 五常市| 佳木斯市| 钦州市| 常宁市| 环江| 英吉沙县| 乌审旗| 仙居县| 凌海市| 长汀县| 嵊泗县| 木里| 临武县| 奉贤区| 高陵县| 西平县|