myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r711565 - /myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/components/
Date Wed, 05 Nov 2008 13:47:11 GMT
Author: skitching
Date: Wed Nov  5 05:47:11 2008
New Revision: 711565

Add comment only (re need to parse EL expressions immediately)


Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/components/
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/components/
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/components/
Wed Nov  5 05:47:11 2008
@@ -66,6 +66,7 @@
     public static final String COMPONENT_FAMILY = "javax.faces.Component";
     public static final String COMPONENT_TYPE = "org.apache.myfaces.orchestra.flow.components.FlowCall";
+    // This must not be transient; it is needed during postback
     private FlowCall flowCall;
     private transient String outcome;
@@ -112,6 +113,26 @@
+            // Parse the plain xml that is nested within this component.
+            //
+            // Note that it is important that any EL expressions within this text content
be converted into
+            // real EL-expression objects immediately, rather than simply being stored as
strings and the
+            // EL expression objects being created later when needed. The reason is that
during the building
+            // of the component tree, the "current expression context" may be modified. Creating
an EL
+            // expression captures the current state of the "expression context" so that
when the EL expression
+            // is later executed it runs with the appropriate environment. In particular,
the Facelets
+            // ui:include tag can include ui:param tags that expose data to the nested components,
+            // mapping a name to another EL expression during the build-tree phase (note:
the param-expression
+            // is not *evaluated*; the name maps to the expression itself, not its value).
When the included page
+            // creates EL objects, they internally remember the current mappings. During
rendering, the ui:param
+            // settings are *not* restored; rendering simply walks the tree of components
and a ui:include is not
+            // a component. However the EL expression objects have enough info to recreate
the ui:param settings
+            // that existed when the EL expression was created, so setValue and getValue
work ok.
+            //
+            // Of course, the above only applies when running in an environment that supports
javax.el (ie JSF1.2
+            // or JSF1.1 with Facelets). For JSF1.1 with JSP, this is not relevant; there
is no standard support
+            // for passing "parameters" to included files. There is one non-standard way:
the Tomahawk t:aliasBean
+            // tag. I don't know how that works with respect to orchestra flow....
             flowCall = new FlowCall();

View raw message