Author: gvanmatre Date: Tue Jun 6 20:05:59 2006 New Revision: 412261 URL: http://svn.apache.org/viewvc?rev=412261&view=rev Log: Added the name space prefix to the jsfid for full html views to allow component libraries like tomahawk to be easily pluggable.
Modified: struts/shale/branches/mvn_reorg/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java struts/shale/branches/mvn_reorg/shale-clay/src/main/resources/META-INF/clay-config.xml Modified: struts/shale/branches/mvn_reorg/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java URL: http://svn.apache.org/viewvc/struts/shale/branches/mvn_reorg/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java?rev=412261&r1=412260&r2=412261&view=diff ============================================================================== --- struts/shale/branches/mvn_reorg/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java (original) +++ struts/shale/branches/mvn_reorg/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/JsfDefaultBuilder.java Tue Jun 6 20:05:59 2006 @@ -265,11 +265,20 @@ * name is assigned to the jsfid.</p> */ protected String getJsfid(Node node) { - String jsfid = null; - if ((jsfid = (String) node.getAttributes().get("extends")) != null) { - return jsfid; - } else - return node.getName(); + StringBuffer jsfid = new StringBuffer(); + if (node.getAttributes().containsKey("extends")) { + jsfid.append(node.getAttributes().get("extends")); + } else { + jsfid.append(node.getName()); + + if (node.getQname() != null) { + jsfid.insert(0, ':'); + jsfid.insert(0, node.getQname()); + } + } + + + return jsfid.toString(); } } Modified: struts/shale/branches/mvn_reorg/shale-clay/src/main/resources/META-INF/clay-config.xml URL: http://svn.apache.org/viewvc/struts/shale/branches/mvn_reorg/shale-clay/src/main/resources/META-INF/clay-config.xml?rev=412261&r1=412260&r2=412261&view=diff ============================================================================== --- struts/shale/branches/mvn_reorg/shale-clay/src/main/resources/META-INF/clay-config.xml (original) +++ struts/shale/branches/mvn_reorg/shale-clay/src/main/resources/META-INF/clay-config.xml Tue Jun 6 20:05:59 2006 @@ -27,15 +27,22 @@ <component jsfid="converter" componentType="override"> <description>Abstract component definition.</description> </component> + <component jsfid="f:converter" extends="converter"/> + <component jsfid="validator" componentType="override"> <description>Abstract component definition.</description> </component> + <component jsfid="f:validator" extends="validator"/> + <component jsfid="actionListener" componentType="override"> <description>Abstract component definition.</description> </component> + <component jsfid="f:actionListener" extends="actionListener"/> + <component jsfid="valueChangeListener" componentType="override"> <description>Abstract component definition.</description> </component> + <component jsfid="f:valueChangeListener" extends="valueChangeListener"/> <component jsfid="baseComponent" componentType="override"> <description>Abstract component definition extended by baseHtml, token, subview, @@ -237,6 +244,7 @@ same form was submitted more than once. </description> </component> + <component jsfid="s:token" extends="token"/> <component jsfid="commonsValidator" componentType="org.apache.shale.CommonsValidator" allowBody="false"> <description>This is a JSF validator that uses Commons Validator to perform @@ -277,6 +285,7 @@ </set> </attributes> </component> + <component jsfid="s:commonsValidator" extends="commonsValidator" /> <!-- Provide ViewController support functionality for the nested content (typically a JSP dynamic include) of this component. @@ -288,6 +297,7 @@ to the managed bean name that must be a ViewController. </description> </component> + <component jsfid="f:subview" extends="subview"/> <component jsfid="validatorScript" id="validatorScript" componentType="org.apache.shale.ValidatorScript" allowBody="false" extends="baseComponent"> @@ -300,6 +310,7 @@ </set> </attributes> </component> + <component jsfid="s:validatorScript" extends="validatorScript"/> <component jsfid="outputText" componentType="javax.faces.HtmlOutputText" extends="baseHtml"> <description>Render readonly text.</description> @@ -312,6 +323,7 @@ </set> </attributes> </component> + <component jsfid="h:outputText" extends="outputText"/> <component jsfid="parameter" componentType="javax.faces.Parameter" extends="baseComponent"> <description>Render a url query parameter argument.</description> @@ -325,6 +337,7 @@ </attributes> </component> <component jsfid="param" extends="parameter"/> + <component jsfid="f:param" extends="param"/> <component jsfid="selectItem" componentType="javax.faces.SelectItem" extends="baseComponent"> <description>Render a single html option tag.</description> @@ -346,6 +359,7 @@ </set> </attributes> </component> + <component jsfid="f:selectItem" extends="selectItem"/> <component jsfid="verbatim" extends="outputText"> <description>Render plain text.</description> @@ -355,6 +369,7 @@ </set> </attributes> </component> + <component jsfid="f:verbatim" extends="verbatim"/> <component jsfid="ignore" componentType="javax.faces.HtmlOutputText"> <description> @@ -383,6 +398,7 @@ </set> </attributes> </component> + <component jsfid="h:selectItems" extends="selectItems"/> <component jsfid="selectOneRadio" componentType="javax.faces.HtmlSelectOneRadio" extends="baseInput"> <description>Render a set of html input elements of type radio.</description> @@ -395,15 +411,18 @@ </set> </attributes> </component> + <component jsfid="h:selectOneRadio" extends="selectOneRadio" /> <component jsfid="selectOneMenu" componentType="javax.faces.HtmlSelectOneMenu" extends="baseInput"> <description> Render a select element without a multiple attribute.</description> </component> + <component jsfid="h:selectOneMenu" extends="selectOneMenu"/> <component jsfid="selectManyMenu" componentType="javax.faces.HtmlSelectManyMenu" extends="baseInput"> <description>Render a select element with a multiple attribute.</description> </component> + <component jsfid="h:selectManyMenu" extends="selectManyMenu" /> <component jsfid="manySelectCheckbox" componentType="javax.faces.HtmlSelectManyCheckbox" extends="baseInput"> <description> Render a set of html input elements of type checkbox.</description> @@ -413,14 +432,17 @@ </set> </attributes> </component> + <component jsfid="h:manySelectCheckbox" extends="manySelectCheckbox"/> <component jsfid="selectBooleanCheckbox" componentType="javax.faces.HtmlSelectBooleanCheckbox" extends="baseInput"> <description>Render a html input element of type checkbox.</description> </component> + <component jsfid="h:selectBooleanCheckbox" extends="selectBooleanCheckbox" /> <component jsfid="panelGroup" componentType="javax.faces.HtmlPanelGroup" extends="baseHtml"> <description>Render a html "span" element around its nested components</description> </component> + <component jsfid="h:panelGroup" extends="panelGroup"/> <component jsfid="outputLink" componentType="javax.faces.HtmlOutputLink" extends="baseOutput"> <description>Render a html "a" element.</description> @@ -430,6 +452,7 @@ </set> </attributes> </component> + <component jsfid="h:outputLink" extends="outputLink" /> <component jsfid="outputLabel" componentType="javax.faces.HtmlOutputLabel" extends="baseOutput"> <description>Render a html label element.</description> @@ -439,6 +462,8 @@ </set> </attributes> </component> + <component jsfid="h:outputLabel" extends="outputLabel"/> + <component jsfid="inputTextarea" componentType="javax.faces.HtmlInputTextarea" extends="baseInput"> <description>Render a html "textarea" element.</description> @@ -451,6 +476,7 @@ </set> </attributes> </component> + <component jsfid="h:inputTextarea" extends="inputTextarea"/> <component jsfid="inputSecret" componentType="javax.faces.HtmlInputSecret" extends="baseInput"> <description>Render a html input element of type password.</description> @@ -467,6 +493,7 @@ </set> </attributes> </component> + <component jsfid="h:inputSecret" extends="inputSecret"/> <component jsfid="inputHidden" componentType="javax.faces.HtmlInputHidden" extends="baseComponent"> <description>Render a html input element of type hidden.</description> @@ -488,6 +515,7 @@ </set> </attributes> </component> + <component jsfid="h:inputHidden" extends="inputHidden" /> <component jsfid="image" componentType="javax.faces.HtmlGraphicImage" extends="baseHtml"> <description>Render a html "img" element.</description> @@ -534,6 +562,7 @@ </component> <component jsfid="graphicImage" extends="image"/> + <component jsfid="h:graphicImage" extends="graphicImage"/> <component jsfid="form" componentType="javax.faces.HtmlForm" extends="baseHtml"> <description>Render a html form element.</description> @@ -562,6 +591,7 @@ </set> </attributes> </component> + <component jsfid="h:form" extends="form" /> <component jsfid="dataTable" componentType="javax.faces.HtmlDataTable" extends="baseHtml"> <description>Render an html table that is populated from a backing dynamic collection.</description> @@ -630,6 +660,7 @@ </set> </attributes> </component> + <component jsfid="h:dataTable" extends="dataTable"/> <component jsfid="commandLink" componentType="javax.faces.HtmlCommandLink" extends="baseAction"> <description>Render a html anchor link that simulates a button by invoking a form submit.</description> @@ -670,10 +701,12 @@ </set> </attributes> </component> + <component jsfid="h:commandLink" extends="commandLink"/> <component jsfid="column" componentType="javax.faces.Column" extends="baseComponent"> <description>Defines a column of data within a dataTable component.</description> </component> + <component jsfid="h:column" extends="column"/> <component jsfid="inputText" componentType="javax.faces.HtmlInputText" extends="baseInput"> <description>Render a html input element of type text.</description> @@ -689,10 +722,12 @@ </set> </attributes> </component> + <component jsfid="h:inputText" extends="inputText"/> <component jsfid="outputFormat" componentType="javax.faces.HtmlOutputFormat" extends="baseOutput"> <description>Render a readonly text value substituting inline string parameters. </description> </component> + <component jsfid="h:outputFormat" extends="outputFormat"/> <component jsfid="messages" componentType="javax.faces.HtmlMessages" extends="baseHtml"> <description>Renders a set of readonly text messages. </description> @@ -737,7 +772,8 @@ <description></description> </set> </attributes> - </component> + </component> + <component jsfid="h:messages" extends="messages"/> <component jsfid="message" componentType="javax.faces.HtmlMessage" extends="baseHtml"> <description>Render a readonly text message associated with an input element.</description> @@ -780,7 +816,8 @@ </set> </attributes> - </component> + </component> + <component jsfid="h:message" extends="message"/> <component jsfid="commandButton" componentType="javax.faces.HtmlCommandButton" extends="baseAction"> <description>Render a html input element of type "submit".</description> @@ -823,6 +860,7 @@ </set> </attributes> </component> + <component jsfid="h:commandButton" extends="commandButton"/> <component jsfid="panelGrid" componentType="javax.faces.HtmlPanelGrid" extends="baseHtml"> <description>Render a HTML table element.</description> @@ -885,6 +923,7 @@ </set> </attributes> </component> + <component jsfid="h:panelGrid" extends="panelGrid"/> <component jsfid="namingContainer" componentType="javax.faces.NamingContainer"> <description> @@ -892,6 +931,7 @@ null renderer and is not associated with an html element. </description> </component> + <component jsfid="clay:namingContainer" extends="namingContainer"/> <!-- Renders a html space. @@ -907,51 +947,61 @@ </set> </attributes> </component> + <component jsfid="clay:space" extends="space"/> <component jsfid="bigDecimalConverter" componentType="javax.faces.BigDecimal"> <description>Converts a String value into a java.util.BigDecimal type and back to a String.</description> </component> <component jsfid="convertBigDecimal" extends="bigDecimalConverter"/> + <component jsfid="f:convertBigDecimal" extends="convertBigDecimal"/> <component jsfid="bigIntegerConverter" componentType="javax.faces.BigInteger"> <description>Converts a String value into a java.util.BigInteger type and back to a String.</description> </component> <component jsfid="convertBigInteger" extends="bigIntegerConverter"/> + <component jsfid="f:convertBigInteger" extends="convertBigInteger"/> <component jsfid="booleanConverter" componentType="javax.faces.Boolean"> <description>Converts a String value into a java.lang.Boolean type and back to a String.</description> </component> <component jsfid="convertBoolean" extends="booleanConverter"/> + <component jsfid="f:convertBoolean" extends="convertBoolean"/> <component jsfid="byteConverter" componentType="javax.faces.Byte"> <description>Converts a String value into a java.lang.Byte type and back to a String.</description> </component> <component jsfid="convertByte" extends="byteConverter"/> + <component jsfid="f:convertByte" extends="convertByte"/> <component jsfid="characterConverter" componentType="javax.faces.Character"> <description>Converts a String value into a java.lang.Character type and back to a String.</description> </component> <component jsfid="convertCharacter" extends="characterConverter"/> + <component jsfid="f:convertCharacter" extends="convertCharacter"/> <component jsfid="doubleConverter" componentType="javax.faces.Double"> <description>Converts a String value into a java.lang.Double type and back to a String.</description> </component> <component jsfid="convertDouble" extends="doubleConverter"/> + <component jsfid="f:convertDouble" extends="convertDouble"/> <component jsfid="floatConverter" componentType="javax.faces.Float"> <description>Converts a String value into a java.lang.Float type and back to a String.</description> </component> <component jsfid="convertFloat" extends="floatConverter"/> + <component jsfid="f:convertFloat" extends="convertFloat"/> <component jsfid="integerConverter" componentType="javax.faces.Integer"> <description>Converts a string value into an java.lang.Integer type and back to a string.</description> </component> <component jsfid="convertInteger" extends="integerConverter"/> + <component jsfid="f:convertInteger" extends="convertInteger"/> <component jsfid="longConverter" componentType="javax.faces.Long"> <description>Converts a String value into a java.lang.Long type and back to a String.</description> </component> <component jsfid="convertLong" extends="longConverter"/> + <component jsfid="f:convertLong" extends="convertLong"/> <component jsfid="numberConverter" componentType="javax.faces.Number"> <description>Converts a String into a number and back to a String.</description> @@ -991,12 +1041,13 @@ </attributes> </component> <component jsfid="convertNumber" extends="numberConverter"/> + <component jsfid="f:convertNumber" extends="convertNumber"/> <component jsfid="shortConverter" componentType="javax.faces.Short"> <description>Converts a String value into a java.lang.Short type and back to a String.</description> </component> <component jsfid="convertShort" extends="shortConverter"/> - + <component jsfid="f:convertShort" extends="convertShort"/> <component jsfid="dateTimeConverter" componentType="javax.faces.DateTime" > <description>Converts a string value into a java.util.Date type and back to a string.</description> @@ -1023,6 +1074,7 @@ </attributes> </component> <component jsfid="convertDateTime" extends="dateTimeConverter"/> + <component jsfid="f:convertDateTime" extends="convertDateTime"/> <component jsfid="clay" componentType="org.apache.shale.clay.component.Clay" @@ -1049,6 +1101,7 @@ </set> </attributes> </component> + <component jsfid="clay:clay" extends="clay"/> <component jsfid="loadBundle" componentType="org.apache.shale.clay.component.LoadBundle" allowBody="false" extends="baseComponent"> @@ -1067,6 +1120,7 @@ </set> </attributes> </component> + <component jsfid="clay:loadBundle" extends="loadBundle"/> <component jsfid="clayOut" extends="clay"> <description> @@ -1093,6 +1147,8 @@ </set> </attributes> </component> + <component jsfid="clay:clayOut" extends="clayOut"/> + <component jsfid="clayImport" extends="clay"> <description>Includes the content of a file within a Clay template view.</description> @@ -1111,7 +1167,8 @@ </description> </set> </attributes> - </component> + </component> + <component jsfid="clay:clayImport" extends="clayImport"/> <component jsfid="clayForEach" extends="clay"> <description> @@ -1149,6 +1206,7 @@ </set> </attributes> </component> + <component jsfid="clay:clayForEach" extends="clayForEach"/> <component jsfid="doubleRangeValidator" componentType="javax.faces.DoubleRange"> <description>Verifies the submitted value is a double within the specified minimum and maximum values.</description> @@ -1162,6 +1220,7 @@ </attributes> </component> <component jsfid="validateDoubleRange" extends="doubleRangeValidator"/> + <component jsfid="f:validateDoubleRange" extends="validateDoubleRange"/> <component jsfid="lengthValidator" componentType="javax.faces.Length"> <description>Verifies the submitted string value is greater than and not less than the specified minimum and maximum values.</description> @@ -1175,6 +1234,7 @@ </attributes> </component> <component jsfid="validateLength" extends="lengthValidator"/> + <component jsfid="f:validateLength" extends="validateLength"/> <component jsfid="longRangeValidator" componentType="javax.faces.LongRange"> <description>Verifies the submitted value is a long within the specified minimum and maximum values.</description> @@ -1188,5 +1248,6 @@ </attributes> </component> <component jsfid="validateLongRange" extends="longRangeValidator"/> + <component jsfid="f:validateLongRange" extends="validateLongRange"/> -</view> +</view> \ No newline at end of file