`

methodbinding methodexpression valueexpression

    博客分类:
  • jsf
阅读更多
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); 
分享到:
评论

相关推荐

    sprinmvc jsp与java的几种相互传参的方式

    @RequestMapping(value = "/save", method = RequestMethod.POST) public String saveUser(@Valid User user, BindingResult result, FlashMap flash) { if (result.hasErrors()) { flash.put("user", user); ...

    asp.net mvc

    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 ...

    python3.6.5参考手册 chm

    Python参考手册,官方正式版参考手册,chm版。以下摘取部分内容:Navigation index modules | next | Python » 3.6.5 Documentation » Python Documentation contents What’s New in Python ...

    silverlight 强劲学习案例

    1. **ComboBox数据源绑定**:通过 `ItemsSource="{Binding VisitTypeList}"` 绑定列表数据源,`SelectedItem="{Binding SelectedVisitType, Mode=TwoWay}"` 设置双向数据绑定,使得 ComboBox 的选中项可以与 ...

    Delphi7.1 Update

    * 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 ...

    spring-boot-reference.pdf

    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...

    Python Cookbook, 2nd Edition

    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....

    spring-framework-reference4.1.4

    Instantiation with a static factory method .................................................... 30 Spring Framework 4.0.0.RELEASE Spring Framework Reference Documentation iii Instantiation using an ...

    spring-framework-reference-4.1.2

    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中文修正版支持D4-XE5

    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 ...

    Google C++ International Standard.pdf

    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 ...

    SystemVerilog Reference Manual 3.1a(中英文版)+最新SV IEEE 标准

    2.2 Literal value syntax..........................................................................................................................4 2.3 Integer and logic literals ........................

    Doctrine ORM for PHP.pdf

    Table of Contents Introduction....................................................................................................13 Code Examples.........................................................

Global site tag (gtag.js) - Google Analytics