Announcement Announcement Module
Collapse
No announcement yet.
OGNL error with subflow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OGNL error with subflow

    I have a simple flow - subflow structure, where we are trying to use a attribute-mapper to pass a parameter to the subflow. (PR3)

    Following the examples we have:

    Code:
    <attribute-mapper>
    	<input name="$&#123;flowScope.name&#125;" as="name" />
    </attribute-mapper>
    But this yields an error when accessing the flow:

    org.springframework.binding.expression.EvaluationE xception: ognl.OgnlException: source is null for getProperty(null, "name")
    at org.springframework.binding.expression.support.Ogn lExpressionEvaluator.evaluate(OgnlExpressionEvalua tor.java:32)
    at org.springframework.web.flow.config.XmlFlowBuilder $FlowScopeExpressionEvaluator.evaluate(XmlFlowBuil der.java:856)
    at org.springframework.binding.support.Mapping.map(Ma pping.java:91)
    ...
    Caused by: ognl.OgnlException: source is null for getProperty(null, "name")
    at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1611 )
    at ognl.ASTProperty.getValueBody(ASTProperty.java:96)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.ja va:170)
    at ognl.SimpleNode.getValue(SimpleNode.java:210)
    at ognl.ASTChain.getValueBody(ASTChain.java:109)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.ja va:170)
    at ognl.SimpleNode.getValue(SimpleNode.java:210)
    at ognl.Ognl.getValue(Ognl.java:333)
    at ognl.Ognl.getValue(Ognl.java:310)
    at org.springframework.binding.expression.support.Ogn lExpressionEvaluator.evaluate(OgnlExpressionEvalua tor.java:30)
    ...

    A little digging shows the problem is deep in OGNL - the 'source' is not null at the beginning of the call chain but gets overwritten to null in ognl.ASTChain.getValueBody.

    What am I missing?

  • #2
    You want <input value="${flowScope.name}" as="name"/> not input "name".

    Comment


    • #3
      Doh!
      Thanks for the quick reply.

      Comment

      Working...
      X