You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by gv...@apache.org on 2006/02/14 05:57:46 UTC
svn commit: r377621 - in
/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay:
component/Clay.java component/chain/CreateComponentCommand.java
config/beans/AttributeBean.java config/beans/Attributes.java
config/beans/ComponentBean.java
Author: gvanmatre
Date: Mon Feb 13 20:57:44 2006
New Revision: 377621
URL: http://svn.apache.org/viewcvs?rev=377621&view=rev
Log:
Second pass at Bug# 38542.
Added:
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java (with props)
Modified:
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/AttributeBean.java
struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/ComponentBean.java
Modified: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java?rev=377621&r1=377620&r2=377621&view=diff
==============================================================================
--- struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java (original)
+++ struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/Clay.java Mon Feb 13 20:57:44 2006
@@ -396,7 +396,7 @@
/**
* <p>
- * Called by JSF, this method delegates to {@link recursiveRenderChildren}.
+ * Called by JSF, this method delegates to <code>recursiveRenderChildren</code>.
* </p>
*/
public void encodeChildren(FacesContext context) throws IOException {
Modified: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java?rev=377621&r1=377620&r2=377621&view=diff
==============================================================================
--- struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java (original)
+++ struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/component/chain/CreateComponentCommand.java Mon Feb 13 20:57:44 2006
@@ -19,7 +19,6 @@
package org.apache.shale.clay.component.chain;
import java.util.Map;
-import java.util.TreeMap;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -31,9 +30,8 @@
import org.apache.shale.clay.component.Clay;
import org.apache.shale.clay.config.Globals;
import org.apache.shale.clay.config.beans.AttributeBean;
+import org.apache.shale.clay.config.beans.Attributes;
import org.apache.shale.clay.config.beans.ComponentBean;
-import org.apache.shale.faces.ShaleConstants;
-import org.apache.shale.util.Tags;
/**
* <p>
@@ -84,7 +82,7 @@
.getMessage("clay.null.facesContext"));
// create a new scoped symbol table
- Map symbolTable = new TreeMap();
+ Map symbolTable = new Attributes();
// inherit the parents symbols
symbolTable.putAll(clayContext.getSymbols());
// override config (XML, HTML) symbols
@@ -166,8 +164,8 @@
child.getAttributes().put(Globals.CLAY_RESERVED_ATTRIBUTE, displayElement);
}
- // continue with the addComponent chain if not a bound component
- isFinal = (child.getValueBinding("binding") != null);
+ // continue with the addComponent chain
+ isFinal = false;
} else {
if (log.isDebugEnabled())
log.debug(messages.getMessage("create.component.exists",
Modified: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/AttributeBean.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/AttributeBean.java?rev=377621&r1=377620&r2=377621&view=diff
==============================================================================
--- struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/AttributeBean.java (original)
+++ struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/AttributeBean.java Mon Feb 13 20:57:44 2006
@@ -1,5 +1,4 @@
/*
-/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Added: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java?rev=377621&view=auto
==============================================================================
--- struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java (added)
+++ struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java Mon Feb 13 20:57:44 2006
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id$
+ */
+
+package org.apache.shale.clay.config.beans;
+
+import java.util.TreeMap;
+
+/**
+ * <p>Normalize the case of a String key to lower case making
+ * the collection case insensitive.</p>
+ */
+public class Attributes extends TreeMap {
+
+ private static final long serialVersionUID = 3905244515647173938L;
+
+ /**
+ * <p>Make the key case insensitive.</p>
+ */
+ public boolean containsKey(Object key) {
+ Object normKey = null;
+
+ if (key != null && key instanceof String)
+ normKey = ((String) key).toLowerCase();
+ else
+ normKey = key;
+
+ return super.containsKey(normKey);
+ }
+
+ /**
+ * <p>Make the key case insensitive.</p>
+ */
+ public Object get(Object key) {
+ Object normKey = null;
+ if (key != null && key instanceof String)
+ normKey = ((String) key).toLowerCase();
+ else
+ normKey = key;
+
+ return super.get(normKey);
+ }
+
+ /**
+ * <p>Make the key case insensitive.</p>
+ */
+ public Object put(Object key, Object value) {
+ Object normKey = null;
+ if (key != null && key instanceof String)
+ normKey = ((String) key).toLowerCase();
+ else
+ normKey = key;
+
+ return super.put(normKey, value);
+ }
+
+}
Propchange: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/Attributes.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/ComponentBean.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/ComponentBean.java?rev=377621&r1=377620&r2=377621&view=diff
==============================================================================
--- struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/ComponentBean.java (original)
+++ struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/config/beans/ComponentBean.java Mon Feb 13 20:57:44 2006
@@ -68,57 +68,7 @@
* <p>Unique id that points to component meta information.</p>
*/
private String jsfid = null;
-
- /**
- * <p>Normalize the case of a String key to lower case making
- * the collection case insensitive.</p>
- */
- protected class Attributes extends TreeMap {
-
- private static final long serialVersionUID = 3905244515647173938L;
-
- /**
- * <p>Make the key case insensitive.</p>
- */
- public boolean containsKey(Object key) {
- Object normKey = null;
-
- if (key != null && key instanceof String)
- normKey = ((String) key).toLowerCase();
- else
- normKey = key;
-
- return super.containsKey(normKey);
- }
-
- /**
- * <p>Make the key case insensitive.</p>
- */
- public Object get(Object key) {
- Object normKey = null;
- if (key != null && key instanceof String)
- normKey = ((String) key).toLowerCase();
- else
- normKey = key;
-
- return super.get(normKey);
- }
-
- /**
- * <p>Make the key case insensitive.</p>
- */
- public Object put(Object key, Object value) {
- Object normKey = null;
- if (key != null && key instanceof String)
- normKey = ((String) key).toLowerCase();
- else
- normKey = key;
-
- return super.put(normKey, value);
- }
-
- }
-
+
/**
* <p>This value pair collection is used to set the property values for JSF object
* implementing <code>UIComponent, Validator, ValueChangeListener, ActionListener
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org