husted 2002/08/20 14:35:25
Modified: contrib/scaffold/src/java/org/apache/struts/scaffold
ProcessFormAction.java ProcessAction.java
Log:
+ ProcessAction: Update to use LIST_KEY
+ ProcessFormAction: Expanded JavaDocs
Revision Changes Path
1.4 +21 -4
jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessFormAction.java
Index: ProcessFormAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessFormAction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ProcessFormAction.java 16 Aug 2002 22:29:24 -0000 1.3
+++ ProcessFormAction.java 20 Aug 2002 21:35:25 -0000 1.4
@@ -11,9 +11,26 @@
import org.apache.commons.scaffold.lang.Tokens;
/**
- * ProcessAction subclass that checks to see if a single form
- * bean exists before overwriting it. If it does exist,
- * the (presumably form) bean is populated from the result.
+ * ProcessAction subclass that checks to see if a another
+ * bean exists in the request scope before overwriting it.
+ * If another bean is present, it is populated from the
+ * ProcessBean.
+ * <P>
+ * Any JavaBean can be used to populate a Struts presentation
+ * page, and it is not always necessary to transfer data from
+ * a business bean to a form bean.
+ * Other times, the form bean will have special helper
+ * properties for the benefit of the presentation layer.
+ * For example, a second password field may be needed to
+ * validate the user's data-entry but would not be part of
+ * the business API.
+ * <P>
+ * The <CODE>ProcessFormAction</CODE> will check to see if
+ * another bean is in scope (presumably a form bean).
+ * If another bean exists, ProcessFormAction populates it
+ * from the business bean,
+ * The net result is an automatic data transfer from a
+ * business bean to the form bean.
*
* @author Ted Husted
* @author OK State DEQ
1.2 +2 -2
jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessAction.java
Index: ProcessAction.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/ProcessAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProcessAction.java 14 Aug 2002 18:30:08 -0000 1.1
+++ ProcessAction.java 20 Aug 2002 21:35:25 -0000 1.2
@@ -162,7 +162,7 @@
String name = result.getName();
if (null==name) {
- name = Tokens.RESULT_KEY;
+ name = Tokens.LIST_KEY;
result.setName(name);
}
String scope = result.getScope();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>