cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r389122 - /cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
Date Mon, 27 Mar 2006 12:45:26 GMT
Author: cziegeler
Date: Mon Mar 27 04:45:25 2006
New Revision: 389122

URL: http://svn.apache.org/viewcvs?rev=389122&view=rev
Log:
Adding setId()

Modified:
    cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java

Modified: cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java?rev=389122&r1=389121&r2=389122&view=diff
==============================================================================
--- cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
(original)
+++ cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
Mon Mar 27 04:45:25 2006
@@ -72,6 +72,8 @@
     // Widgets that have at least one descendant that has to be updated
     private Set childUpdatedWidgets;
 
+    // Optional id which overrides the value from the form definition
+    private String id;
 
     public Form(FormDefinition definition) {
         super(definition);
@@ -431,5 +433,23 @@
 
     public String getXMLElementName() {
         return FORM_EL;
+    }
+
+    /**
+     * @see org.apache.cocoon.forms.formmodel.AbstractWidget#getId()
+     */
+    public String getId() {
+        if ( this.id != null ) {
+            return this.id;
+        }
+        return super.getId();
+    }
+
+    /**
+     * Set the optional id.
+     * @param value A new id.
+     */
+    public void setId(String value) {
+        this.id = value;
     }
 }



Mime
View raw message