Java學(xué)習(xí)

          java,spring,structs,hibernate,jsf,ireport,jfreechart,jasperreport,tomcat,jboss -----本博客已經(jīng)搬家了,新的地址是 http://www.javaly.cn 如果有對文章有任何疑問或者有任何不懂的地方,歡迎到www.javaly.cn (Java樂園)指出,我會盡力幫助解決。一起進(jìn)步

           

          使用jsf基本常見問題1

          1.commandButton不能觸發(fā)其Action,原因是commandButton放到了verbatim中

          2.不能將InputText的值邦定到實體變量中,原因是設(shè)置了commandButton的immediate為true造成的

          3.java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.substringBeforeLast(Ljava/lang/String; Ljava/lang/String;)Ljava/lang/String;是因為commons-lang.jar版本的問題

          4.在panelTabbedPane中使用inputdate,無法正常使用,并且導(dǎo)致action無法執(zhí)行,是因為panelTabbedPane與其它控件的兼容性較差

          5如何在panelTabbedPane中加Tab Change事件,設(shè)置serverSideTabSwitch="true"并且添加<t:tabChangeListener  type="backbean.PlmtManageBean" />PlmtManageBean需要實現(xiàn)TabChangeListener接口
           我是將TabChangeListener接口添加在backing bean上的,導(dǎo)致Tab Change事件發(fā)生時該bean老重新create,所以放棄使用

          6.bean中獲取另外一個bean中的屬性
             FacesContext fc = FacesContext.getCurrentInstance();
            String userName = (String)fc.getApplication().createValueBinding("#{Person.userName}").getValue(fc);
              this.custId = custId;
            FacesContext fc = FacesContext.getCurrentInstance();
            BankBean bank = (BankBean) fc.getApplication().createValueBinding("#{bank}").getValue(fc); 
          The same result you can reach using the Variable Resolver:
          FacesContext fc = FacesContext.getCurrentInstance();
          BankBean bank = (BankBean) fc.getApplication().getVariableResolver().resolveVariable(fc, "bank"); 

          posted on 2008-09-01 13:15 找個美女做老婆 閱讀(211) 評論(0)  編輯  收藏


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


          網(wǎng)站導(dǎo)航:
           

          導(dǎo)航

          統(tǒng)計

          公告

          本blog已經(jīng)搬到新家了, 新家:www.javaly.cn
           http://www.javaly.cn

          常用鏈接

          留言簿(6)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 从江县| 湟中县| 葵青区| 东台市| 休宁县| 昌图县| 惠来县| 句容市| 通渭县| 辽中县| 湘阴县| 城市| 汝城县| 同德县| 遵义县| 海兴县| 通化县| 新昌县| 曲松县| 资中县| 屏东县| 仪征市| 浦城县| 建德市| 榆社县| 曲周县| 阿克陶县| 奉新县| 和龙市| 勃利县| 沙田区| 弥渡县| 舒城县| 铜陵市| 鲁甸县| 德州市| 兰州市| 宜兴市| 浦县| 中西区| 新晃|