I am having trouble with an OGNL expression to be used to map an input into a subflow. Basically, an object in flow scope has a Map that contains Lists and I want to pass a specific element in the appropriate List to the subflow based upon request parameters. I have spent some time looking over the OGNL documentation but have not found a solution. Here is the subflow definition:
This produces the following error:Code:<subflow-state id="subflow" flow="subflow"> <attribute-mapper> <input value="${flowScope.object.map[sourceEvent.parameters.key][sourceEvent.parameters.number]}" as="input"/> </attribute-mapper> <transition on="finish" to="finish"/> <transition on="error" to="error"/> </subflow-state>
All of the various changes I attempted to use to fix this problem have resulted in some variation of this error. It seems impossible to have OGNL treat the object retrieved from the map as a Collection.Code:ognl.NoSuchPropertyException: java.util.ArrayList.0 at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123) at ognl.ListPropertyAccessor.getProperty(ListPropertyAccessor.java:60) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616) at ognl.ASTProperty.getValueBody(ASTProperty.java:96) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.getValueBody(ASTChain.java:109) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java: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.OgnlExpression.evaluateAgainst(OgnlExpression.java:35) at org.springframework.binding.support.Mapping.map(Mapping.java:90) at org.springframework.binding.support.ParameterizableAttributeMapper.map(ParameterizableAttributeMapper.java:185) at org.springframework.webflow.support.ParameterizableFlowAttributeMapper.createSubflowInput(ParameterizableFlowAttributeMapper.java:269) at org.springframework.webflow.SubflowState.createSubflowInput(SubflowState.java:230) at org.springframework.webflow.SubflowState.doEnter(SubflowState.java:204) at org.springframework.webflow.State.enter(State.java:189) at org.springframework.webflow.Transition.execute(Transition.java:273) at org.springframework.webflow.TransitionableState.onEvent(TransitionableState.java:230) at org.springframework.webflow.execution.FlowExecutionImpl.signalEvent(FlowExecutionImpl.java:341) at org.springframework.webflow.execution.FlowExecutionManager.onEvent(FlowExecutionManager.java:446) at org.springframework.webflow.struts.FlowAction.execute(FlowAction.java:176) at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
If anyone can offer any insight into this problem it would be much appreciated!


Reply With Quote
