cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r290436 - in /cocoon/blocks/forms/trunk: conf/forms-form.xconf conf/forms-form.xroles java/org/apache/cocoon/forms/formmodel/tree/SourceTreeModel.java
Date Tue, 20 Sep 2005 12:42:41 GMT
Author: sylvain
Date: Tue Sep 20 05:42:36 2005
New Revision: 290436

URL: http://svn.apache.org/viewcvs?rev=290436&view=rev
Log:
Add TreeWidget-related declarations in 2.1 conf files

Modified:
    cocoon/blocks/forms/trunk/conf/forms-form.xconf
    cocoon/blocks/forms/trunk/conf/forms-form.xroles
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/SourceTreeModel.java

Modified: cocoon/blocks/forms/trunk/conf/forms-form.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-form.xconf?rev=290436&r1=290435&r2=290436&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-form.xconf (original)
+++ cocoon/blocks/forms/trunk/conf/forms-form.xconf Tue Sep 20 05:42:36 2005
@@ -44,7 +44,14 @@
       <widget name="union" src="org.apache.cocoon.forms.formmodel.UnionDefinitionBuilder"/>
       <widget name="group" src="org.apache.cocoon.forms.formmodel.GroupDefinitionBuilder"/>
       <widget name="captcha" src="org.apache.cocoon.forms.formmodel.CaptchaDefinitionBuilder"/>
+      <widget name="tree" src="org.apache.cocoon.forms.formmodel.tree.builder.TreeDefinitionBuilder"/>
       <widget name="imagemap" src="org.apache.cocoon.forms.formmodel.ImageMapDefinitionBuilder"/>
     </widgets>
   </forms-formmanager>
+
+  <forms-treemodels>
+    <treemodel name="java" class="org.apache.cocoon.forms.formmodel.tree.builder.JavaTreeModelDefinitionBuilder"/>
+    <treemodel name="source" class="org.apache.cocoon.forms.formmodel.tree.builder.SourceTreeModelDefinitionBuilder"/>
+  </forms-treemodels>
+
 </xconf>

Modified: cocoon/blocks/forms/trunk/conf/forms-form.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-form.xroles?rev=290436&r1=290435&r2=290436&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-form.xroles (original)
+++ cocoon/blocks/forms/trunk/conf/forms-form.xroles Tue Sep 20 05:42:36 2005
@@ -20,4 +20,8 @@
   <role name="org.apache.cocoon.forms.FormManager"
         shorthand="forms-formmanager"
         default-class="org.apache.cocoon.forms.DefaultFormManager"/>
+
+  <role name="org.apache.cocoon.forms.formmodel.tree.builder.TreeModelDefinitionBuilderSelector"
+        shorthand="forms-treemodels"
+        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
 </xroles>

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/SourceTreeModel.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/SourceTreeModel.java?rev=290436&r1=290435&r2=290436&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/SourceTreeModel.java
(original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/SourceTreeModel.java
Tue Sep 20 05:42:36 2005
@@ -17,6 +17,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Iterator;
 
 import org.apache.avalon.framework.CascadingRuntimeException;
@@ -119,11 +120,15 @@
         boolean matches = true;
         String name = src.getName();
         
+        //FIXME: match allowed a null Map very recently. Replace it by null once 2.1.8 is
out,
+        // we will gain a few cycles.
+        HashMap junk = new HashMap();
+        
         // check include patterns
         if (include != null && include.length > 0) {
             matches = false;
             check: for (int i = 0; i < include.length; i++) {
-                if (WildcardHelper.match(null, name, include[i])) {
+                if (WildcardHelper.match(junk, name, include[i])) {
                     matches = true;
                     break check;
                 }
@@ -133,7 +138,7 @@
         // check exclude patterns
         if (matches && exclude != null && exclude.length > 0) {
             check: for (int i = 0; i < exclude.length; i++) {
-                if (WildcardHelper.match(null, name, exclude[i])) {
+                if (WildcardHelper.match(junk, name, exclude[i])) {
                     matches = false;
                     break check;
                 }



Mime
View raw message