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);
分享到:
相关推荐
@RequestMapping(value = "/save", method = RequestMethod.POST) public String saveUser(@Valid User user, BindingResult result, FlashMap flash) { if (result.hasErrors()) { flash.put("user", user); ...
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 ...
1. **ComboBox数据源绑定**:通过 `ItemsSource="{Binding VisitTypeList}"` 绑定列表数据源,`SelectedItem="{Binding SelectedVisitType, Mode=TwoWay}"` 设置双向数据绑定,使得 ComboBox 的选中项可以与 ...
* 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.........................................................