从FacesConetext中获得一个Application对象然后使用该对象创建一个以Faces-config.xml中定义的受控Bean名ValueBinding对象,再使用该ValueBinding对象的getValue(FacesConetext)获取最终受控bean。这种方法类似Spring中的对象实例代码如下
FacesConetxt().getApplication().createValueBinding(name).getValue(FacesConetxt);
name="{受控bean名}"
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7697443/viewspace-900168/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7697443/viewspace-900168/