Search code examples
javaspring-webflowspring-webflow-2

Spring Web Flow: How to call static method from <evaluate />?


I need to call static method of org.hibernate.Hibernate class. How to do that in element of flow ?


Solution

  • You can use the following Spring EL construct to evaluate static methods:

    <evaluate expression="T(org.hibernate.Hibernate).initialize(yourObject)"/>
    

    See the appropriate Spring EL reference part:

    http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/expressions.html#expressions-types