You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/10/16 10:23:35 UTC
svn commit: r705170 - in
/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config:
FlowCall.java FlowReturnAccept.java
Author: skitching
Date: Thu Oct 16 01:23:35 2008
New Revision: 705170
URL: http://svn.apache.org/viewvc?rev=705170&view=rev
Log:
Allow a null value for the "dst" el-expression in a call-return. This allows the caller to ignore return values.
Modified:
myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java
myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java
Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java?rev=705170&r1=705169&r2=705170&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowCall.java Thu Oct 16 01:23:35 2008
@@ -143,8 +143,12 @@
FlowReturnAccept param = (FlowReturnAccept) i.next();
String paramName = param.getName();
String dst = param.getDst();
- ValueBinding vb = facesContext.getApplication().createValueBinding(dst);
- vb.setValue(facesContext, data.get(paramName));
+ if (dst != null)
+ {
+ // note: dst is null when the caller doesn't want to use the returned value.
+ ValueBinding vb = facesContext.getApplication().createValueBinding(dst);
+ vb.setValue(facesContext, data.get(paramName));
+ }
}
}
Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java?rev=705170&r1=705169&r2=705170&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/config/FlowReturnAccept.java Thu Oct 16 01:23:35 2008
@@ -46,7 +46,11 @@
if (dst == null)
{
- throw new OrchestraException("dst is null");
+ // This simply indicates that the flow is returning a value that the caller doesn't care about.
+ // The caller does need to add an entry to indicate that it knows the value is being returned,
+ // but leaving dst empty indicates that it doesn't want the value to be stored anywhere.
+ //
+ // log.debug("Calling flow is ignoring return value " + name);
}
}
@@ -82,6 +86,6 @@
/** For use only during object initialization. */
public void setDst(String expr)
{
- this.dst = expr;
+ dst = expr;
}
}