You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2006/10/06 21:20:06 UTC
svn commit: r453773 - in
/incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main:
java/org/apache/myfaces/trinidadbuild/plugin/faces/
java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/
resources/org/apache/myfaces/trinidadbuil...
Author: awiner
Date: Fri Oct 6 14:20:05 2006
New Revision: 453773
URL: http://svn.apache.org/viewvc?view=rev&rev=453773
Log:
Fix validity of 1.2 faces-config.xml file. Add support for ActionSource2 - or, really, for attrs that have one name in the JSP tag (action) and another on the component (actionExpression)
Modified:
incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java
incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform12.xsl
Modified: incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java?view=diff&rev=453773&r1=453772&r2=453773
==============================================================================
--- incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java (original)
+++ incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java Fri Oct 6 14:20:05 2006
@@ -451,7 +451,12 @@
stream.writeCharacters("\n ");
stream.writeStartElement("name");
- stream.writeCharacters(propertyName);
+
+ if (property != null)
+ stream.writeCharacters(property.getJspPropertyName());
+ else
+ stream.writeCharacters(propertyName);
+
stream.writeEndElement();
if (!_is12())
@@ -1653,8 +1658,9 @@
PropertyBean property) throws IOException
{
String propName = property.getPropertyName();
+ String jspPropName = property.getJspPropertyName();
String propVar = Util.getVariableFromName(propName);
- String setMethod = Util.getPrefixedPropertyName("set", propName);
+ String setMethod = Util.getPrefixedPropertyName("set", jspPropName);
String jspPropType = _getJspPropertyType(property);
// TODO: restore coding standards, and make final
Modified: incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java?view=diff&rev=453773&r1=453772&r2=453773
==============================================================================
--- incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java (original)
+++ incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java Fri Oct 6 14:20:05 2006
@@ -179,6 +179,8 @@
// faces-config/component/property/property-extension
digester.addBeanPropertySetter("faces-config/component/property/property-extension/state-holder",
"stateHolder");
+ digester.addBeanPropertySetter("faces-config/component/property/property-extension/jsp-property-name",
+ "jspPropertyName");
// faces-config/component/property/property-extension
digester.addBeanPropertySetter("faces-config/component/property/property-extension/list",
"list");
Modified: incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java?view=diff&rev=453773&r1=453772&r2=453773
==============================================================================
--- incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java (original)
+++ incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java Fri Oct 6 14:20:05 2006
@@ -316,8 +316,32 @@
setUnsupportedAgents(unsupportedAgents.split(" "));
}
+ /**
+ * Sets the JSP name of this property.
+ *
+ * @param jspPropertyName the JSP property name
+ */
+ public void setJspPropertyName(
+ String jspPropertyName)
+ {
+ _jspPropertyName = jspPropertyName;
+ }
+
+ /**
+ * Returns the JSP name of this property.
+ *
+ * @return the JSP property name
+ */
+ public String getJspPropertyName()
+ {
+ if (_jspPropertyName == null)
+ return getPropertyName();
+
+ return _jspPropertyName;
+ }
private String _aliasOf;
+ private String _jspPropertyName;
private boolean _required;
private boolean _literalOnly;
private boolean _stateHolder;
Modified: incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform12.xsl
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform12.xsl?view=diff&rev=453773&r1=453772&r2=453773
==============================================================================
--- incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform12.xsl (original)
+++ incubator/adffaces/branches/faces-1_2/plugins/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/transform12.xsl Fri Oct 6 14:20:05 2006
@@ -17,6 +17,7 @@
<xsl:stylesheet xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
exclude-result-prefixes="xsl xs javaee mfp"
@@ -42,6 +43,8 @@
<xsl:template match="/javaee:faces-config" >
<xsl:element name="faces-config"
namespace="http://java.sun.com/xml/ns/javaee" >
+ <xsl:attribute name="xsi:schemaLocation">http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd</xsl:attribute>
+ <xsl:attribute name="version">1.2</xsl:attribute>
<xsl:apply-templates select="javaee:application" />
<xsl:apply-templates select="javaee:factory" />
<xsl:apply-templates select="javaee:component[not(contains(javaee:component-extension/mfp:component-class-modifier/text(), 'abstract')) and