2.不能将InputText的值邦定到实体变量中,原因是设置了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,无法正常使用,并且导致action无法执行,是因为panelTabbedPane与其它控件的兼容性较差
5如何在panelTabbedPane中加Tab Change事件,设置serverSideTabSwitch="true"并且添加<t:tabChangeListener type="backbean.PlmtManageBean" />PlmtManageBean需要实现TabChangeListener接口
我是将TabChangeListener接口添加在backing bean上的,导致Tab Change事件发生时该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");