springspring-webflowspring-webflow-2

can spring webflow handle a dynamic expression inside "evaluate" tag?


I see that in spring webflow you can use dynamic expression for the view

<view-state id="error" view="error-#{externalContext.locale}.xhtml" />

Can I do the same for evaluate ? Something like:

 <evaluate expression="#{variable}Controller.processData()" />

Thanks in advance for your help.


Solution

  • Let me answer my own question: No, that's not possible. According to the xsd of spring webflow:

    <xsd:attribute name="expression" type="expression" use="required">
    

    where

    <xsd:simpleType name="expression">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    
    <xsd:simpleType name="template">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
    

    According to the documentation the expression should have been of type "template" so that it is evaluated.