cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r328311 - /cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java
Date Tue, 25 Oct 2005 08:28:47 GMT
Author: giacomo
Date: Tue Oct 25 01:28:41 2005
New Revision: 328311

URL: http://svn.apache.org/viewcvs?rev=328311&view=rev
Log:
Now that fi:styling is gone allow a template to overwrite the state of a widget

Modified:
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java?rev=328311&r1=328310&r2=328311&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java
(original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java
Tue Oct 25 01:28:41 2005
@@ -30,6 +30,7 @@
 import org.apache.cocoon.forms.formmodel.Form;
 import org.apache.cocoon.forms.formmodel.Repeater;
 import org.apache.cocoon.forms.formmodel.Widget;
+import org.apache.cocoon.forms.formmodel.WidgetState;
 import org.apache.cocoon.forms.formmodel.tree.Tree;
 import org.apache.cocoon.forms.formmodel.tree.TreeWalker;
 import org.apache.cocoon.forms.validation.ValidationError;
@@ -286,6 +287,10 @@
      */
     public void generateWidget(Widget widget, Map arguments) throws SAXException {
         // Needs to be buffered
+        String state = (String)arguments.get("state");
+        if (state != null) {
+            widget.setState(WidgetState.stateForName(state));
+        }
         RootBufferingPipe pipe = new RootBufferingPipe(this.cocoonConsumer, arguments);
         this.pipeStack.push(pipe);
         widget.generateSaxFragment(pipe, this.locale);



Mime
View raw message