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/02/26 11:14:30 UTC
svn commit: r631153 - in
/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm:
DynaConfig.java DynaConfigs.java DynaForm.java
Author: skitching
Date: Tue Feb 26 02:14:29 2008
New Revision: 631153
URL: http://svn.apache.org/viewvc?rev=631153&view=rev
Log:
Add comments only
Modified:
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfig.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfigs.java
myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfig.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfig.java?rev=631153&r1=631152&r2=631153&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfig.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfig.java Tue Feb 26 02:14:29 2008
@@ -26,8 +26,17 @@
import javax.faces.el.ValueBinding;
/**
- * the dynaForm configuration component<br />
- * handles overruled field setup
+ * Overrule the way DynaForm presents a specific persistent attribute.
+ * <p>
+ * The DynaForm uses a pluggable Extractor to analyse a particular class and determine what
+ * persistent properties it has, and how to render them. By default the dynaform will
+ * create a JSF component for each one of the detected persitent properties, using the
+ * detected metadata.
+ * <p>
+ * Any number of instances of this component can be added as children to a DynaForm component
+ * to override the settings auto-detected by the Extractor. Each instance overrides the properties
+ * of a single persistent field. The attribute "for" on this component should specify the name
+ * of the property to override.
*/
public class DynaConfig extends UIComponentBase
{
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfigs.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfigs.java?rev=631153&r1=631152&r2=631153&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfigs.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaConfigs.java Tue Feb 26 02:14:29 2008
@@ -24,8 +24,10 @@
import java.util.Map;
/**
- * the dynaForm configuration component<br />
- * handles overruled field setup
+ * An instance of this type can hold any number of DynaConfig components as children.
+ * <p>
+ * It provides simple lookup methods for finding a child DynaConfig object given
+ * the name of the "for" attribute on that DynaConfig instance.
*/
public class DynaConfigs extends UIComponentBase
{
Modified: myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java?rev=631153&r1=631152&r2=631153&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java (original)
+++ myfaces/orchestra/trunk/core15/src/main/java/org/apache/myfaces/orchestra/dynaForm/component/dynaForm/DynaForm.java Tue Feb 26 02:14:29 2008
@@ -510,11 +510,21 @@
return null;
}
- // TODO: this is not compatible with JSF1.1
- // Some JVMs delay loading of referenced classes as long as possible, but this is not part
- // of the java spec; any class A that has a ref to class B is not theoretically valid if
- // B is not in the classpath - even if some JVMs don't actually throw an exception unless
- // that class is used.
+ /**
+ * Note that this method should only be called when _FacesUtils.useValueExpression is true,
+ * ie when the JSF1.2 libraries are in the classpath.
+ * <p>
+ * TODO: This is not safe code. The intention is that this class is usable in JSF1.1 as
+ * long as this method is not called. However there is no guarantee that the JVM will
+ * delay attempting to resolve the ELContext class until this method is called. The
+ * Sun JVM does happen to currently do this, but future versions may not, and neither
+ * may other java implementations. Instead, the better approach is to create our own
+ * ExpressionEvaluator interface, then choose one of two different concrete implementations
+ * depending upon which runtime environment we are in.
+ * <p>
+ * It is still not clear why we need this anyway; instead of storing a context for later
+ * use, why not just use the context available at the time an expression must be evaluated?
+ */
public ELContext getELContext()
{
return elcontext;