You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/11/05 21:04:36 UTC
svn commit: r1198040 - in /myfaces/core/trunk/impl/src:
main/java/org/apache/myfaces/view/facelets/compiler/
main/java/org/apache/myfaces/view/facelets/tag/composite/
test/java/org/apache/myfaces/mc/test/core/
test/java/org/apache/myfaces/view/facelets...
Author: lu4242
Date: Sat Nov 5 20:04:35 2011
New Revision: 1198040
URL: http://svn.apache.org/viewvc?rev=1198040&view=rev
Log:
MYFACES-3308 Allow localized composite components
Added:
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/ (with props)
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/LocalizedCompositeComponentTestCase.java (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/faces-config.xml (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_de.properties (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_en.properties (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_es.properties (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/ (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/ (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/ (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/fragment01.xhtml (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/ (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/ (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/fragment01.xhtml (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/ (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/fragment01.xhtml (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testGermanLocalizedComposite.xhtml (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testNoLocalizedComposite.xhtml (with props)
myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testSpanishLocalizedComposite.xhtml (with props)
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesRequestTestCase.java
myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesTestCase.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java?rev=1198040&r1=1198039&r2=1198040&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java Sat Nov 5 20:04:35 2011
@@ -26,10 +26,12 @@ import java.net.URLConnection;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
+import java.util.regex.Pattern;
import javax.faces.FacesException;
import javax.faces.application.Resource;
import javax.faces.application.ResourceHandler;
+import javax.faces.application.ViewHandler;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.view.facelets.ComponentConfig;
@@ -43,7 +45,10 @@ import javax.xml.parsers.SAXParserFactor
import org.apache.myfaces.config.ConfigFilesXmlValidationUtils;
import org.apache.myfaces.shared.config.MyfacesConfig;
+import org.apache.myfaces.shared.util.ArrayUtils;
import org.apache.myfaces.shared.util.ClassUtils;
+import org.apache.myfaces.shared.util.StringUtils;
+import org.apache.myfaces.shared.util.WebConfigParamUtils;
import org.apache.myfaces.spi.FaceletConfigResourceProvider;
import org.apache.myfaces.spi.FaceletConfigResourceProviderFactory;
import org.apache.myfaces.view.facelets.tag.AbstractTagLibrary;
@@ -79,10 +84,132 @@ public final class TagLibraryConfig
{
private String _compositeLibraryName;
+ private Pattern _acceptPatterns;
+ private String _extension;
+ private String[] _defaultSuffixesArray;
+
public TagLibraryImpl(String namespace)
{
super(namespace);
_compositeLibraryName = null;
+
+ ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
+
+ _acceptPatterns = loadAcceptPattern(externalContext);
+
+ _extension = loadFaceletExtension(externalContext);
+
+ String defaultSuffixes = WebConfigParamUtils.getStringInitParameter(externalContext,
+ ViewHandler.DEFAULT_SUFFIX_PARAM_NAME, ViewHandler.DEFAULT_SUFFIX );
+
+ _defaultSuffixesArray = StringUtils.splitShortString(defaultSuffixes, ' ');
+
+ boolean faceletsExtensionFound = false;
+ for (String ext : _defaultSuffixesArray)
+ {
+ if (_extension.equals(ext))
+ {
+ faceletsExtensionFound = true;
+ break;
+ }
+ }
+ if (!faceletsExtensionFound)
+ {
+ _defaultSuffixesArray = (String[]) ArrayUtils.concat(_defaultSuffixesArray, new String[]{_extension});
+ }
+ }
+
+ /**
+ * Load and compile a regular expression pattern built from the Facelet view mapping parameters.
+ *
+ * @param context
+ * the application's external context
+ *
+ * @return the compiled regular expression
+ */
+ private Pattern loadAcceptPattern(ExternalContext context)
+ {
+ assert context != null;
+
+ String mappings = context.getInitParameter(ViewHandler.FACELETS_VIEW_MAPPINGS_PARAM_NAME);
+ if (mappings == null)
+ {
+ return null;
+ }
+
+ // Make sure the mappings contain something
+ mappings = mappings.trim();
+ if (mappings.length() == 0)
+ {
+ return null;
+ }
+
+ return Pattern.compile(toRegex(mappings));
+ }
+
+ private String loadFaceletExtension(ExternalContext context)
+ {
+ assert context != null;
+
+ String suffix = context.getInitParameter(ViewHandler.FACELETS_SUFFIX_PARAM_NAME);
+ if (suffix == null)
+ {
+ suffix = ViewHandler.DEFAULT_FACELETS_SUFFIX;
+ }
+ else
+ {
+ suffix = suffix.trim();
+ if (suffix.length() == 0)
+ {
+ suffix = ViewHandler.DEFAULT_FACELETS_SUFFIX;
+ }
+ }
+
+ return suffix;
+ }
+
+ /**
+ * Convert the specified mapping string to an equivalent regular expression.
+ *
+ * @param mappings
+ * le mapping string
+ *
+ * @return an uncompiled regular expression representing the mappings
+ */
+ private String toRegex(String mappings)
+ {
+ assert mappings != null;
+
+ // Get rid of spaces
+ mappings = mappings.replaceAll("\\s", "");
+
+ // Escape '.'
+ mappings = mappings.replaceAll("\\.", "\\\\.");
+
+ // Change '*' to '.*' to represent any match
+ mappings = mappings.replaceAll("\\*", ".*");
+
+ // Split the mappings by changing ';' to '|'
+ mappings = mappings.replaceAll(";", "|");
+
+ return mappings;
+ }
+
+ public boolean handles(String resourceName)
+ {
+ if (resourceName == null)
+ {
+ return false;
+ }
+ // Check extension first as it's faster than mappings
+ if (resourceName.endsWith(_extension))
+ {
+ // If the extension matches, it's a Facelet viewId.
+ return true;
+ }
+
+ // Otherwise, try to match the view identifier with the facelet mappings
+ return _acceptPatterns != null && _acceptPatterns.matcher(resourceName).matches();
}
@Override
@@ -95,13 +222,20 @@ public final class TagLibraryConfig
ResourceHandler resourceHandler =
FacesContext.getCurrentInstance().getApplication().getResourceHandler();
- Resource compositeComponentResource = resourceHandler.createResource(
- localName +".xhtml", _compositeLibraryName);
-
- if (compositeComponentResource != null)
+ for (String defaultSuffix : _defaultSuffixesArray)
{
- URL url = compositeComponentResource.getURL();
- return (url != null);
+ String resourceName = localName + defaultSuffix;
+ if (handles(resourceName))
+ {
+ Resource compositeComponentResource = resourceHandler.createResource(
+ resourceName, _compositeLibraryName);
+
+ if (compositeComponentResource != null)
+ {
+ URL url = compositeComponentResource.getURL();
+ return (url != null);
+ }
+ }
}
}
return result;
@@ -118,16 +252,30 @@ public final class TagLibraryConfig
ResourceHandler resourceHandler =
FacesContext.getCurrentInstance().getApplication().getResourceHandler();
- String resourceName = localName + ".xhtml";
- Resource compositeComponentResource = new CompositeResouceWrapper(
- resourceHandler.createResource(resourceName, _compositeLibraryName));
-
- if (compositeComponentResource != null)
- {
- ComponentConfig componentConfig = new ComponentConfigWrapper(tag,
- "javax.faces.NamingContainer", null);
-
- return new CompositeComponentResourceTagHandler(componentConfig, compositeComponentResource);
+ for (String defaultSuffix : _defaultSuffixesArray)
+ {
+ String resourceName = localName + defaultSuffix;
+ if (handles(resourceName))
+ {
+ // MYFACES-3308 If a composite component exists, it requires to
+ // be always resolved. In other words, it should always exists a default.
+ // The call here for resourceHandler.createResource, just try to get
+ // the Resource and if it does not exists, it just returns null.
+ // The intention of this code is just create an instance and pass to
+ // CompositeComponentResourceTagHandler. Then, its values
+ // (resourceName, libraryName) will be used to derive the real instance
+ // to use in a view, based on the locale used.
+ Resource compositeComponentResource = new CompositeResouceWrapper(
+ resourceHandler.createResource(resourceName, _compositeLibraryName));
+
+ if (compositeComponentResource != null)
+ {
+ ComponentConfig componentConfig = new ComponentConfigWrapper(tag,
+ "javax.faces.NamingContainer", null);
+
+ return new CompositeComponentResourceTagHandler(componentConfig, compositeComponentResource);
+ }
+ }
}
}
return tagHandler;
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java?rev=1198040&r1=1198039&r2=1198040&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java Sat Nov 5 20:04:35 2011
@@ -365,7 +365,21 @@ public class CompositeComponentResourceT
{
faceletContext.setVariableMapper(new VariableMapperWrapper(orig));
actx.pushCompositeComponentClient(this);
- actx.applyCompositeComponent(compositeFacetPanel, _resource);
+ Resource resourceForCurrentView = faceletContext.getFacesContext().getApplication().
+ getResourceHandler().createResource(_resource.getResourceName(), _resource.getLibraryName());
+ if (resourceForCurrentView != null)
+ {
+ //Wrap it for serialization.
+ resourceForCurrentView = new CompositeResouceWrapper(resourceForCurrentView);
+ }
+ else
+ {
+ //If a resource cannot be resolved it means a default for the current
+ //composite component does not exists.
+ throw new TagException(getTag(), "Composite Component " + getTag().getQName()
+ + " requires a default instance that can be found by the installed ResourceHandler.");
+ }
+ actx.applyCompositeComponent(compositeFacetPanel, resourceForCurrentView);
}
finally
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java?rev=1198040&r1=1198039&r2=1198040&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java Sat Nov 5 20:04:35 2011
@@ -251,6 +251,14 @@ public class CompositeResourceLibrary im
String resourceName = localName + defaultSuffix;
if (handles(resourceName))
{
+ // MYFACES-3308 If a composite component exists, it requires to
+ // be always resolved. In other words, it should always exists a default.
+ // The call here for resourceHandler.createResource, just try to get
+ // the Resource and if it does not exists, it just returns null.
+ // The intention of this code is just create an instance and pass to
+ // CompositeComponentResourceTagHandler. Then, its values
+ // (resourceName, libraryName) will be used to derive the real instance
+ // to use in a view, based on the locale used.
Resource compositeComponentResourceWrapped
= resourceHandler.createResource(resourceName, libraryName);
if (compositeComponentResourceWrapped != null)
Modified: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesRequestTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesRequestTestCase.java?rev=1198040&r1=1198039&r2=1198040&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesRequestTestCase.java (original)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesRequestTestCase.java Sat Nov 5 20:04:35 2011
@@ -18,6 +18,8 @@
*/
package org.apache.myfaces.mc.test.core;
+import java.io.IOException;
+
import javax.faces.application.Application;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
@@ -185,6 +187,11 @@ public abstract class AbstractMyFacesReq
processRemainingPhases(facesContext);
}
+ protected String getRenderedContent() throws IOException
+ {
+ return getRenderedContent(facesContext);
+ }
+
protected void inputText(UIComponent input, String text)
{
client.inputText((UIInput)input, text);
Modified: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesTestCase.java?rev=1198040&r1=1198039&r2=1198040&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesTestCase.java (original)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesTestCase.java Sat Nov 5 20:04:35 2011
@@ -19,6 +19,7 @@
package org.apache.myfaces.mc.test.core;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -38,6 +39,7 @@ import javax.faces.lifecycle.LifecycleFa
import javax.faces.webapp.FacesServlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
+import javax.servlet.http.HttpServletResponse;
import org.apache.myfaces.config.DefaultFacesConfigurationProvider;
import org.apache.myfaces.config.RuntimeConfig;
@@ -47,6 +49,7 @@ import org.apache.myfaces.lifecycle.Life
import org.apache.myfaces.spi.FacesConfigurationProvider;
import org.apache.myfaces.spi.impl.DefaultFacesConfigurationProviderFactory;
import org.apache.myfaces.test.el.MockExpressionFactory;
+import org.apache.myfaces.test.mock.MockPrintWriter;
import org.apache.myfaces.test.mock.MockServletConfig;
import org.apache.myfaces.test.mock.MockServletContext;
import org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage;
@@ -594,6 +597,12 @@ public abstract class AbstractMyFacesTes
throw new UnsupportedOperationException("Cannot execute phase on custom lifecycle instances");
}
}
+
+ protected String getRenderedContent(FacesContext facesContext) throws IOException
+ {
+ MockPrintWriter writer1 = (MockPrintWriter) (((HttpServletResponse) facesContext.getExternalContext().getResponse()).getWriter());
+ return String.valueOf(writer1.content());
+ }
// ------------------------------------------------------ Instance Variables
Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/LocalizedCompositeComponentTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/LocalizedCompositeComponentTestCase.java?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/LocalizedCompositeComponentTestCase.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/LocalizedCompositeComponentTestCase.java Sat Nov 5 20:04:35 2011
@@ -0,0 +1,80 @@
+/*
+ * 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.view.facelets.tag.composite.localized;
+
+import javax.faces.webapp.FacesServlet;
+
+import org.apache.myfaces.mc.test.core.AbstractMyFacesRequestTestCase;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check if a composite component can be localized following the rules
+ * of JSF 2.0 Resource Handler API that are used for css, javascript
+ * and other resources.
+ *
+ * @author Leonardo Uribe
+ *
+ */
+public class LocalizedCompositeComponentTestCase extends AbstractMyFacesRequestTestCase
+{
+ // This is a nice example that shows how AbstractMyFacesRequestTestCase
+ // could be be useful.
+ // This test requires the default ResourceHandler algorithm and involves
+ // create multiple views. So, for this test use FaceletTestCase just does
+ // not fit well and it is more easy to use a test case than setup and
+ // teardown all MyFaces container.
+
+ @Override
+ protected void setUpWebConfigParams() throws Exception
+ {
+ super.setUpWebConfigParams();
+ servletContext.addInitParameter(FacesServlet.CONFIG_FILES_ATTR, "/faces-config.xml");
+ }
+
+ @Test
+ public void testNoLocaleCompositeComponent() throws Exception
+ {
+ setupRequest("/testNoLocalizedComposite.xhtml");
+ processLifecycleExecuteAndRender();
+ Assert.assertTrue(getRenderedContent().contains(
+ "English page fragment"));
+ tearDownRequest();
+ }
+
+ @Test
+ public void testSpanishLocaleCompositeComponent() throws Exception
+ {
+ setupRequest("/testSpanishLocalizedComposite.xhtml");
+ processLifecycleExecuteAndRender();
+ Assert.assertTrue(getRenderedContent().contains(
+ "Fragmento de pagina Espanol"));
+ tearDownRequest();
+ }
+
+ @Test
+ public void testGermanLocaleCompositeComponent() throws Exception
+ {
+ setupRequest("/testGermanLocalizedComposite.xhtml");
+ processLifecycleExecuteAndRender();
+ Assert.assertTrue(getRenderedContent().contains(
+ "Deutsches Seitenfragment"));
+ tearDownRequest();
+ }
+}
Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/view/facelets/tag/composite/localized/LocalizedCompositeComponentTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/faces-config.xml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/faces-config.xml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/faces-config.xml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,37 @@
+<?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">
+
+<application>
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>es</supported-locale>
+ </locale-config>
+ <message-bundle>org.apache.myfaces.view.facelets.tag.composite.localized.messages</message-bundle>
+</application>
+
+</faces-config>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_de.properties
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_de.properties?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_de.properties (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_de.properties Sat Nov 5 20:04:35 2011
@@ -0,0 +1,17 @@
+ # 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.
+javax.faces.resource.localePrefix=de
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_de.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_en.properties
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_en.properties?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_en.properties (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_en.properties Sat Nov 5 20:04:35 2011
@@ -0,0 +1,17 @@
+ # 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.
+javax.faces.resource.localePrefix=en
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_en.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_es.properties
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_es.properties?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_es.properties (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_es.properties Sat Nov 5 20:04:35 2011
@@ -0,0 +1,17 @@
+ # 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.
+javax.faces.resource.localePrefix=es_CO
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/messages_es.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/
------------------------------------------------------------------------------
bugtraq:number = true
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/
------------------------------------------------------------------------------
bugtraq:number = true
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/fragment01.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/fragment01.xhtml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/fragment01.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/fragment01.xhtml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:cc="http://java.sun.com/jsf/composite" xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<cc:interface>
+</cc:interface>
+
+<cc:implementation>
+ Deutsches Seitenfragment
+</cc:implementation>
+
+</ui:composition>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/de/fragments/fragment01.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/
------------------------------------------------------------------------------
bugtraq:number = true
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/fragment01.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/fragment01.xhtml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/fragment01.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/fragment01.xhtml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:cc="http://java.sun.com/jsf/composite" xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<cc:interface>
+</cc:interface>
+
+<cc:implementation>
+ Fragmento de pagina Espanol
+</cc:implementation>
+
+</ui:composition>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/es_CO/fragments/fragment01.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/
------------------------------------------------------------------------------
bugtraq:number = true
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/fragment01.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/fragment01.xhtml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/fragment01.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/fragment01.xhtml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:cc="http://java.sun.com/jsf/composite" xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<cc:interface>
+</cc:interface>
+
+<cc:implementation>
+ English page fragment
+</cc:implementation>
+
+</ui:composition>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/resources/fragments/fragment01.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testGermanLocalizedComposite.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testGermanLocalizedComposite.xhtml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testGermanLocalizedComposite.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testGermanLocalizedComposite.xhtml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!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:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:jl="http://java.sun.com/jsf/composite/jsflive"
+ xmlns:jlf="http://java.sun.com/jsf/composite/fragments">
+<f:view locale="de">
+<h:head>
+</h:head>
+<h:body>
+ <jlf:fragment01/>
+</h:body>
+</f:view>
+</html>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testGermanLocalizedComposite.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testNoLocalizedComposite.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testNoLocalizedComposite.xhtml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testNoLocalizedComposite.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testNoLocalizedComposite.xhtml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!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:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:jl="http://java.sun.com/jsf/composite/jsflive"
+ xmlns:jlf="http://java.sun.com/jsf/composite/fragments">
+<f:view locale="en">
+<h:head>
+</h:head>
+<h:body>
+ <jlf:fragment01/>
+</h:body>
+</f:view>
+</html>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testNoLocalizedComposite.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testSpanishLocalizedComposite.xhtml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testSpanishLocalizedComposite.xhtml?rev=1198040&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testSpanishLocalizedComposite.xhtml (added)
+++ myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testSpanishLocalizedComposite.xhtml Sat Nov 5 20:04:35 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!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:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:jl="http://java.sun.com/jsf/composite/jsflive"
+ xmlns:jlf="http://java.sun.com/jsf/composite/fragments">
+<f:view locale="es">
+<h:head>
+</h:head>
+<h:body>
+ <jlf:fragment01/>
+</h:body>
+</f:view>
+</html>
Propchange: myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/localized/testSpanishLocalizedComposite.xhtml
------------------------------------------------------------------------------
svn:eol-style = native