You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by st...@apache.org on 2011/10/20 12:49:36 UTC
svn commit: r1186730 [6/22] - in /myfaces/commons/branches/jsf_20: examples/
examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/
examples/myfaces-commons-examples/src/main/java/org/apache/myfaces/commons/examples/access...
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml Thu Oct 20 10:49:18 2011
@@ -1,93 +1,93 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:mcv="http://myfaces.apache.org/commons/validators"
- xmlns:mc="http://myfaces.apache.org/commons/converters"
- xmlns:mcc="http://myfaces.apache.org/commons/components">
-
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-//-->
-
-<body>
-<ui:composition template="/META-INF/templates/template.xhtml">
- <ui:define name="body">
- <h:panelGroup id="body">
-
- <h:form id="form1">
- <h:messages showDetail="true" showSummary="false"/>
-
- <h:panelGrid columns="3">
-
- <h:outputLabel for="baseInput" value="#{example_messages['validate_base']}" />
- <h:inputText id="baseInput" value="#{validateForm.equal}" required="true"/>
- <h:message id="baseError" for="baseInput" styleClass="error" />
-
- <h:outputLabel for="eqInput" value="#{example_messages['validate_equal']}" />
- <h:inputText id="eqInput" required="true">
- <mcv:validateCompareTo forId="baseInput" operator="eq" />
- </h:inputText>
- <h:message id="eqError" for="eqInput" styleClass="error" />
-
- <h:outputLabel for="neInput" value="#{example_messages['validate_notequal']}" />
- <h:inputText id="neInput" required="true">
- <mcv:validateCompareTo forId="baseInput" operator="ne" />
- </h:inputText>
- <h:message id="neError" for="neInput" styleClass="error" />
-
- <h:outputLabel for="gtInput" value="#{example_messages['validate_greaterthan']}" />
- <h:inputText id="gtInput" required="true">
- <mcv:validateCompareTo forId="baseInput" operator="gt" />
- </h:inputText>
- <h:message id="gtError" for="gtInput" styleClass="error" />
-
- <h:outputLabel for="geInput" value="#{example_messages['validate_greaterthanequal']}" />
- <h:inputText id="geInput" required="true">
- <mcv:validateCompareTo forId="baseInput" operator="ge" />
- </h:inputText>
- <h:message id="geError" for="geInput" styleClass="error" />
-
- <h:outputLabel for="ltInput" value="#{example_messages['validate_lessthan']}" />
- <h:inputText id="ltInput" required="true">
- <mcv:validateCompareTo forId="baseInput" operator="lt" />
- </h:inputText>
- <h:message id="ltError" for="ltInput" styleClass="error" />
-
- <h:outputLabel for="leInput" value="#{example_messages['validate_lessthanequal']}" />
- <h:inputText id="leInput" required="true">
- <mcv:validateCompareTo forId="baseInput" operator="le" />
- </h:inputText>
- <h:message id="leError" for="leInput" styleClass="error" />
-
- <h:panelGroup/>
- <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
- <h:panelGroup/>
-
- </h:panelGrid>
- </h:form>
-
- </h:panelGroup>
- </ui:define>
-</ui:composition>
-</body>
-
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+
+ <h:form id="form1">
+ <h:messages showDetail="true" showSummary="false"/>
+
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="baseInput" value="#{example_messages['validate_base']}" />
+ <h:inputText id="baseInput" value="#{validateForm.equal}" required="true"/>
+ <h:message id="baseError" for="baseInput" styleClass="error" />
+
+ <h:outputLabel for="eqInput" value="#{example_messages['validate_equal']}" />
+ <h:inputText id="eqInput" required="true">
+ <mcv:validateCompareTo forId="baseInput" operator="eq" />
+ </h:inputText>
+ <h:message id="eqError" for="eqInput" styleClass="error" />
+
+ <h:outputLabel for="neInput" value="#{example_messages['validate_notequal']}" />
+ <h:inputText id="neInput" required="true">
+ <mcv:validateCompareTo forId="baseInput" operator="ne" />
+ </h:inputText>
+ <h:message id="neError" for="neInput" styleClass="error" />
+
+ <h:outputLabel for="gtInput" value="#{example_messages['validate_greaterthan']}" />
+ <h:inputText id="gtInput" required="true">
+ <mcv:validateCompareTo forId="baseInput" operator="gt" />
+ </h:inputText>
+ <h:message id="gtError" for="gtInput" styleClass="error" />
+
+ <h:outputLabel for="geInput" value="#{example_messages['validate_greaterthanequal']}" />
+ <h:inputText id="geInput" required="true">
+ <mcv:validateCompareTo forId="baseInput" operator="ge" />
+ </h:inputText>
+ <h:message id="geError" for="geInput" styleClass="error" />
+
+ <h:outputLabel for="ltInput" value="#{example_messages['validate_lessthan']}" />
+ <h:inputText id="ltInput" required="true">
+ <mcv:validateCompareTo forId="baseInput" operator="lt" />
+ </h:inputText>
+ <h:message id="ltError" for="ltInput" styleClass="error" />
+
+ <h:outputLabel for="leInput" value="#{example_messages['validate_lessthanequal']}" />
+ <h:inputText id="leInput" required="true">
+ <mcv:validateCompareTo forId="baseInput" operator="le" />
+ </h:inputText>
+ <h:message id="leError" for="leInput" styleClass="error" />
+
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
+ <h:panelGroup/>
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Propchange: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateCompareTo.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml Thu Oct 20 10:49:18 2011
@@ -1,64 +1,64 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:mcv="http://myfaces.apache.org/commons/validators"
- xmlns:mcc="http://myfaces.apache.org/commons/converters"
- xmlns:mc="http://myfaces.apache.org/commons/components">
-
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-//-->
-
-<body>
-<ui:composition template="/META-INF/templates/template.xhtml">
- <ui:define name="body">
- <h:panelGroup id="body">
- <p>This example shows how mcv:validateDateRestriction validator works. It checks
- if a date is outside a restriction indicated by invalidMonths, invalidDaysOfWeek or invalidDays</p>
- <p>Current Locale: <h:outputText value="#{facesContext.viewRoot.locale}"/></p>
- <h:form id="form1">
- <h:messages showDetail="false" showSummary="true" ></h:messages>
- <h:panelGrid columns="3">
-
- <h:outputLabel for="date1"
- value="Insert a date (yyyy/MM/dd) [months jan, apr, sep are invalid and if fall on saturday or sunday(sat sun) ]" />
- <h:inputText id="date1" value="#{dateTimeBean.date1}" required="true">
- <mcc:convertDateTime pattern="yyyy/MM/dd"/>
- <mcv:validateDateRestriction invalidMonths="#{dateTimeBean.invalidMonths}" invalidDaysOfWeek="sat sun"/>
- </h:inputText>
- <h:message for="date1" styleClass="error" />
-
- <h:panelGroup />
- <h:commandButton id="validateButton"
- value="#{example_messages['button_submit']}"
- action="#{dateTimeBean.submit}" />
- <h:panelGroup />
-
- </h:panelGrid>
- </h:form>
-
- </h:panelGroup>
- </ui:define>
-</ui:composition>
-</body>
-
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mcc="http://myfaces.apache.org/commons/converters"
+ xmlns:mc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+ <p>This example shows how mcv:validateDateRestriction validator works. It checks
+ if a date is outside a restriction indicated by invalidMonths, invalidDaysOfWeek or invalidDays</p>
+ <p>Current Locale: <h:outputText value="#{facesContext.viewRoot.locale}"/></p>
+ <h:form id="form1">
+ <h:messages showDetail="false" showSummary="true" ></h:messages>
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="date1"
+ value="Insert a date (yyyy/MM/dd) [months jan, apr, sep are invalid and if fall on saturday or sunday(sat sun) ]" />
+ <h:inputText id="date1" value="#{dateTimeBean.date1}" required="true">
+ <mcc:convertDateTime pattern="yyyy/MM/dd"/>
+ <mcv:validateDateRestriction invalidMonths="#{dateTimeBean.invalidMonths}" invalidDaysOfWeek="sat sun"/>
+ </h:inputText>
+ <h:message for="date1" styleClass="error" />
+
+ <h:panelGroup />
+ <h:commandButton id="validateButton"
+ value="#{example_messages['button_submit']}"
+ action="#{dateTimeBean.submit}" />
+ <h:panelGroup />
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Propchange: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateDateRestriction.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml (original)
+++ myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml Thu Oct 20 10:49:18 2011
@@ -1,57 +1,57 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:mcv="http://myfaces.apache.org/commons/validators"
- xmlns:mc="http://myfaces.apache.org/commons/converters"
- xmlns:mcc="http://myfaces.apache.org/commons/components">
-
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-//-->
-
-<body>
-<ui:composition template="/META-INF/templates/template.xhtml">
- <ui:define name="body">
- <h:panelGroup id="body">
-
- <h:form id="form1">
- <h:panelGrid columns="3">
-
- <h:outputLabel for="url" value="#{example_messages['validate_url']}" />
- <h:inputText id="url" value="#{validateForm.url}" required="true">
- <mcv:validateUrl schemes="http,https" allow2Slashes="true"/>
- </h:inputText>
- <h:message id="urlError" for="url" styleClass="error" />
-
- <h:panelGroup/>
- <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
- <h:panelGroup/>
-
- </h:panelGrid>
- </h:form>
-
- </h:panelGroup>
- </ui:define>
-</ui:composition>
-</body>
-
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:mcv="http://myfaces.apache.org/commons/validators"
+ xmlns:mc="http://myfaces.apache.org/commons/converters"
+ xmlns:mcc="http://myfaces.apache.org/commons/components">
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+//-->
+
+<body>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+ <h:panelGroup id="body">
+
+ <h:form id="form1">
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="url" value="#{example_messages['validate_url']}" />
+ <h:inputText id="url" value="#{validateForm.url}" required="true">
+ <mcv:validateUrl schemes="http,https" allow2Slashes="true"/>
+ </h:inputText>
+ <h:message id="urlError" for="url" styleClass="error" />
+
+ <h:panelGroup/>
+ <h:commandButton id="validateButton" value="#{example_messages['button_submit']}" action="#{validateForm.submit}"/>
+ <h:panelGroup/>
+
+ </h:panelGrid>
+ </h:form>
+
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>
+</body>
+
+</html>
Propchange: myfaces/commons/branches/jsf_20/examples/myfaces-commons-facelets-examples/src/main/webapp/validateUrl.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/commons/branches/jsf_20/examples/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelet-tld-base.tld
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelet-tld-base.tld?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelet-tld-base.tld (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelet-tld-base.tld Thu Oct 20 10:49:18 2011
@@ -1,46 +1,46 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
--->
-<taglib xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
- version="2.1">
-
- <function>
- <description></description>
- <name>findComponent</name>
- <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
- <function-signature>javax.faces.component.UIComponent findComponent(java.lang.String)</function-signature>
- </function>
-
- <function>
- <description></description>
- <name>findComponentFrom</name>
- <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
- <function-signature>javax.faces.component.UIComponent findComponentFrom(javax.faces.component.UIComponent, java.lang.String)</function-signature>
- </function>
-
- <function>
- <description></description>
- <name>outputClientId</name>
- <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
- <function-signature>java.lang.String outputClientId(java.lang.String)</function-signature>
- </function>
-
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+ version="2.1">
+
+ <function>
+ <description></description>
+ <name>findComponent</name>
+ <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
+ <function-signature>javax.faces.component.UIComponent findComponent(java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <description></description>
+ <name>findComponentFrom</name>
+ <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
+ <function-signature>javax.faces.component.UIComponent findComponentFrom(javax.faces.component.UIComponent, java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <description></description>
+ <name>outputClientId</name>
+ <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
+ <function-signature>java.lang.String outputClientId(java.lang.String)</function-signature>
+ </function>
+
</taglib>
\ No newline at end of file
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelet-tld-base.tld
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelets-taglib-base.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelets-taglib-base.xml?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelets-taglib-base.xml (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelets-taglib-base.xml Thu Oct 20 10:49:18 2011
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
--->
-<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
- version="2.0">
-
- <function>
- <function-name>findComponent</function-name>
- <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
- <function-signature>javax.faces.component.UIComponent findComponent(java.lang.String)</function-signature>
- </function>
-
- <function>
- <function-name>findComponentFrom</function-name>
- <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
- <function-signature>javax.faces.component.UIComponent findComponentFrom(javax.faces.component.UIComponent, java.lang.String)</function-signature>
- </function>
-
- <function>
- <function-name>outputClientId</function-name>
- <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
- <function-signature>java.lang.String outputClientId(java.lang.String)</function-signature>
- </function>
-
-</facelet-taglib>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+ version="2.0">
+
+ <function>
+ <function-name>findComponent</function-name>
+ <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
+ <function-signature>javax.faces.component.UIComponent findComponent(java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <function-name>findComponentFrom</function-name>
+ <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
+ <function-signature>javax.faces.component.UIComponent findComponentFrom(javax.faces.component.UIComponent, java.lang.String)</function-signature>
+ </function>
+
+ <function>
+ <function-name>outputClientId</function-name>
+ <function-class>org.apache.myfaces.commons.facelets.util.FaceletsFunctionLibrary</function-class>
+ <function-signature>java.lang.String outputClientId(java.lang.String)</function-signature>
+ </function>
+
+</facelet-taglib>
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/faces-config-base.xml
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/faces-config-base.xml?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/faces-config-base.xml (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/faces-config-base.xml Thu Oct 20 10:49:18 2011
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
--->
-
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
- version="2.0">
-
-</faces-config>
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+-->
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+</faces-config>
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/conf/META-INF/faces-config-base.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java Thu Oct 20 10:49:18 2011
@@ -1,202 +1,202 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.myfaces.commons.exporter;
-
-import javax.faces.component.StateHolder;
-import javax.faces.component.html.HtmlDataTable;
-import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.ActionListener;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.commons.exporter.util.ComponentUtils;
-import org.apache.myfaces.commons.exporter.util.ExcelExporterUtil;
-import org.apache.myfaces.commons.exporter.util.ExporterConstants;
-import org.apache.myfaces.commons.exporter.util.PDFExporterUtil;
-
-/**
- *
- * This class is acting as the Exporter ActionListener.
- */
-public class ExporterActionListener implements ActionListener, StateHolder
-{
-
- private static final Log log = LogFactory
- .getLog(ExporterActionListener.class);
-
- public static final String FILENAME_KEY = "filename";
-
- public static final String FILE_TYPE_KEY = "fileType";
-
- public static final String FOR_KEY = "for";
-
- private String _fileType;
-
- private String _fileName;
-
- private String _for;
-
- public ExporterActionListener()
- {
- }
-
- public ExporterActionListener(String _for, String _fileType,
- String _fileName)
- {
- this._fileType = _fileType;
- this._fileName = _fileName;
- this._for = _for;
- }
-
- public void processAction(ActionEvent event)
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- Object response = facesContext.getExternalContext().getResponse();
-
- if (!(response instanceof HttpServletResponse))
- {
- log.error("ExporteActionListener requires servlet");
- }
- else
- {
- try
- {
-
- /* get the source dataTable component */
- HtmlDataTable dataTable = (HtmlDataTable) ComponentUtils
- .findComponentById(facesContext, facesContext
- .getViewRoot(), _for);
-
- if (!(dataTable instanceof HtmlDataTable))
- {
- throw new RuntimeException(
- "exporterActionListener for attribute should contain a "
- + "dataTable component id");
- }
-
- if (ExporterConstants.EXCEL_FILE_TYPE
- .equalsIgnoreCase(_fileType))
- {
-
- /*
- * Excel case. Generate the XLS to the response stream.
- */
- Object contextResponse = facesContext.getExternalContext()
- .getResponse();
-
- if (contextResponse instanceof HttpServletResponse)
- {
- ExcelExporterUtil.generateEXCEL(facesContext,
- (HttpServletResponse) contextResponse,
- _fileName, dataTable);
- }
-
- }
- else
- {
-
- /*
- * PDF case. Generate the PDF to the response stream.
- */
- HttpServletResponse httpResponse = (HttpServletResponse) facesContext
- .getExternalContext().getResponse();
-
- PDFExporterUtil.generatePDF(facesContext, httpResponse,
- _fileName, dataTable);
- }
-
- /* save the seralized view and complete the response. */
- facesContext.getApplication().getStateManager()
- .saveSerializedView(facesContext);
- facesContext.responseComplete();
- }
- catch (Exception exception)
- {
- throw new RuntimeException(exception);
- }
-
- }
-
- facesContext.responseComplete();
- }
-
- public String getFilename()
- {
- return _fileName;
- }
-
- public void setFilename(String _filename)
- {
- this._fileName = _filename;
- }
-
- public String getFileType()
- {
- return _fileType;
- }
-
- public void setFileType(String type)
- {
- _fileType = type;
- }
-
- public String getFor()
- {
- return _for;
- }
-
- public void setFor(String _for)
- {
- this._for = _for;
- }
-
- public void restoreState(FacesContext context, Object state)
- {
- String values[] = (String[]) state;
-
- _for = values[0];
- _fileName = values[1];
- _fileType = values[2];
- }
-
- public Object saveState(FacesContext context)
- {
- String values[] = new String[3];
-
- values[0] = _for;
- values[1] = _fileName;
- values[2] = _fileType;
- return ((String[]) values);
- }
-
- public boolean isTransient()
- {
- return false;
- }
-
- public void setTransient(boolean newTransientValue)
- {
- if (newTransientValue == true)
- {
- throw new IllegalArgumentException();
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.commons.exporter;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.html.HtmlDataTable;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.commons.exporter.util.ComponentUtils;
+import org.apache.myfaces.commons.exporter.util.ExcelExporterUtil;
+import org.apache.myfaces.commons.exporter.util.ExporterConstants;
+import org.apache.myfaces.commons.exporter.util.PDFExporterUtil;
+
+/**
+ *
+ * This class is acting as the Exporter ActionListener.
+ */
+public class ExporterActionListener implements ActionListener, StateHolder
+{
+
+ private static final Log log = LogFactory
+ .getLog(ExporterActionListener.class);
+
+ public static final String FILENAME_KEY = "filename";
+
+ public static final String FILE_TYPE_KEY = "fileType";
+
+ public static final String FOR_KEY = "for";
+
+ private String _fileType;
+
+ private String _fileName;
+
+ private String _for;
+
+ public ExporterActionListener()
+ {
+ }
+
+ public ExporterActionListener(String _for, String _fileType,
+ String _fileName)
+ {
+ this._fileType = _fileType;
+ this._fileName = _fileName;
+ this._for = _for;
+ }
+
+ public void processAction(ActionEvent event)
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ Object response = facesContext.getExternalContext().getResponse();
+
+ if (!(response instanceof HttpServletResponse))
+ {
+ log.error("ExporteActionListener requires servlet");
+ }
+ else
+ {
+ try
+ {
+
+ /* get the source dataTable component */
+ HtmlDataTable dataTable = (HtmlDataTable) ComponentUtils
+ .findComponentById(facesContext, facesContext
+ .getViewRoot(), _for);
+
+ if (!(dataTable instanceof HtmlDataTable))
+ {
+ throw new RuntimeException(
+ "exporterActionListener for attribute should contain a "
+ + "dataTable component id");
+ }
+
+ if (ExporterConstants.EXCEL_FILE_TYPE
+ .equalsIgnoreCase(_fileType))
+ {
+
+ /*
+ * Excel case. Generate the XLS to the response stream.
+ */
+ Object contextResponse = facesContext.getExternalContext()
+ .getResponse();
+
+ if (contextResponse instanceof HttpServletResponse)
+ {
+ ExcelExporterUtil.generateEXCEL(facesContext,
+ (HttpServletResponse) contextResponse,
+ _fileName, dataTable);
+ }
+
+ }
+ else
+ {
+
+ /*
+ * PDF case. Generate the PDF to the response stream.
+ */
+ HttpServletResponse httpResponse = (HttpServletResponse) facesContext
+ .getExternalContext().getResponse();
+
+ PDFExporterUtil.generatePDF(facesContext, httpResponse,
+ _fileName, dataTable);
+ }
+
+ /* save the seralized view and complete the response. */
+ facesContext.getApplication().getStateManager()
+ .saveSerializedView(facesContext);
+ facesContext.responseComplete();
+ }
+ catch (Exception exception)
+ {
+ throw new RuntimeException(exception);
+ }
+
+ }
+
+ facesContext.responseComplete();
+ }
+
+ public String getFilename()
+ {
+ return _fileName;
+ }
+
+ public void setFilename(String _filename)
+ {
+ this._fileName = _filename;
+ }
+
+ public String getFileType()
+ {
+ return _fileType;
+ }
+
+ public void setFileType(String type)
+ {
+ _fileType = type;
+ }
+
+ public String getFor()
+ {
+ return _for;
+ }
+
+ public void setFor(String _for)
+ {
+ this._for = _for;
+ }
+
+ public void restoreState(FacesContext context, Object state)
+ {
+ String values[] = (String[]) state;
+
+ _for = values[0];
+ _fileName = values[1];
+ _fileType = values[2];
+ }
+
+ public Object saveState(FacesContext context)
+ {
+ String values[] = new String[3];
+
+ values[0] = _for;
+ values[1] = _fileName;
+ values[2] = _fileType;
+ return ((String[]) values);
+ }
+
+ public boolean isTransient()
+ {
+ return false;
+ }
+
+ public void setTransient(boolean newTransientValue)
+ {
+ if (newTransientValue == true)
+ {
+ throw new IllegalArgumentException();
+ }
+ }
+}
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java Thu Oct 20 10:49:18 2011
@@ -1,147 +1,147 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.myfaces.commons.exporter;
-
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-import javax.faces.webapp.UIComponentTag;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.tagext.Tag;
-import javax.servlet.jsp.tagext.TagSupport;
-
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspTag;
-
-/**
- * Export datatable contents to an excel file or a pdf file.
- *
- * This class is acting as the tag handler for the Exporter ActionListener.
- */
-@JSFJspTag(
- name="mc:exporterActionListener",
- bodyContent="JSP",
- tagHandler="org.apache.myfaces.commons.exporter.FaceletsExporterActionListenerTag")
-public class ExporterActionListenerTag extends TagSupport {
-
- private static final long serialVersionUID = -1455677614701939262L;
- private String _fileType;
- private String _fileName;
- private String _for;
-
- public int doStartTag() throws JspException {
-
- // check whether the attributes are not null
- if (_for == null)
- {
- throw new JspException("for attribute not set");
- }
-
- if (_fileType == null)
- {
- throw new JspException("fileType attribute not set");
- }
-
- if (_fileName == null)
- {
- throw new JspException("fileName attribute not set");
- }
-
- // find the parent UIComponentTag which should be an ActionSource.
- UIComponentTag componentTag = UIComponentTag
- .getParentUIComponentTag(pageContext);
-
- if (componentTag == null)
- {
- throw new JspException("ExporterActionListenerTag has no UIComponentTag ancestor");
- }
-
- if (componentTag.getCreated())
- {
-
- // if the component was just created, so we add the Listener.
- UIComponent component = componentTag.getComponentInstance();
-
- if (component instanceof ActionSource)
- {
- ExporterActionListener exporterActionListener = new ExporterActionListener();
-
- exporterActionListener.setFor(_for);
- exporterActionListener.setFileType(_fileType);
- exporterActionListener.setFilename(_fileName);
-
- ((ActionSource) component)
- .addActionListener(exporterActionListener);
- }
- else
- {
- throw new JspException("Component " + component.getId()
- + " is no ActionSource");
- }
- }
-
- return Tag.SKIP_BODY;
- }
-
- public void release() {
- super.release();
- _fileType = null;
- _fileName = null;
- _for = null;
- }
-
- public String getFilename() {
- return _fileName;
- }
-
- /**
- * Default name of the generated excel or pdf file, if not specified value of the "for" attribute will be used
- *
- * @JSFJspAttribute
- */
- public void setFilename(String _filename) {
- this._fileName = _filename;
- }
-
- public String getFileType() {
- return _fileType;
- }
-
- /**
- * "PDF" or "XLS"
- *
- * @JSFJspAttribute
- */
- public void setFileType(String type) {
- _fileType = type;
- }
-
- public String getFor() {
- return _for;
- }
-
- /**
- * Id of the datatable component whose values to be exported
- *
- * @JSFJspAttribute
- */
- public void setFor(String _for) {
- this._for = _for;
- }
-
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.commons.exporter;
+
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.Tag;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspTag;
+
+/**
+ * Export datatable contents to an excel file or a pdf file.
+ *
+ * This class is acting as the tag handler for the Exporter ActionListener.
+ */
+@JSFJspTag(
+ name="mc:exporterActionListener",
+ bodyContent="JSP",
+ tagHandler="org.apache.myfaces.commons.exporter.FaceletsExporterActionListenerTag")
+public class ExporterActionListenerTag extends TagSupport {
+
+ private static final long serialVersionUID = -1455677614701939262L;
+ private String _fileType;
+ private String _fileName;
+ private String _for;
+
+ public int doStartTag() throws JspException {
+
+ // check whether the attributes are not null
+ if (_for == null)
+ {
+ throw new JspException("for attribute not set");
+ }
+
+ if (_fileType == null)
+ {
+ throw new JspException("fileType attribute not set");
+ }
+
+ if (_fileName == null)
+ {
+ throw new JspException("fileName attribute not set");
+ }
+
+ // find the parent UIComponentTag which should be an ActionSource.
+ UIComponentTag componentTag = UIComponentTag
+ .getParentUIComponentTag(pageContext);
+
+ if (componentTag == null)
+ {
+ throw new JspException("ExporterActionListenerTag has no UIComponentTag ancestor");
+ }
+
+ if (componentTag.getCreated())
+ {
+
+ // if the component was just created, so we add the Listener.
+ UIComponent component = componentTag.getComponentInstance();
+
+ if (component instanceof ActionSource)
+ {
+ ExporterActionListener exporterActionListener = new ExporterActionListener();
+
+ exporterActionListener.setFor(_for);
+ exporterActionListener.setFileType(_fileType);
+ exporterActionListener.setFilename(_fileName);
+
+ ((ActionSource) component)
+ .addActionListener(exporterActionListener);
+ }
+ else
+ {
+ throw new JspException("Component " + component.getId()
+ + " is no ActionSource");
+ }
+ }
+
+ return Tag.SKIP_BODY;
+ }
+
+ public void release() {
+ super.release();
+ _fileType = null;
+ _fileName = null;
+ _for = null;
+ }
+
+ public String getFilename() {
+ return _fileName;
+ }
+
+ /**
+ * Default name of the generated excel or pdf file, if not specified value of the "for" attribute will be used
+ *
+ * @JSFJspAttribute
+ */
+ public void setFilename(String _filename) {
+ this._fileName = _filename;
+ }
+
+ public String getFileType() {
+ return _fileType;
+ }
+
+ /**
+ * "PDF" or "XLS"
+ *
+ * @JSFJspAttribute
+ */
+ public void setFileType(String type) {
+ _fileType = type;
+ }
+
+ public String getFor() {
+ return _for;
+ }
+
+ /**
+ * Id of the datatable component whose values to be exported
+ *
+ * @JSFJspAttribute
+ */
+ public void setFor(String _for) {
+ this._for = _for;
+ }
+
+
+}
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/ExporterActionListenerTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/FaceletsExporterActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/FaceletsExporterActionListenerTag.java?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/FaceletsExporterActionListenerTag.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/FaceletsExporterActionListenerTag.java Thu Oct 20 10:49:18 2011
@@ -1,75 +1,75 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.myfaces.commons.exporter;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-import javax.faces.view.facelets.ComponentHandler;
-import javax.faces.view.facelets.FaceletContext;
-import javax.faces.view.facelets.FaceletException;
-import javax.faces.view.facelets.TagAttribute;
-import javax.faces.view.facelets.TagConfig;
-import javax.faces.view.facelets.TagHandler;
-
-/**
- * The (FaceletsExporterActionListenerTag) is responsible for handling the
- * ExporterActionListener Tag in Facelets.
- */
-public class FaceletsExporterActionListenerTag extends TagHandler
-{
-
- private final TagAttribute _for;
-
- private final TagAttribute _fileType;
-
- private final TagAttribute _fileName;
-
- public FaceletsExporterActionListenerTag(TagConfig tagConfig)
- {
- super(tagConfig);
- this._for = getRequiredAttribute(ExporterActionListener.FOR_KEY);
- this._fileType = getRequiredAttribute(ExporterActionListener.FILE_TYPE_KEY);
- this._fileName = getRequiredAttribute(ExporterActionListener.FILENAME_KEY);
- }
-
- public void apply(FaceletContext faceletContext, UIComponent parent)
- throws IOException, FacesException, FaceletException, ELException
- {
- if (ComponentHandler.isNew(parent))
- {
- ValueExpression forVE = _for.getValueExpression(faceletContext,
- Object.class);
- ValueExpression fileTypeVE = _fileType.getValueExpression(
- faceletContext, Object.class);
- ValueExpression fileNameVE = _fileName.getValueExpression(
- faceletContext, Object.class);
-
- ActionSource actionSource = (ActionSource) parent;
- actionSource.addActionListener(new ExporterActionListener(
- (String) forVE.getValue(faceletContext),
- (String) fileTypeVE.getValue(faceletContext),
- (String) fileNameVE.getValue(faceletContext)));
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.commons.exporter;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.FaceletException;
+import javax.faces.view.facelets.TagAttribute;
+import javax.faces.view.facelets.TagConfig;
+import javax.faces.view.facelets.TagHandler;
+
+/**
+ * The (FaceletsExporterActionListenerTag) is responsible for handling the
+ * ExporterActionListener Tag in Facelets.
+ */
+public class FaceletsExporterActionListenerTag extends TagHandler
+{
+
+ private final TagAttribute _for;
+
+ private final TagAttribute _fileType;
+
+ private final TagAttribute _fileName;
+
+ public FaceletsExporterActionListenerTag(TagConfig tagConfig)
+ {
+ super(tagConfig);
+ this._for = getRequiredAttribute(ExporterActionListener.FOR_KEY);
+ this._fileType = getRequiredAttribute(ExporterActionListener.FILE_TYPE_KEY);
+ this._fileName = getRequiredAttribute(ExporterActionListener.FILENAME_KEY);
+ }
+
+ public void apply(FaceletContext faceletContext, UIComponent parent)
+ throws IOException, FacesException, FaceletException, ELException
+ {
+ if (ComponentHandler.isNew(parent))
+ {
+ ValueExpression forVE = _for.getValueExpression(faceletContext,
+ Object.class);
+ ValueExpression fileTypeVE = _fileType.getValueExpression(
+ faceletContext, Object.class);
+ ValueExpression fileNameVE = _fileName.getValueExpression(
+ faceletContext, Object.class);
+
+ ActionSource actionSource = (ActionSource) parent;
+ actionSource.addActionListener(new ExporterActionListener(
+ (String) forVE.getValue(faceletContext),
+ (String) fileTypeVE.getValue(faceletContext),
+ (String) fileNameVE.getValue(faceletContext)));
+ }
+ }
+}
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/FaceletsExporterActionListenerTag.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java?rev=1186730&r1=1186729&r2=1186730&view=diff
==============================================================================
--- myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java (original)
+++ myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java Thu Oct 20 10:49:18 2011
@@ -1,239 +1,239 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.myfaces.commons.exporter.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.FacesException;
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.UIColumn;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
-import javax.faces.component.ValueHolder;
-import javax.faces.component.html.HtmlDataTable;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.el.PropertyNotFoundException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-
-public final class ComponentUtils
-{
-
- private static final Log log = LogFactory.getLog(ComponentUtils.class);
-
- public static UIComponent findComponentById(FacesContext context,
- UIComponent root, String id) {
-
- UIComponent component = null;
-
- for (int i = 0; i < root.getChildCount() && component == null; i++)
- {
- UIComponent child = (UIComponent) root.getChildren().get(i);
- component = findComponentById(context, child, id);
- }
-
- if (root.getId() != null)
- {
- if (component == null && root.getId().equals(id))
- {
- component = root;
- }
- }
- return component;
- }
-
- public static String getPathToComponent(UIComponent component) {
- StringBuffer buf = new StringBuffer();
-
- if (component == null)
- {
- buf.append("{Component-Path : ");
- buf.append("[null]}");
- return buf.toString();
- }
-
- getPathToComponent(component, buf);
-
- buf.insert(0, "{Component-Path : ");
- buf.append("}");
-
- return buf.toString();
- }
-
- private static void getPathToComponent(UIComponent component,
- StringBuffer buf) {
-
- if (component == null)
- return;
-
- StringBuffer intBuf = new StringBuffer();
-
- intBuf.append("[Class: ");
- intBuf.append(component.getClass().getName());
- if (component instanceof UIViewRoot)
- {
- intBuf.append(",ViewId: ");
- intBuf.append(((UIViewRoot) component).getViewId());
- }
- else
- {
- intBuf.append(",Id: ");
- intBuf.append(component.getId());
- }
- intBuf.append("]");
-
- buf.insert(0, intBuf.toString());
-
- getPathToComponent(component.getParent(), buf);
- }
-
- private static Object getValue(UIComponent component) {
- Object value;
- try
- {
- value = ((ValueHolder) component).getValue();
- }
- catch (Exception ex)
- {
- throw new FacesException(
- "Could not retrieve value of component with path : "
- + getPathToComponent(component), ex);
- }
- return value;
- }
-
- public static String getStringValue(FacesContext facesContext,
- UIComponent component) {
- try
- {
- if (!(component instanceof ValueHolder))
- {
- throw new IllegalArgumentException("Component : "
- + getPathToComponent(component)
- + "is not a ValueHolder");
- }
-
- if (component instanceof EditableValueHolder)
- {
- Object submittedValue = ((EditableValueHolder) component)
- .getSubmittedValue();
- if (submittedValue != null)
- {
- if (submittedValue instanceof String)
- {
- if (log.isDebugEnabled())
- log.debug("returning 1 '" + submittedValue + "'");
- return (String) submittedValue;
- }
-
- throw new IllegalArgumentException(
- "Expected submitted value of type String for component : "
- + getPathToComponent(component));
- }
- }
-
- Object value;
-
- if (component instanceof EditableValueHolder)
- {
-
- EditableValueHolder holder = (EditableValueHolder) component;
-
- if (holder.isLocalValueSet())
- {
- value = holder.getLocalValue();
- }
- else
- {
- value = getValue(component);
- }
- }
- else
- {
- value = getValue(component);
- }
-
- Converter converter = ((ValueHolder) component).getConverter();
- if (converter == null && value != null)
- {
-
- try
- {
- converter = facesContext.getApplication().createConverter(
- value.getClass());
- if (log.isDebugEnabled())
- log.debug("the created converter is " + converter);
- }
- catch (FacesException e)
- {
- log.error("No converter for class "
- + value.getClass().getName()
- + " found (component id=" + component.getId()
- + ").");
- // converter stays null
- }
- }
-
- if (converter == null)
- {
- if (value == null)
- {
- if (log.isDebugEnabled())
- log.debug("returning an empty string");
- return "";
- }
-
- if (log.isDebugEnabled())
- log.debug("returning an .toString");
- return value.toString();
-
- }
-
- if (log.isDebugEnabled())
- log.debug("returning converter get as string " + converter);
- return converter.getAsString(facesContext, component, value);
-
- }
- catch (PropertyNotFoundException ex)
- {
- log.error("Property not found - called by component : "
- + getPathToComponent(component), ex);
-
- throw ex;
- }
- }
-
- public static List getHTMLDataTableColumns(HtmlDataTable table) {
- List columns = new ArrayList();
-
- for (int i = 0; i < table.getChildCount(); i++)
- {
- UIComponent child = (UIComponent) table.getChildren().get(i);
- if (child instanceof UIColumn)
- {
- columns.add(child);
- }
- }
- return columns;
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.myfaces.commons.exporter.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.FacesException;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.ValueHolder;
+import javax.faces.component.html.HtmlDataTable;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.PropertyNotFoundException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+public final class ComponentUtils
+{
+
+ private static final Log log = LogFactory.getLog(ComponentUtils.class);
+
+ public static UIComponent findComponentById(FacesContext context,
+ UIComponent root, String id) {
+
+ UIComponent component = null;
+
+ for (int i = 0; i < root.getChildCount() && component == null; i++)
+ {
+ UIComponent child = (UIComponent) root.getChildren().get(i);
+ component = findComponentById(context, child, id);
+ }
+
+ if (root.getId() != null)
+ {
+ if (component == null && root.getId().equals(id))
+ {
+ component = root;
+ }
+ }
+ return component;
+ }
+
+ public static String getPathToComponent(UIComponent component) {
+ StringBuffer buf = new StringBuffer();
+
+ if (component == null)
+ {
+ buf.append("{Component-Path : ");
+ buf.append("[null]}");
+ return buf.toString();
+ }
+
+ getPathToComponent(component, buf);
+
+ buf.insert(0, "{Component-Path : ");
+ buf.append("}");
+
+ return buf.toString();
+ }
+
+ private static void getPathToComponent(UIComponent component,
+ StringBuffer buf) {
+
+ if (component == null)
+ return;
+
+ StringBuffer intBuf = new StringBuffer();
+
+ intBuf.append("[Class: ");
+ intBuf.append(component.getClass().getName());
+ if (component instanceof UIViewRoot)
+ {
+ intBuf.append(",ViewId: ");
+ intBuf.append(((UIViewRoot) component).getViewId());
+ }
+ else
+ {
+ intBuf.append(",Id: ");
+ intBuf.append(component.getId());
+ }
+ intBuf.append("]");
+
+ buf.insert(0, intBuf.toString());
+
+ getPathToComponent(component.getParent(), buf);
+ }
+
+ private static Object getValue(UIComponent component) {
+ Object value;
+ try
+ {
+ value = ((ValueHolder) component).getValue();
+ }
+ catch (Exception ex)
+ {
+ throw new FacesException(
+ "Could not retrieve value of component with path : "
+ + getPathToComponent(component), ex);
+ }
+ return value;
+ }
+
+ public static String getStringValue(FacesContext facesContext,
+ UIComponent component) {
+ try
+ {
+ if (!(component instanceof ValueHolder))
+ {
+ throw new IllegalArgumentException("Component : "
+ + getPathToComponent(component)
+ + "is not a ValueHolder");
+ }
+
+ if (component instanceof EditableValueHolder)
+ {
+ Object submittedValue = ((EditableValueHolder) component)
+ .getSubmittedValue();
+ if (submittedValue != null)
+ {
+ if (submittedValue instanceof String)
+ {
+ if (log.isDebugEnabled())
+ log.debug("returning 1 '" + submittedValue + "'");
+ return (String) submittedValue;
+ }
+
+ throw new IllegalArgumentException(
+ "Expected submitted value of type String for component : "
+ + getPathToComponent(component));
+ }
+ }
+
+ Object value;
+
+ if (component instanceof EditableValueHolder)
+ {
+
+ EditableValueHolder holder = (EditableValueHolder) component;
+
+ if (holder.isLocalValueSet())
+ {
+ value = holder.getLocalValue();
+ }
+ else
+ {
+ value = getValue(component);
+ }
+ }
+ else
+ {
+ value = getValue(component);
+ }
+
+ Converter converter = ((ValueHolder) component).getConverter();
+ if (converter == null && value != null)
+ {
+
+ try
+ {
+ converter = facesContext.getApplication().createConverter(
+ value.getClass());
+ if (log.isDebugEnabled())
+ log.debug("the created converter is " + converter);
+ }
+ catch (FacesException e)
+ {
+ log.error("No converter for class "
+ + value.getClass().getName()
+ + " found (component id=" + component.getId()
+ + ").");
+ // converter stays null
+ }
+ }
+
+ if (converter == null)
+ {
+ if (value == null)
+ {
+ if (log.isDebugEnabled())
+ log.debug("returning an empty string");
+ return "";
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("returning an .toString");
+ return value.toString();
+
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("returning converter get as string " + converter);
+ return converter.getAsString(facesContext, component, value);
+
+ }
+ catch (PropertyNotFoundException ex)
+ {
+ log.error("Property not found - called by component : "
+ + getPathToComponent(component), ex);
+
+ throw ex;
+ }
+ }
+
+ public static List getHTMLDataTableColumns(HtmlDataTable table) {
+ List columns = new ArrayList();
+
+ for (int i = 0; i < table.getChildCount(); i++)
+ {
+ UIComponent child = (UIComponent) table.getChildren().get(i);
+ if (child instanceof UIColumn)
+ {
+ columns.add(child);
+ }
+ }
+ return columns;
+ }
+}
Propchange: myfaces/commons/branches/jsf_20/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java
------------------------------------------------------------------------------
svn:eol-style = native