shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@apache.org
Subject svn commit: r473148 - in /shale/sandbox/shale-clay-trinidad: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/myfaces/ src/main/java/org/apache/myfaces/trinidad/ src/main/java/org/apache/myfaces/tri...
Date Fri, 10 Nov 2006 00:26:39 GMT
Author: gvanmatre
Date: Thu Nov  9 16:26:38 2006
New Revision: 473148

URL: http://svn.apache.org/viewvc?view=rev&rev=473148
Log:
This project is the start of a testbed to work out issue with Clay Trinidad integration (SHALE-326).
 I started the project using the Trinidad architecture type (http://incubator.apache.org/adffaces/plugins/myfaces-archetype-trinidad/index.html)
and added the Shale dependencies.

It uses the clay full XML (tiles like) views and also contains the new clay maven mojo for
creating the clay configuration files from the TLD's.  


Added:
    shale/sandbox/shale-clay-trinidad/
    shale/sandbox/shale-clay-trinidad/pom.xml   (with props)
    shale/sandbox/shale-clay-trinidad/src/
    shale/sandbox/shale-clay-trinidad/src/main/
    shale/sandbox/shale-clay-trinidad/src/main/java/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
  (with props)
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
  (with props)
    shale/sandbox/shale-clay-trinidad/src/main/resources/
    shale/sandbox/shale-clay-trinidad/src/main/webapp/
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-config.xml   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-tiles-config.xml   (with
props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/web.xml   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/index.jsp   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/
    shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html   (with props)
    shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html   (with props)

Added: shale/sandbox/shale-clay-trinidad/pom.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/pom.xml?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/pom.xml (added)
+++ shale/sandbox/shale-clay-trinidad/pom.xml Thu Nov  9 16:26:38 2006
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.shale</groupId>
+	<artifactId>shale-clay-trinidad</artifactId>
+	<packaging>war</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<name>Shale Clay Trinidad Example</name>
+	<url>http://shale.apache.org</url>
+
+	<build>
+		<finalName>${artifactId}</finalName>
+		<resources>
+			<resource>
+				<targetPath>${project.build.outputDirectory}/META-INF</targetPath>
+				<directory>${project.build.outputDirectory}/src/main/resources/META-INF</directory>
+				<includes>
+					<include>**/*.xml</include>
+				</includes>
+			</resource>
+		</resources>
+
+		<plugins>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.shale</groupId>
+				<artifactId>Tld2ClayCfgMojo</artifactId>
+				<version>1.0-SNAPSHOT</version>
+				<executions>
+					<execution>
+						<id>convert tld</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>convert</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<tlds>
+						<tld implementation="org.apache.shale.Tld">
+							<name>META-INF/tr.tld</name>
+							<version>incubator-m1-SNAPSHOT</version>
+							<mbFilter>
+								(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*
+							</mbFilter>
+						</tld>
+						<tld implementation="org.apache.shale.Tld">
+							<name>META-INF/trh.tld</name>
+							<version>incubator-m1-SNAPSHOT</version>
+							<mbFilter>
+								(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*
+							</mbFilter>
+						</tld>
+					</tlds>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.cargo</groupId>
+				<artifactId>cargo-maven2-plugin</artifactId>
+				<configuration>
+					<container>
+						<containerId>tomcat5x</containerId>
+						<home>${cargo.tomcat5x.home}</home>
+						<log>
+							${project.build.directory}/tomcat5x.log
+						</log>
+						<output>
+							${project.build.directory}/tomcat5x.out
+						</output>
+					</container>
+					<configuration>
+						<home>${project.build.directory}/tomcat5x</home>
+						<properties>
+							<cargo.jvmargs> -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n
</cargo.jvmargs>
+						</properties>
+					</configuration>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+
+	<repositories>
+		<repository>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<id>apache-maven-snapshots</id>
+			<url>
+				http://people.apache.org/repo/m2-snapshot-repository/
+			</url>
+		</repository>
+	</repositories>
+
+	<!-- Project dependencies -->
+	<dependencies>
+		<!-- myfaces runtime -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.1.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>taglibs</groupId>
+			<artifactId>standard</artifactId>
+			<version>1.1.2</version>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.myfaces.core</groupId>
+			<artifactId>myfaces-api</artifactId>
+			<version>1.1.4</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.myfaces.core</groupId>
+			<artifactId>myfaces-impl</artifactId>
+			<version>1.1.4</version>
+		</dependency>
+
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.0</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- These should be specified in the myfaces pom -->
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-el</groupId>
+			<artifactId>commons-el</artifactId>
+			<version>1.0</version>
+		</dependency>
+
+		<!-- Apache Trinidad 
+                     You need to build for the source.
+                     svn co http://svn.apache.org/repos/asf/incubator/adffaces/trunk/trinidad
trinidad
+                     cd trinidad
+                     mvn install
+                     ** rock on **
+                -->
+		<dependency>
+			<groupId>org.apache.myfaces.trinidad</groupId>
+			<artifactId>trinidad-api</artifactId>
+			<version>incubator-m1-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.myfaces.trinidad</groupId>
+			<artifactId>trinidad-impl</artifactId>
+			<version>incubator-m1-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+
+		<!-- shale stuff -->
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-application</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-clay</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-core</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-view</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-test</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+
+	</dependencies>
+
+</project>

Propchange: shale/sandbox/shale-clay-trinidad/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
(added)
+++ shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
Thu Nov  9 16:26:38 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.trinidad.blank;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
+import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
+import org.apache.myfaces.trinidad.util.Service;
+
+/**
+ * A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
+ * 
+ * @author <a href="mailto:matzew@apache.org">Matthias We├čendorf</a>
+ */
+public class HelloWorldBacking {
+
+    /**
+     * <p>
+     * Common logger utility class.
+     * </p>
+     */
+    private static Log log;
+    static {
+        log = LogFactory.getLog(HelloWorldBacking.class);
+    }
+
+    // properties
+    private String _name;
+
+    /**
+     * default empty constructor
+     */
+    public HelloWorldBacking() {
+    }
+
+    // -------------------getter & setter
+    public String getName() {
+        return _name;
+    }
+
+    public void setName(String name) {
+        this._name = name;
+    }
+
+    /**
+     * Method that is backed to a submit button of a form.
+     */
+    public String send() {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        ExtendedRenderKitService service = (ExtendedRenderKitService) Service
+                .getRenderKitService(facesContext,
+                        ExtendedRenderKitService.class);
+        service.addScript(facesContext,
+                "alert('Script added by ExtendedRenderKitService')");
+
+        // do real logic
+        return ("success");
+    }
+
+    public void attributeChangeListener(AttributeChangeEvent event) {
+        log.info(event);
+    }
+
+}
\ No newline at end of file

Propchange: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
(added)
+++ shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
Thu Nov  9 16:26:38 2006
@@ -0,0 +1,90 @@
+package org.apache.shale.clay.component.chain.trinidad;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+
+import org.apache.commons.chain.Context;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.trinidad.component.UIXComponent;
+import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
+import org.apache.shale.clay.component.chain.AbstractCommand;
+import org.apache.shale.clay.component.chain.AssignPropertiesCommand;
+import org.apache.shale.clay.component.chain.ClayContext;
+import org.apache.shale.clay.config.beans.AttributeBean;
+import org.apache.shale.clay.config.beans.ComponentBean;
+
+public class AttributeChangeListenerCommand extends AbstractCommand {
+    /**
+     * <p>
+     * Common logger utility class.
+     * </p>
+     */
+    private static Log log;
+    static {
+        log = LogFactory.getLog(AttributeChangeListenerCommand.class);
+    }
+
+    /**
+     * <p>
+     * Looks to see if the {@link AttributeBean} on the {@link ClayContext} is a
+     * <code>AttributeChangeListener</code> attribute. If it is, create a
+     * <code>MethodBinding</code> and assign it to the component returning a
+     * <code>true</code> value. Otherwise, return a <code>false</code>
+     * value. This <code>Command</code> is invoked from the
+     * {@link AssignPropertiesCommand} chain.
+     * </p>
+     *
+     * @param context common chains
+     * @return <code>true</code> if the chain is complete
+     * @exception Exception propagated up to the top of the chain
+     */
+    public boolean execute(Context context) throws Exception {
+
+        boolean isFinal = false;
+
+        ClayContext clayContext = (ClayContext) context;
+        if (clayContext == null) {
+            throw new NullPointerException(getMessages().getMessage("clay.null.clayContext"));
+        }
+        AttributeBean attributeBean = clayContext.getAttribute();
+        if (attributeBean == null) {
+            throw new NullPointerException(getMessages().getMessage("clay.null.attributeBean"));
+        }
+        ComponentBean displayElement = clayContext.getDisplayElement();
+        if (displayElement == null) {
+            throw new NullPointerException(getMessages().getMessage("clay.null.componentBean"));
+        }
+        FacesContext facesContext = clayContext.getFacesContext();
+        if (facesContext == null) {
+            throw new NullPointerException(getMessages().getMessage("clay.null.facesContext"));
+        }
+
+        if (attributeBean.getName().equals("attributeChangeListener") && attributeBean.getValue()
!= null) {
+            isFinal = true;
+
+            UIComponent child = (UIComponent) clayContext.getChild();
+            if (child == null) {
+                throw new NullPointerException(getMessages().getMessage("clay.null.childComponent"));
+            }
+
+            if (child instanceof UIXComponent) {
+
+                String expr = replaceMnemonic(clayContext);
+                
+                MethodBinding mb = facesContext.getApplication()
+                        .createMethodBinding(expr, new Class[]{AttributeChangeEvent.class});
+                ((UIXComponent) child).setAttributeChangeListener(mb);
+
+
+            } else {
+                log.error("Cannot bind attributeChangeListener expression to a"
+                        + " component not extending UIXComponent: " + attributeBean.toString());
+            }
+        }
+
+        return isFinal;
+    }
+
+}

Propchange: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml Thu Nov  9
16:26:38 2006
@@ -0,0 +1,63 @@
+<?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.
+	
+	$Id$
+-->
+
+<catalogs>
+
+	<!-- Define preprocessing command chain for Shale to execute -->
+	<catalog name="shale">
+		<chain name="preprocess">
+
+			<!-- This command is only needed for full clay html views with myfaces  -->
+			<command
+				className="org.apache.shale.clay.faces.ClayViewHandlerCommand" />
+
+
+			<!-- This filter command wakes up the watchdog monitoring the Clay configuration files
for change. -->
+			<!-- 
+				<command      className="org.apache.shale.clay.config.beans.ConfigDefinitionsWatchdogFilter"
+				includes="\S*\.faces,\S*\.html,/index\.jsp,\S*\.xml"/>
+			-->
+		</chain>
+	</catalog>
+
+	
+	<catalog name="clayCustomization">
+	    <!-- Define Clay builder/namespace override -->
+		<chain name="http://myfaces.apache.org/trinidad">
+			<command
+				className="org.apache.shale.clay.parser.builder.chain.JsfDefaultBuilderRule"
+				prefix="tr" />
+		</chain>
+		<chain name="http://myfaces.apache.org/trinidad/html">
+			<command
+				className="org.apache.shale.clay.parser.builder.chain.JsfDefaultBuilderRule"
+				prefix="trh" />
+		</chain>
+        <!-- defines a custom handler for the attributeChangeListener component method
binding event property -->
+		<chain name="attributeChangeListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.AttributeChangeListenerCommand"
/>
+		</chain>
+	</catalog>
+
+
+</catalogs>

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-config.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-config.xml?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-config.xml (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-config.xml Thu Nov  9 16:26:38
2006
@@ -0,0 +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.
+	
+	$Id$
+-->
+
+<!DOCTYPE view PUBLIC
+      "-//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN"
+      "http://shale.apache.org/dtds/clay-config_1_0.dtd">
+
+<view>
+
+	<!-- Base layout defintion  -->
+	<component jsfid="basePage" extends="clay">
+		<attributes>
+			<set name="clayJsfid" value="/pages/layout.html" />
+		</attributes>
+		<symbols>
+			<set name="@title"
+				value="Apache MyFaces Trinidad Archetype Demo" />
+			<set name="@bodycontent" value="space" />
+			<set name="@navigationPaneHint" value="bar"/>
+		</symbols>
+	</component>
+
+
+</view>

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-tiles-config.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-tiles-config.xml?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-tiles-config.xml (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-tiles-config.xml Thu Nov
 9 16:26:38 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--    
+	
+	Copyright 2006 The Apache Software Foundation.
+	
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+	
+-->
+
+<!DOCTYPE view PUBLIC
+      "-//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN"
+      "http://shale.apache.org/dtds/shale-clay-config_1_0.dtd">
+
+<view>
+
+	<component jsfid="/index.jsf" extends="basePage">
+		<symbols>
+			<set name="@bodycontent" value="/pages/index.html" />
+		</symbols>
+	</component>
+
+	<component jsfid="/page2.jsf" extends="basePage">
+		<symbols>
+			<set name="@bodycontent" value="/pages/page2.html" />
+			<set name="@navigationPaneHint" value="tabs"/>
+		</symbols>
+	</component>
+
+</view>
\ No newline at end of file

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/clay-tiles-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml Thu Nov  9
16:26:38 2006
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+	Copyright 2006 The Apache Software Foundation.
+	
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<!DOCTYPE faces-config PUBLIC
+  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" >
+<faces-config>
+
+	<application>
+		<!-- Use the Trinidad RenderKit -->
+		<default-render-kit-id>
+			org.apache.myfaces.trinidad.core
+		</default-render-kit-id>
+	</application>
+
+	<!-- Global preferences object that proxies to others -->
+	<managed-bean>
+		<managed-bean-name>helloWorldBacking</managed-bean-name>
+		<managed-bean-class>
+			org.apache.myfaces.trinidad.blank.HelloWorldBacking
+		</managed-bean-class>
+		<managed-bean-scope>request</managed-bean-scope>
+	</managed-bean>
+
+	<!-- navigation rules for index.jsf -->
+	<navigation-rule>
+		<from-view-id>/index.jsf</from-view-id>
+		<navigation-case>
+			<from-outcome>success</from-outcome>
+			<to-view-id>/page2.jsf</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+	<!-- navigation rules for page2.jsf -->
+	<navigation-rule>
+		<from-view-id>/page2.jsf</from-view-id>
+		<navigation-case>
+			<from-outcome>back</from-outcome>
+			<to-view-id>/index.jsf</to-view-id>
+		</navigation-case>
+	</navigation-rule>
+
+</faces-config>
\ No newline at end of file

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/web.xml?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/web.xml (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/web.xml Thu Nov  9 16:26:38
2006
@@ -0,0 +1,188 @@
+<?xml version = '1.0' encoding = 'ISO-8859-1'?>
+<!--
+	Copyright 2006 The Apache Software Foundation.
+	
+	Licensed under the Apache License, Version 2.0 (the "License");
+	you may not use this file except in compliance with the License.
+	You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing, software
+	distributed under the License is distributed on an "AS IS" BASIS,
+	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	See the License for the specific language governing permissions and
+	limitations under the License.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+	version="2.4">
+	<!-- Use client-side state saving.  In Trinidad, it is an
+		optimized, token-based mechanism that is almost always a
+		better choice than the standard JSF server-side state saving. -->
+	<context-param>
+		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+		<param-value>client</param-value>
+		<!--param-value>server</param-value-->
+	</context-param>
+
+	<!-- Trinidad by default uses an optimized client-side state saving
+		mechanism. To disable that, uncomment the following -->
+	<!--context-param>
+		<param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
+		<param-value>all</param-value>
+		</context-param-->
+
+	<!-- Trinidad also supports an optimized strategy for caching some
+		view state at an application level, which significantly improves
+		scalability.  However, it makes it harder to develop (updates to
+		pages will not be noticed until the server is restarted), and in
+		some rare cases cannot be used for some pages (see Trinidad
+		documentation for more information) -->
+	<context-param>
+		<param-name>
+			org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
+		</param-name>
+		<param-value>false</param-value>
+	</context-param>
+
+	<!-- If this parameter is enabled, Trinidad will automatically
+		check the modification date of your JSPs, and discard saved
+		state when they change;  this makes development easier,
+		but adds overhead that should be avoided when your application
+		is deployed -->
+	<context-param>
+		<param-name>
+			org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
+		</param-name>
+		<param-value>false</param-value>
+	</context-param>
+
+	<!-- Enables Change Persistence at a session scope.  By default,
+		Change Persistence is entirely disabled. The ChangeManager is
+		an API, which can persist component modifications (like,
+		is a showDetail or tree expanded or collapsed). For providing
+		a custom Change Persistence implementation inherit from the 
+		Trinidad API's ChangeManager class. As the value you have 
+		to use the fullqualified class name. -->
+	<context-param>
+		<param-name>
+			org.apache.myfaces.trinidad.CHANGE_PERSISTENCE
+		</param-name>
+		<param-value>session</param-value>
+	</context-param>
+
+	<!-- Override the default suffix for extension-mapped -->
+	<context-param>
+		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+		<param-value>.jsf</param-value>
+	</context-param>
+
+	<!-- Clay XML View Suffix -->
+	<context-param>
+		<param-name>
+			org.apache.shale.clay.XML_TEMPLATE_SUFFIX
+		</param-name>
+		<param-value>.jsf</param-value>
+	</context-param>
+
+	<!-- Commons Chain Configuration Resources -->
+	<context-param>
+		<param-name>
+			org.apache.commons.chain.CONFIG_WEB_RESOURCE
+		</param-name>
+		<param-value>/WEB-INF/chain-config.xml</param-value>
+	</context-param>
+
+	<!-- Clay Common Configuration Resources -->
+	<context-param>
+		<param-name>
+			org.apache.shale.clay.COMMON_CONFIG_FILES
+		</param-name>
+		<param-value>
+			/WEB-INF/clay-config.xml,classpath*:META-INF/trh-incubator-m1-SNAPSHOT-config.xml,
+			classpath*:META-INF/tr-incubator-m1-SNAPSHOT-config.xml
+		</param-value>
+	</context-param>
+
+	<!-- Clay Configuration Full XML view Resources -->
+	<context-param>
+		<param-name>
+			org.apache.shale.clay.FULLXML_CONFIG_FILES
+		</param-name>
+		<param-value>/WEB-INF/clay-tiles-config.xml</param-value>
+	</context-param>
+
+	<!-- Shale Application Controller Filter -->
+	<filter>
+		<filter-name>shale</filter-name>
+		<filter-class>
+			org.apache.shale.application.faces.ShaleApplicationFilter
+		</filter-class>
+	</filter>
+
+	<!-- Shale Application Controller Filter Mapping -->
+	<filter-mapping>
+		<filter-name>shale</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<!-- Commons Chain Configuration Listener -->
+	<listener>
+		<listener-class>
+			org.apache.commons.chain.web.ChainListener
+		</listener-class>
+	</listener>
+
+	<filter>
+		<filter-name>trinidad</filter-name>
+		<filter-class>
+			org.apache.myfaces.trinidad.webapp.TrinidadFilter
+		</filter-class>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>trinidad</filter-name>
+		<servlet-name>faces</servlet-name>
+	</filter-mapping>
+
+	<!-- Listener, to allow Jetty serving MyFaces apps -->
+	<!-- 
+		<listener>
+		<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+		</listener>
+	-->
+
+	<!-- Faces Servlet -->
+	<servlet>
+		<servlet-name>faces</servlet-name>
+		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+	</servlet>
+
+	<!-- resource loader servlet -->
+	<servlet>
+		<servlet-name>resources</servlet-name>
+		<servlet-class>
+			org.apache.myfaces.trinidad.webapp.ResourceServlet
+		</servlet-class>
+	</servlet>
+
+	<!-- Faces Servlet Mappings -->
+	<servlet-mapping>
+		<servlet-name>faces</servlet-name>
+		<url-pattern>*.jsf</url-pattern>
+	</servlet-mapping>
+
+	<servlet-mapping>
+		<servlet-name>resources</servlet-name>
+		<url-pattern>/adf/*</url-pattern>
+	</servlet-mapping>
+
+
+	<!-- Welcome Files -->
+	<welcome-file-list>
+		<welcome-file>index.jsp</welcome-file>
+	</welcome-file-list>
+
+</web-app>
\ No newline at end of file

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/index.jsp?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/index.jsp (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/index.jsp Thu Nov  9 16:26:38 2006
@@ -0,0 +1 @@
+<jsp:forward page="/index.jsf"/>

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html Thu Nov  9 16:26:38
2006
@@ -0,0 +1,35 @@
+<!-- ### clay:page charset="UTF-8" /### -->
+<!-- ### clay:remove ### -->
+<!--
+ 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.
+-->
+<!-- ### /clay:remove ### -->
+<span jsfid="void"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:tr="http://myfaces.apache.org/trinidad">
+	<tr:form>
+
+		<tr:panelPage>
+			<tr:inputText label="Your name" id="input1"
+				value="#{helloWorldBacking.name}" required="true"
+				attributeChangeListener="#{helloWorldBacking.attributeChangeListener}" />
+			<tr:commandButton id="button1" text="press me"
+				action="#{helloWorldBacking.send}" />
+		</tr:panelPage>
+
+	</tr:form>
+</span>

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html Thu Nov  9 16:26:38
2006
@@ -0,0 +1,37 @@
+<!-- ### clay:page charset="UTF-8" /### -->
+<!-- ### clay:remove ### -->
+<!--
+ 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.
+-->
+<!-- ### /clay:remove ### -->
+<html jsfid="void"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:tr="http://myfaces.apache.org/trinidad"
+	xmlns:c="http://shale.apache.org/clay">
+<tr:document title="@title">
+ <tr:form id="navigation">
+          <tr:navigationPane hint="@navigationPaneHint">
+            <tr:commandNavigationItem text="shale.apache.org" destination="http://shale.apache.org"
targetFrame="_new"/>
+            <tr:commandNavigationItem text="myfaces.apache.org" destination="http://myfaces.apache.org"
targetFrame="_new"/>
+          </tr:navigationPane>
+  </tr:form>
+
+   <c:clay jsfid="clay" clayJsfid="@bodycontent">
+      Mock body goes here
+   </c:clay>
+</tr:document>
+</html>

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html?view=auto&rev=473148
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html (added)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html Thu Nov  9 16:26:38
2006
@@ -0,0 +1,31 @@
+<!-- ### clay:page charset="UTF-8" /### -->
+<!-- ### clay:remove ### -->
+<!--
+ 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.
+-->
+<!-- ### /clay:remove ### -->
+<span jsfid="void"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:tr="http://myfaces.apache.org/trinidad">
+	
+       <tr:form>     
+        <tr:panelPage>
+          <tr:outputText id="input1" value="Hello #{helloWorldBacking.name}. We hope you
enjoy Apache MyFaces Trinidad"/>
+          <tr:commandLink id="link" text="GO HOME" action="back" />
+        </tr:panelPage>    
+       </tr:form>
+</span>
\ No newline at end of file

Propchange: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message