1. create MethodBinding MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{bean.method}", null);
2. create MethodExpression
ExpressionFactory expFactory = FacesContext.getCurrentInstance().
getApplication().getExpressionFactory();
ELContext elContext = FacesContext.getCurrentInstance().getELContext();
MethodExpression expression = expFactory.createMethodExpression(elContext, "actionName", String.class, new Class[]{});
commandComponent.setActionExpression(expression);
3. create ValueExpression
ValueExpression valueExpression = expFactory.createValueExpression(elContext, "#{bean.value}", String.class);
分享到:
相关推荐
1.6.6.2 Method body and local variables 16 1.6.6.3 Static and instance methods 17 1.6.6.4 Virtual, override, and abstract methods 18 1.6.6.5 Method overloading 20 1.6.7 Other function members 21 1.6....
Item 43: Use Expressions to Transform Late Binding into Early Binding 261 Item 44: Minimize Dynamic Objects in Public APIs 267 Chapter 6 Miscellaneous 275 Item 45: Minimize Boxing and Unboxing 275 ...
In order to take advantage of the new HTML-encoding expression syntax in ASP.NET 4, the return type for HTML helpers is now MvcHtmlString instead of a string. Note that if you use ASP.NET MVC 2 and ...
Python参考手册,官方正式版参考手册,chm版。以下摘取部分内容:Navigation index modules | next | Python » 3.6.5 Documentation » Python Documentation contents What’s New in Python ...
a value or whether we are using the Call statement. It makes the code much more readable and is a new standard for VB programmers that is consistent with the standard that nearly all other languages ...
Sun 官方 J2ee 5.0 教程 The Java EE 5Tutorial For Sun Java System Application Server 9.1 Contents Preface ..................................................................................................
* Incorrect filter expression parsing occurs when parsing a value that contains a quote in TClientDataSet. The expression parser incorrectly treats the rest of the expression as a formula (Quality ...
SpEL Expression Conditions 46.4. Testing your Auto-configuration 46.4.1. Simulating a Web Context 46.4.2. Overriding the Classpath 46.5. Creating Your Own Starter 46.5.1. Naming 46.5.2. autoconfigure...
Handling Exceptions Within an Expression Recipe 4.23. Ensuring a Name Is Defined in a Given Module Chapter 5. Searching and Sorting Introduction Recipe 5.1. Sorting a Dictionary Recipe 5.2....
Instantiation with a static factory method .................................................... 30 Spring Framework 4.0.0.RELEASE Spring Framework Reference Documentation iii Instantiation using an ...
Instantiation with a static factory method .................................................... 30 Spring Framework 4.0.0.RELEASE Spring Framework Reference Documentation iii Instantiation using an ...
FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持Delphi 4-XE5 and C++Builder 6-XE5. D2010以上版本(D14_D19)安装...* improved AddFrom method - anchor coping - fixed bug with ...
Contents Contents ii List of Tables x List of Figures xiv 1 Scope 1 2 Normative references 2 3 Terms and definitions 3 4 General principles 7 4.1 Implementation compliance . ....4.2 Structure of this ...
2.2 Literal value syntax..........................................................................................................................4 2.3 Integer and logic literals ........................
Table of Contents Introduction....................................................................................................13 Code Examples.........................................................