input request parameter in SWF 2 RC 1
I am using the following to map my request parameters in the flow:
lt;input name=quot;idquot; required=quot;truequot; type=quot;longquot;/gt;
lt;on-startgt; lt;evaluate expression=quot;invoiceService.get(id)quot; result=quot;flowScope.invoicequot; /gt;
lt;/on-startgt;
I get the following error:
org..webflow.engine.FlowInputMappin gException: Errors occurred during input mapping on startup of the 'invoice' flow; errors = [[MappingResult@6455ae mapping = id -gt; id, result = [TargetAccessError@1354a1a errorCode = 'propertyNotFound', details = '[SetValueAttempt@17a35c expression = id, context = [RequestControlContextImpl@1e608c2 externalContext = org..webflow.context.servlet.Servle tExternalContext@de0cc2, requestScope = map[[empty]], attributes = map[[empty]], flowExecution = [FlowExecutionImpl@1491e75 flow = 'invoice', flowSessions = list[[FlowSessionImpl@16ea258 flow = 'invoice', state = [null], scope = map['session' -gt; SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])]]], flashScope = map[[empty]]]], value = 15] failed - make sure the expression is evaluatable in the context provided']]]
org..webflow.engine.Flow.start(Flow .java:497)
org..webflow.engine.impl.FlowExecut ionImpl.start(FlowExecutionImpl.java:360)
org..webflow.engine.impl.FlowExecut ionImpl.start(FlowExecutionImpl.java:245)
I can have this working using the following: lt;on-startgt; lt;set name=quot;requestScope.idquot; value=quot;requestParameters.idquot; type=quot;longquot; /gt; lt;evaluate expression=quot;invoiceService.get(id)quot; result=quot;flowScope.invoicequot; /gt; lt;/on-startgt;
But this couples my flow to the servlet api
Ivan,
This is a disconnect between the user documentation and the current implementation. I'll create a JIRA on this and will take care of it.
For now you need to do this
Code:
lt;input name=quot;idquot; value=quot;flowScope.idquot; required=quot;truequot; type=quot;longquot;/gt;
The implicit appending of flowScope to the value expression is not yet supported as of RC1. The docs are misleading in this respect, and we'll fix this by bringing the implementation in-line with the docs.
Keith
This has been resolved: browse/SWF-599.
If you can verify the resolution works for you in your environment, that'd be great. The booking sample has also been updated.
Keith
Hi Keith,
It works great. |