達則兼濟天下,實則守恒如一  
          不必羨慕海洋的浩瀚更不必勉強自己達到某種程度。即使你只是一滴水,只要你愿意,同樣可以折射出太陽的光輝。重要的是,你要知道你自己
          日歷
          <2008年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789
          統(tǒng)計
          • 隨筆 - 1
          • 文章 - 2
          • 評論 - 3
          • 引用 - 0

          導航

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          相冊

          搜索

          •  

          最新評論

           
          近日學netbeans6.1時發(fā)現(xiàn)一個關(guān)于visual web javaserver faces 的一個致命bug
          描述如下:
                  創(chuàng)建或重用一個起始頁。添加一個“靜態(tài)文本”組件,將它的 text 屬性設(shè)置為 Hello,并設(shè)置它的 id 屬性為 helloText
                  添加一個“按鈕”組件。雙擊“按鈕”組件編輯它的 action 方法(button1_action)并用以下的代碼替換方法體里的內(nèi)容
                  代碼范例 1:button1_action 方法
                    
          this.helloText.setText("Good Bye");
          return null;
          顯示如下錯誤:
          找不到符號
          符號: 變量 helloText

          由于關(guān)于visual web javaserver faces 幫助內(nèi)容不多,各種辦法都想過了后來下載netbeans6.01又試了一下,才發(fā)現(xiàn)原委
          在 netbeans6.01 環(huán)境下每在設(shè)計面板上添加一個組件,java代碼編輯處便增加一條 對應的import 語句如下
          1,在設(shè)計面板上什么組件也沒有時,有以下import 語句:
          import com.sun.rave.web.ui.appbase.AbstractPageBean;
          import com.sun.webui.jsf.component.Body;
          import com.sun.webui.jsf.component.Form;
          import com.sun.webui.jsf.component.Head;
          import com.sun.webui.jsf.component.Html;
          import com.sun.webui.jsf.component.Link;
          import com.sun.webui.jsf.component.Page;
          import javax.faces.FacesException;
          2,在設(shè)計面板上添加組件后,有以下import 語句: import com.sun.rave.web.ui.appbase.AbstractPageBean;
          import com.sun.webui.jsf.component.Body;
          import com.sun.webui.jsf.component.Button;
          import com.sun.webui.jsf.component.Form;
          import com.sun.webui.jsf.component.Head;
          import com.sun.webui.jsf.component.Html;
          import com.sun.webui.jsf.component.Link;
          import com.sun.webui.jsf.component.Page;
          import com.sun.webui.jsf.component.StaticText;
          import javax.faces.FacesException;
          多了兩條 import 語句

          代碼在netbeans 6.01 環(huán)境下也能通過測試;

          而在 netbeans 6.1
          環(huán)境下
          1,在設(shè)計面板上什么組件也沒有時,有以下import 2條語句:
          import com.sun.rave.web.ui.appbase.AbstractPageBean;
          import javax.faces.FacesException;
          2,在設(shè)計面板上添加組件后,有以下import 語句:
          import com.sun.rave.web.ui.appbase.AbstractPageBean;
          import javax.faces.FacesException;
          還是兩條 import 語句

          即使把
          全部import語句(如下)都加到netbeans 6.1 環(huán)境下
          import com.sun.rave.web.ui.appbase.AbstractPageBean;
          import com.sun.webui.jsf.component.Body;
          import com.sun.webui.jsf.component.Button;
          import com.sun.webui.jsf.component.Form;
          import com.sun.webui.jsf.component.Head;
          import com.sun.webui.jsf.component.Html;
          import com.sun.webui.jsf.component.Link;
          import com.sun.webui.jsf.component.Page;
          import com.sun.webui.jsf.component.StaticText;
          import javax.faces.FacesException;
          亦顯示以下語句為無用導入
          import com.sun.webui.jsf.component.Body;
          import com.sun.webui.jsf.component.Button;
          import com.sun.webui.jsf.component.Form;
          import com.sun.webui.jsf.component.Head;
          import com.sun.webui.jsf.component.Html;
          import com.sun.webui.jsf.component.Link;
          import com.sun.webui.jsf.component.Page;
          import com.sun.webui.jsf.component.StaticText; 且this關(guān)鍵字仍無法引用所建組建
          我想這應是呢netbeans6.1 在visual web javaserver faces 方面的一個bug

          王福華 2008-5-24
          posted on 2008-05-24 23:24 yui 閱讀(690) 評論(3)  編輯  收藏
          評論:
          • # re: netbeans6.1 關(guān)于visual web javaserver faces 重大bug[未登錄]  Aaron Posted @ 2008-07-02 10:25
            我也發(fā)現(xiàn)了類似的問題,不知道有沒有找到合適的解決方法了呢?  回復  更多評論   

          • # re: netbeans6.1 關(guān)于visual web javaserver faces 重大bug  王福華 Posted @ 2008-07-02 11:52
            只是在6.1中每添加一個組件后要手動地在組件上右鍵
            選擇“添加綁定屬性”就可以了  回復  更多評論   

          • # re: netbeans6.1 關(guān)于visual web javaserver faces 重大bug  蘇玉元 Posted @ 2010-03-01 20:23
            這不是個問題,以解決。
            添加綁定屬性。  回復  更多評論   


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


          網(wǎng)站導航:
           
           
          Copyright © yui Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 乌拉特前旗| 铜陵市| 崇信县| 红桥区| 平泉县| 崇州市| 通州区| 芜湖市| 岗巴县| 廊坊市| 烟台市| 曲水县| 长治县| 闻喜县| 乌兰县| 宾阳县| 龙口市| 利津县| 东宁县| 普兰店市| 平阴县| 泰兴市| 漠河县| 扶风县| 南宁市| 桦甸市| 武威市| 松溪县| 天柱县| 临澧县| 苍南县| 大新县| 沂源县| 绵竹市| 宁海县| 全椒县| 襄城县| 深圳市| 清苑县| 固安县| 东乌珠穆沁旗|