You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by gv...@apache.org on 2006/09/02 07:09:48 UTC

svn commit: r439535 - in /shale/framework/trunk: shale-apps/shale-clay-usecases/src/main/webapp/rolodex/ shale-clay/src/main/java/org/apache/shale/clay/component/chain/ shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ shale-clay/src/main/...

Author: gvanmatre
Date: Fri Sep  1 22:09:47 2006
New Revision: 439535

URL: http://svn.apache.org/viewvc?rev=439535&view=rev
Log:
Cleanup of a few Clay/Validator items related to namespace support.

Modified:
    shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jrolodex.html
    shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
    shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java
    shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml

Modified: shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jrolodex.html
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jrolodex.html?rev=439535&r1=439534&r2=439535&view=diff
==============================================================================
--- shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jrolodex.html (original)
+++ shale/framework/trunk/shale-apps/shale-clay-usecases/src/main/webapp/rolodex/jrolodex.html Fri Sep  1 22:09:47 2006
@@ -178,8 +178,8 @@
 				<td><h:inputText id="contactEmail"
 					value="#{@managed-bean-name.selectedContact.email}"
 					required="false" size="30" maxlength="50">
-					   <f:validate extends="commonsValidator" type="email"  
-					        client="true" server="true" arg="#{messages['rolodex.email']}"/>
+					   <s:commonsValidatorEmail client="true" 
+					      server="true" arg="#{messages['rolodex.email']}"/>
 					</h:inputText>
 					</td>
 				<td><h:message for="contactEmail" extends="baseMessage" /></td>

Modified: shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java?rev=439535&r1=439534&r2=439535&view=diff
==============================================================================
--- shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java (original)
+++ shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java Fri Sep  1 22:09:47 2006
@@ -165,7 +165,12 @@
         }
 
         UIComponent child = null;
-        if (displayElement.getFacetName() != null) {
+        String facetName = displayElement.getFacetName();
+        if (facetName != null) {
+            facetName = replaceMnemonic(clayContext, facetName);
+        }
+        
+        if (facetName != null) {
             child = parent.getFacet(displayElement.getFacetName());
         } else {
             child = parent.findComponent(id);
@@ -197,8 +202,8 @@
             }
 
             child.setId(id);
-            if (displayElement.getFacetName() != null) {
-                parent.getFacets().put(replaceMnemonic(clayContext, displayElement.getFacetName()), child);
+            if (facetName != null) {
+                parent.getFacets().put(facetName, child);
 
                 if (log.isDebugEnabled()) {
                     log.debug(getMessages().getMessage("create.facet.component",

Modified: shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java?rev=439535&r1=439534&r2=439535&view=diff
==============================================================================
--- shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java (original)
+++ shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java Fri Sep  1 22:09:47 2006
@@ -344,7 +344,7 @@
                     addConverter(child, target);
                     deleteList.add(child);
                 } else if (child.getName().startsWith("validate")
-                        || child.getName().equals("commonsValidator")) {
+                        || child.getName().startsWith("commonsValidator")) {
                     addValidator(child, target);
                     deleteList.add(child);
                 } else if (child.getName().equals("actionListener")) {

Modified: shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml?rev=439535&r1=439534&r2=439535&view=diff
==============================================================================
--- shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml (original)
+++ shale/framework/trunk/shale-clay/src/main/resources/META-INF/clay-config.xml Fri Sep  1 22:09:47 2006
@@ -286,23 +286,91 @@
       </attributes>
   </component>
   <component jsfid="s:commonsValidator" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorRequired" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorMaxlength" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorMinlength" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorMask" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorByte" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorShort" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorInteger" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorLong" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorFloat" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorDouble" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorDate" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorIntRange" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorFloatRange" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorDoubleRange" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorCreditCard" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorEmail" extends="commonsValidator" />
-  <component jsfid="s:commonsValidatorUrl" extends="commonsValidator" />
+  <component jsfid="s:commonsValidatorRequired" extends="commonsValidator">
+      <attributes>
+        <set name="type" value="required"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorMaxlength" extends="commonsValidator">
+      <attributes>
+        <set name="type" value="maxlength"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorMinlength" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="minlength"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorMask" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="mask"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorByte" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="byte"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorShort" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="short"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorInteger" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="integer"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorLong" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="long"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorFloat" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="float"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorDouble" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="double"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorDate" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="date"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorIntRange" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="intRange"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorFloatRange" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="floatRange"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorDoubleRange" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="doubleRange"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorCreditCard" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="creditCard"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorEmail" extends="commonsValidator" >
+        <attributes>
+        <set name="type" value="email"/>
+      </attributes>
+  </component>
+  <component jsfid="s:commonsValidatorUrl" extends="commonsValidator" >
+      <attributes>
+        <set name="type" value="url"/>
+      </attributes>
+  </component>
 
   <!--  Provide ViewController support functionality for the nested content
       (typically a JSP dynamic include) of this component.