You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2008/07/09 05:47:06 UTC
svn commit: r675091 - in /myfaces/trinidad/branches/exhibition:
trinidad-examples/ trinidad-examples/trinidad-exhibition/
trinidad-examples/trinidad-exhibition/api/
trinidad-examples/trinidad-exhibition/api/src/
trinidad-examples/trinidad-exhibition/ap...
Author: arobinson74
Date: Tue Jul 8 20:47:05 2008
New Revision: 675091
URL: http://svn.apache.org/viewvc?rev=675091&view=rev
Log:
Working on the main template
Added:
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/UtilFunctions.java (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/components/ViewSource.xml (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/renderers/ViewSource.xml (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/util/Functions.java (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/ComponentIndexBean.java (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/MenusBean.java (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/component.xhtml (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trfn.taglib.xml (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/index.xhtml (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/demo-skin.css (with props)
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/images/
Removed:
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/footer-bg.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/myfaces-logo-small.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/myfaces-logo-with-text-small.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/myfaces-logo-with-text-watermark.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/myfaces-logo-with-text.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/myfaces-logo.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/title-bg-fade.png
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/images/title-bg.png
Modified:
myfaces/trinidad/branches/exhibition/trinidad-examples/pom.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/pom.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/pom.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/impl/pom.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/pom.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/pom.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/PreferencesBean.java
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/SourceCodeServlet.java
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/resources/org/apache/myfaces/trinidadexhibition/BundleMessages.properties
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/main.xhtml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/faces-config.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-config.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-skins.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/web.xml
myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/index.xhtml
myfaces/trinidad/branches/exhibition/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/style/myfaces-desktop.css
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/pom.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/pom.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/pom.xml Tue Jul 8 20:47:05 2008
@@ -42,8 +42,6 @@
<module>trinidad-exhibition</module>
</modules>
-
-
<profiles>
<profile>
<id>release</id>
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/pom.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/pom.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/pom.xml Tue Jul 8 20:47:05 2008
@@ -38,7 +38,7 @@
<parent>
<groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-exhibition</artifactId>
+ <artifactId>trinidad-exhibition-parent</artifactId>
<!-- TODO: change version to match Trinidad after moving to the trunk -->
<version>1.2.8-SNAPSHOT</version>
</parent>
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/UtilFunctions.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/UtilFunctions.java?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/UtilFunctions.java (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/UtilFunctions.java Tue Jul 8 20:47:05 2008
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.apache.myfaces.trinidadexhibition.util;
+
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ * @author Andrew Robinson
+ */
+public final class UtilFunctions
+{
+ private UtilFunctions() {}
+
+ public static String getBundleString(String key, Object... parms)
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ResourceBundle bundle = facesContext.getApplication().getResourceBundle(facesContext, "msgs");
+
+ String str = bundle.getString(key);
+ if (parms != null && parms.length > 0)
+ {
+ str = MessageFormat.format(str, parms);
+ }
+ return str;
+ }
+
+ public static Object evaluateEl(String el)
+ {
+ return evaluateEl(el, Object.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> T evaluateEl(String el, Class<T> returnType)
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ return (T)facesContext.getApplication().getExpressionFactory().createValueExpression(el, returnType)
+ .getValue(facesContext.getELContext());
+ }
+}
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/api/src/main/java/org/apache/myfaces/trinidadexhibition/util/UtilFunctions.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/pom.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/pom.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/pom.xml Tue Jul 8 20:47:05 2008
@@ -38,7 +38,7 @@
<parent>
<groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-exhibition</artifactId>
+ <artifactId>trinidad-exhibition-parent</artifactId>
<!-- TODO: change version to match Trinidad after moving to the trunk -->
<version>1.2.8-SNAPSHOT</version>
</parent>
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/components/ViewSource.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/components/ViewSource.xml?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/components/ViewSource.xml (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/components/ViewSource.xml Tue Jul 8 20:47:05 2008
@@ -0,0 +1,46 @@
+<?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
+ version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:tre="http://myfaces.apache.org/trinidad/exhibition"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"
+ xmlns:mafp="http://myfaces.apache.org/maven-trinidad-plugin"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ <component>
+ <description>
+ <![CDATA[Link to view the source of the current view in the demo.]]>
+ </description>
+ <component-type>org.apache.myfaces.trinidad.exhibition.ViewSource</component-type>
+ <component-class>org.apache.myfaces.trinidad.exhibition.component.ViewSource</component-class>
+ <component-extension>
+ <mfp:component-family>org.apache.myfaces.trinidad.exhibition.ViewSource</mfp:component-family>
+ <mfp:component-supertype>org.apache.myfaces.trinidad.component.core.nav.CoreGoLink</mfp:component-supertype>
+ <mfp:renderer-type>org.apache.myfaces.trinidad.exhibition.ViewSource</mfp:renderer-type>
+ <mfp:tag-class>org.apache.myfaces.trinidadinternal.exhibition.taglib.ViewSourceTag</mfp:tag-class>
+ <mfp:tag-name>tre:viewSource</mfp:tag-name>
+ <mfp:component-metadata>
+ <mfp:favorite-property>id</mfp:favorite-property>
+ </mfp:component-metadata>
+ </component-extension>
+ </component>
+</faces-config>
\ No newline at end of file
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/components/ViewSource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/renderers/ViewSource.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/renderers/ViewSource.xml?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/renderers/ViewSource.xml (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/renderers/ViewSource.xml Tue Jul 8 20:47:05 2008
@@ -0,0 +1,38 @@
+<?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
+ version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin">
+ <render-kit>
+ <render-kit-id>org.apache.myfaces.trinidadinternal.core</render-kit-id>
+ <renderer>
+ <component-family>org.apache.myfaces.trinidad.exhibition.ViewSource</component-family>
+ <renderer-type>org.apache.myfaces.trinidad.exhibition.ViewSource</renderer-type>
+ <renderer-class>
+ org.apache.myfaces.trinidadinternal.exhibition.renderkit.xhtml.ViewSourceRenderer
+ </renderer-class>
+ <renderer-extension>
+ <mfp:component-type>org.apache.myfaces.trinidad.exhibition.ViewSource</mfp:component-type>
+ </renderer-extension>
+ </renderer>
+ </render-kit>
+</faces-config>
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/build/src/main/resources/META-INF/maven-faces-plugin/renderers/ViewSource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/impl/pom.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/impl/pom.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/impl/pom.xml Tue Jul 8 20:47:05 2008
@@ -38,7 +38,7 @@
<parent>
<groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-exhibition</artifactId>
+ <artifactId>trinidad-exhibition-parent</artifactId>
<!-- TODO: change version to match Trinidad after moving to the trunk -->
<version>1.2.8-SNAPSHOT</version>
</parent>
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/pom.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/pom.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/pom.xml Tue Jul 8 20:47:05 2008
@@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-exhibition</artifactId>
+ <artifactId>trinidad-exhibition-parent</artifactId>
<version>1.2.8-SNAPSHOT</version>
<name>Trinidad Exhibition</name>
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/pom.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/pom.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/pom.xml Tue Jul 8 20:47:05 2008
@@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-exhibition-web</artifactId>
+ <artifactId>trinidad-exhibition</artifactId>
<packaging>war</packaging>
<name>Trinidad Exhibition Web Project</name>
@@ -39,7 +39,7 @@
<parent>
<groupId>org.apache.myfaces.trinidad</groupId>
- <artifactId>trinidad-exhibition</artifactId>
+ <artifactId>trinidad-exhibition-parent</artifactId>
<!-- TODO: change version to match Trinidad after moving to the trunk -->
<version>1.2.8-SNAPSHOT</version>
</parent>
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/util/Functions.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/util/Functions.java?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/util/Functions.java (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/util/Functions.java Tue Jul 8 20:47:05 2008
@@ -0,0 +1,22 @@
+/**
+ *
+ */
+package org.apache.myfaces.trinidadexhibition.util;
+
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ * @author Andrew Robinson
+ */
+public final class Functions
+{
+ private Functions() {}
+
+ public static String getActionURL(String viewId)
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ return facesContext.getApplication().getViewHandler().getActionURL(
+ facesContext, viewId);
+ }
+}
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/util/Functions.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/ComponentIndexBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/ComponentIndexBean.java?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/ComponentIndexBean.java (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/ComponentIndexBean.java Tue Jul 8 20:47:05 2008
@@ -0,0 +1,42 @@
+/**
+ *
+ */
+package org.apache.myfaces.trinidadexhibition.webapp;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.myfaces.trinidadexhibition.util.UtilFunctions;
+
+/**
+ *
+ * @author Andrew Robinson
+ */
+public class ComponentIndexBean
+{
+ private Map<String, Integer> _numRowsMap = null;
+
+ /**
+ * @return the numRowsMap
+ */
+ public Map<String, Integer> getNumRowsMap()
+ {
+ if (_numRowsMap == null)
+ {
+ synchronized (this)
+ {
+ if (_numRowsMap == null)
+ {
+ _numRowsMap = new HashMap<String, Integer>(3);
+ MetaDataBean metaData = UtilFunctions.evaluateEl("#{metaData}", MetaDataBean.class);
+ for (String str : new String[] { "tr", "trh", "trs" })
+ {
+ int count = metaData.getTagLibraries().get(str).getTags().size();
+ _numRowsMap.put(str, (int)Math.ceil(count / 3f));
+ }
+ }
+ }
+ }
+ return _numRowsMap;
+ }
+}
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/ComponentIndexBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/MenusBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/MenusBean.java?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/MenusBean.java (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/MenusBean.java Tue Jul 8 20:47:05 2008
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.apache.myfaces.trinidadexhibition.webapp;
+
+import javax.faces.model.SelectItem;
+
+import org.apache.myfaces.trinidadexhibition.util.UtilFunctions;
+
+/**
+ *
+ * @author Andrew Robinson
+ */
+public class MenusBean
+{
+ private final SelectItem[] _mainMenuItems;
+
+ public MenusBean()
+ {
+ _mainMenuItems = new SelectItem[] {
+ buildItem("menus_component_demo"),
+ buildItem("menus_feature_demo"),
+ buildItem("menus_example_apps"),
+ buildItem("menus_resources"),
+ };
+ }
+
+ /**
+ * @return the mainMenuItems
+ */
+ public SelectItem[] getMainMenuItems()
+ {
+ return _mainMenuItems;
+ }
+
+ private SelectItem buildItem(String key)
+ {
+ return new SelectItem(key, UtilFunctions.getBundleString(key));
+ }
+}
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/MenusBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/PreferencesBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/PreferencesBean.java?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/PreferencesBean.java (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/PreferencesBean.java Tue Jul 8 20:47:05 2008
@@ -19,13 +19,14 @@
package org.apache.myfaces.trinidadexhibition.webapp;
+
/**
*
* @author Andrew Robinson
*/
public class PreferencesBean
{
- private String _skinFamily = "myfaces";
+ private String _skinFamily = "demo-skin";
private String _accessibilityMode;
/**
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/SourceCodeServlet.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/SourceCodeServlet.java?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/SourceCodeServlet.java (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/java/org/apache/myfaces/trinidadexhibition/webapp/SourceCodeServlet.java Tue Jul 8 20:47:05 2008
@@ -1,20 +1,15 @@
/*
- * 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.
+ * 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.trinidadexhibition.webapp;
@@ -31,43 +26,49 @@
import org.apache.commons.lang.StringUtils;
-public class SourceCodeServlet extends HttpServlet
+public class SourceCodeServlet
+ extends HttpServlet
{
@Override
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
- {
- String webPage = req.getServletPath();
-
- // remove the '*.source' suffix that maps to this servlet
- int source = webPage.indexOf(".source");
- webPage = webPage.substring(0, source);
-
- //remove "/faces" mapping
- webPage = StringUtils.remove(webPage, "/faces");
-
- // get the actual file location of the requested resource
- String realPath = getServletConfig().getServletContext().getRealPath(webPage);
-
- // output an HTML page
- res.setContentType("text/plain");
-
- // print some html
- ServletOutputStream out = res.getOutputStream();
-
- // print the file
- InputStream in = null;
- try
+ public void doGet(HttpServletRequest req, HttpServletResponse res)
+ throws IOException, ServletException
{
+ String webPage = req.getServletPath();
+
+ // remove the '*.source' suffix that maps to this servlet
+ int source = webPage.indexOf(".source");
+ webPage = webPage.substring(0, source);
+
+ // remove "/faces" mapping if present
+ webPage = StringUtils.remove(webPage, "/faces");
+
+ // get the actual file location of the requested resource
+ String realPath =
+ getServletConfig().getServletContext().getRealPath(webPage);
+
+ // output an HTML page
+ res.setContentType("text/plain");
+
+ // print some html
+ ServletOutputStream out = res.getOutputStream();
+
+ // print the file
+ InputStream in = null;
+ try
+ {
+
in = new BufferedInputStream(new FileInputStream(realPath));
int ch;
- while ((ch = in.read()) !=-1)
+ while ((ch = in.read()) != -1)
{
- out.print((char)ch);
+ out.print((char)ch);
}
+ }
+ finally
+ {
+ if (in != null)
+ in.close(); // very important
+ }
}
- finally {
- if (in != null) in.close(); // very important
- }
-}
}
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/resources/org/apache/myfaces/trinidadexhibition/BundleMessages.properties
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/resources/org/apache/myfaces/trinidadexhibition/BundleMessages.properties?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/resources/org/apache/myfaces/trinidadexhibition/BundleMessages.properties (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/resources/org/apache/myfaces/trinidadexhibition/BundleMessages.properties Tue Jul 8 20:47:05 2008
@@ -15,6 +15,21 @@
# specific language governing permissions and limitations
# under the License.
+template_main_about_link=About
template_main_about_title=About - Trinidad Exhibition
template_main_about_version=Version:
-copyright=© 2008 The Apache Software Foundation
\ No newline at end of file
+template_main_main_menu_text=Jump To
+
+template_component_view_source=View Source
+
+copyright=© 2008 The Apache Software Foundation
+
+menus_component_demo=Component Demonstration
+menus_feature_demo=Feature Demonstration
+menus_example_apps=Example Applications
+menus_resources=External Resource Links
+
+# /components/index.xhtml
+component_index_tab_tr=Trinidad Core
+component_index_tab_trh=Trinidad HTML
+component_index_tab_trs=Trinidad Sandbox
\ No newline at end of file
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/component.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/component.xhtml?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/component.xhtml (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/component.xhtml Tue Jul 8 20:47:05 2008
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ 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.
+-->
+<html
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ xmlns:trh="http://myfaces.apache.org/trinidad/html"
+ xmlns:tre="http://myfaces.apache.org/trinidad/exhibition">
+ <body>
+ <ui:composition template="/WEB-INF/facelets/templates/main.xhtml">
+ <ui:define name="globalLinksStart">
+ <tre:viewSource text="#{msgs.template_component_view_source}" />
+ </ui:define>
+ </ui:composition>
+ </body>
+</html>
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/component.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/main.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/main.xhtml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/main.xhtml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/facelets/templates/main.xhtml Tue Jul 8 20:47:05 2008
@@ -38,6 +38,7 @@
width: 100%;
margin: 0px;
padding: 0px;
+ overflow: auto;
}
DIV.templateBody {
position: absolute;
@@ -72,61 +73,67 @@
innerBottomHeight="6px"
innerLeftWidth="6px">
<f:facet name="top">
- <tr:group>
- <trh:tableLayout
- inlineStyle="width: 100%; table-layout: fixed;">
- <trh:rowLayout>
- <trh:cellFormat
- styleClass="AFTitleBarLogo">
+ <tr:panelBorderLayout
+ layout="positioned"
+ inlineStyle="height: 100%; width: 100%; position: absolute; top: 0px; left: 0px;"
+ leftWidth="114px"
+ rightWidth="150px">
+ <f:facet
+ name="left">
+ <tr:group>
+ <div class="AFTitleBarLogo">
<h:outputText value=" " escape="false" />
- </trh:cellFormat>
- <trh:cellFormat
- inlineStyle="width: 100%;">
- <trh:tableLayout
- width="100%">
- <trh:rowLayout>
- <trh:cellFormat
- styleClass="AFTitleBarFade">
- <tr:icon name="AFTitleBarFadeIcon" />
- </trh:cellFormat>
- <trh:cellFormat
- inlineStyle="white-space: nowrap; width: 1px;"
- styleClass="AFTitleBar">
- <tr:panelGroupLayout
- layout="horizontal"
- inlineStyle="margin: 0px 6px; width: 100%;">
- <f:facet name="separator">
- <tr:outputText value=" | " escape="false" />
- </f:facet>
- <ui:insert name="globalLinksStart" />
- <tr:panelPopup
- id="aboutDialog"
- text="About"
- modal="true"
- width="450"
- position="centered"
- triggerType="click"
- title="#{msgs.template_main_about_title}">
- <h:panelGrid
- columns="2"
- columnClasses="aboutLabel, aboutValue"
- styleClass="AFLogoWatermark"
- style="height: 200px; width: 100%;">
- <tr:outputText
- value="#{msgs.template_main_about_version}" />
- <tr:outputText
- value="#{metaData.version}" />
- </h:panelGrid>
- </tr:panelPopup>
- <ui:insert name="globalLinksEnd" />
- </tr:panelGroupLayout>
- </trh:cellFormat>
- </trh:rowLayout>
- </trh:tableLayout>
- </trh:cellFormat>
- </trh:rowLayout>
- </trh:tableLayout>
- </tr:group>
+ </div>
+ </tr:group>
+ </f:facet>
+ <f:facet
+ name="right">
+ <tr:panelGroupLayout
+ inlineStyle="white-space: nowrap; display: block; overflow: hidden;
+ height: 100%; position: relative; padding-right: 6px;"
+ styleClass="AFTitleBar">
+ <f:facet name="separator">
+ <tr:outputText value=" | " escape="false" />
+ </f:facet>
+ <tr:panelPopup
+ triggerType="hover"
+ text="#{msgs.template_main_main_menu_text}">
+ <tr:iterator
+ var="_item"
+ value="#{menus.mainMenuItems}">
+ <tr:commandLink
+ partialSubmit="true"
+ immediate="true"
+ text="#{_item.label}"
+ action="#{_item.value}"
+ styleClass="popupMenuLink" />
+ </tr:iterator>
+ </tr:panelPopup>
+ <tr:panelPopup
+ id="aboutDialog"
+ text="#{msgs.template_main_about_link}"
+ modal="true"
+ width="450"
+ position="centered"
+ triggerType="click"
+ title="#{msgs.template_main_about_title}">
+ <h:panelGrid
+ columns="2"
+ columnClasses="aboutLabel, aboutValue"
+ styleClass="AFLogoWatermark"
+ style="height: 200px; width: 100%;">
+ <tr:outputText
+ value="#{msgs.template_main_about_version}" />
+ <tr:outputText
+ value="#{metaData.version}" />
+ </h:panelGrid>
+ </tr:panelPopup>
+ </tr:panelGroupLayout>
+ </f:facet>
+ <div class="AFTitleBarFade">
+ <tr:icon name="AFTitleBarFadeIcon" />
+ </div>
+ </tr:panelBorderLayout>
</f:facet>
<f:facet name="right">
<tr:group>
@@ -142,7 +149,7 @@
<f:facet name="bottom">
<tr:outputText
value="#{msgs.copyright}"
- inlineStyle="display: block;"
+ inlineStyle="display: block; padding-left: 8px;"
styleClass="AFPageFooter"/>
</f:facet>
<div
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/faces-config.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/faces-config.xml Tue Jul 8 20:47:05 2008
@@ -53,6 +53,16 @@
</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
+
+ <managed-bean>
+ <description>
+ Bean for managing the exhibition menus
+ </description>
+ <managed-bean-name>menus</managed-bean-name>
+ <managed-bean-class>
+ org.apache.myfaces.trinidadexhibition.webapp.MenusBean
+ </managed-bean-class>
+ </managed-bean>
<managed-bean>
<description>
@@ -65,4 +75,41 @@
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <description>
+ Bean for the component index page
+ </description>
+ <managed-bean-name>componentIndex</managed-bean-name>
+ <managed-bean-class>
+ org.apache.myfaces.trinidadexhibition.webapp.ComponentIndexBean
+ </managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
+ <navigation-rule>
+ <!-- Global rules -->
+
+ <!-- Main menu -->
+ <navigation-case>
+ <from-outcome>menus_component_demo</from-outcome>
+ <to-view-id>/components/index.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>menus_feature_demo</from-outcome>
+ <to-view-id>/features/index.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>menus_example_apps</from-outcome>
+ <to-view-id>/examples/index.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>menus_resources</from-outcome>
+ <to-view-id>resources.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
+
</faces-config>
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trfn.taglib.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trfn.taglib.xml?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trfn.taglib.xml (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trfn.taglib.xml Tue Jul 8 20:47:05 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE facelet-taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+ <namespace>http://myfaces.apache.org/trinidad/exhibition/functions</namespace>
+ <function>
+ <function-name>getActionURL</function-name>
+ <function-class>org.apache.myfaces.trinidadexhibition.util.Functions</function-class>
+ <function-signature>java.lang.String getActionURL(java.lang.String)</function-signature>
+ </function>
+</facelet-taglib>
\ No newline at end of file
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trfn.taglib.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-config.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-config.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-config.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-config.xml Tue Jul 8 20:47:05 2008
@@ -25,9 +25,6 @@
<client-validation>ALERT</client-validation>
-->
<accessibility-mode>#{prefs.accessibilityMode}</accessibility-mode>
- <!--
<skin-family>#{prefs.skinFamily}</skin-family>
- -->
- <skin-family>test-myfaces</skin-family>
</trinidad-config>
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-skins.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-skins.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-skins.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/trinidad-skins.xml Tue Jul 8 20:47:05 2008
@@ -21,8 +21,15 @@
<skin>
<id>test-myfaces.desktop</id>
<family>test-myfaces</family>
- <extends>myfaces.desktop</extends>
+ <extends>simple.desktop</extends>
<render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
<style-sheet-name>skins/test-myfaces/test-myfaces.css</style-sheet-name>
</skin>
+ <skin>
+ <id>demo-skin.desktop</id>
+ <family>demo-skin</family>
+ <extends>test-myfaces.desktop</extends>
+ <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
+ <style-sheet-name>skins/demo-skin/demo-skin.css</style-sheet-name>
+ </skin>
</skins>
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/web.xml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/WEB-INF/web.xml Tue Jul 8 20:47:05 2008
@@ -22,6 +22,12 @@
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-app_2_5.xsd"
version="2.5">
+
+ <context-param>
+ <param-name>facelets.LIBRARIES</param-name>
+ <param-value>/WEB-INF/trfn.taglib.xml</param-value>
+ </context-param>
+
<!-- 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. -->
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/index.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/index.xhtml?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/index.xhtml (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/index.xhtml Tue Jul 8 20:47:05 2008
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ 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.
+-->
+<html
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ xmlns:trh="http://myfaces.apache.org/trinidad/html"
+ xmlns:tre="http://myfaces.apache.org/trinidad/exhibition"
+ xmlns:trfn="http://myfaces.apache.org/trinidad/exhibition/functions">
+ <body>
+ <ui:composition template="/WEB-INF/facelets/templates/main.xhtml">
+ <ui:define name="body">
+ <tr:panelTabbed>
+ <tr:showDetailItem
+ text="#{msgs.component_index_tab_tr}">
+ <tr:panelList
+ rows="#{componentIndex.numRowsMap['tr']}">
+ <tr:goLink
+
+ </tr:panelList>
+ </tr:showDetailItem>
+ <tr:showDetailItem
+ text="#{msgs.component_index_tab_trh}">
+ </tr:showDetailItem>
+ <tr:showDetailItem
+ text="#{msgs.component_index_tab_trs}">
+ </tr:showDetailItem>
+ </tr:panelTabbed>
+ </ui:define>
+ </ui:composition>
+ </body>
+</html>
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/components/index.xhtml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/index.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/index.xhtml?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/index.xhtml (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/index.xhtml Tue Jul 8 20:47:05 2008
@@ -50,6 +50,7 @@
<tr:panelBox background="transparent">
Test4
</tr:panelBox>
+ #{prefs.skinFamily}
</ui:define>
</ui:composition>
</body>
Added: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/demo-skin.css
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/demo-skin.css?rev=675091&view=auto
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/demo-skin.css (added)
+++ myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/demo-skin.css Tue Jul 8 20:47:05 2008
@@ -0,0 +1,8 @@
+/* This file holds the extensions to the myfaces skin that are specific to the demo */
+
+.OraLink.popupMenuLink {
+ display: block;
+ white-space: nowrap;
+ padding: 0px 8px;
+ padding-top: 2px;
+}
\ No newline at end of file
Propchange: myfaces/trinidad/branches/exhibition/trinidad-examples/trinidad-exhibition/web/src/main/webapp/skins/demo-skin/demo-skin.css
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/exhibition/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java Tue Jul 8 20:47:05 2008
@@ -21,10 +21,9 @@
import java.util.Collections;
import java.util.Map;
-import org.apache.myfaces.trinidad.context.Agent;
-
import javax.faces.context.FacesContext;
+import org.apache.myfaces.trinidad.context.Agent;
import org.apache.myfaces.trinidad.logging.TrinidadLogger;
@@ -67,7 +66,7 @@
return agent;
}
- // The headerMap is the RequestHeaderMap from the externalContext. It is
+ // The headerMap is the RequestHeaderMap from the externalContext. It is
// consulted to correctly populate the agent
private void _populateAgentImpl(Map<String, String> headerMap, AgentImpl agent)
{
@@ -163,7 +162,7 @@
//userAgent = "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)";
if (userAgent.indexOf("Windows CE") != -1)
{
- // for PocketPC and Windows Mobile, try to grab the header UA-pixels to
+ // for PocketPC and Windows Mobile, try to grab the header UA-pixels to
// determine width/height
String uaPixels = headerMap.get("UA-pixels");
_populatePocketPCAgentImpl(userAgent,uaPixels,agent);
@@ -198,7 +197,7 @@
return;
}
- if (userAgent.startsWith("Opera"))
+ if (userAgent.startsWith("Opera"))
{
_populateOperaAgentImpl(userAgent,agent);
return;
@@ -432,7 +431,7 @@
agentObj.setAgentVersion(version);
agentObj.setPlatform(Agent.PLATFORM_BLACKBERRY);
agentObj.setMakeModel(makeModel);
- }
+ }
/**
* returns the data for the Palm NetFront browser request
@@ -614,17 +613,25 @@
// different platforms. (An alternate option is to return version number of Mozilla
// that would be equivalent to current browser for Gecko-based browsers)
// - But assumes PPR Support in all Gecko versions.
+
+ //Change 2008-05-13:
+ // We need the rv to support @agent versioning in CSS, so look for the rv:, not the Gecko build date
agentObj.setType(Agent.TYPE_DESKTOP);
agentObj.setAgent(Agent.AGENT_GECKO);
- int geckoIndex = agent.indexOf("Gecko/");
- agentObj.setAgentVersion(agent.substring(geckoIndex+6, // skip over 'Gecko/'
- geckoIndex+14)); // always 8 chars length
-
- //int start = agent.indexOf("rv:");
- //entry._agentVersion = _getVersion(agent, start + 2);
-
+ int start = agent.indexOf("rv:");
+ if (start >= 0)
+ {
+ agentObj.setAgentVersion(_getVersion(agent, start + 2));
+ }
+ else
+ {
+ int geckoIndex = agent.indexOf("Gecko/");
+ agentObj.setAgentVersion(agent.substring(geckoIndex+6, // skip over 'Gecko/'
+ geckoIndex+14)); // always 8 chars length
+ }
+
int paren = agent.indexOf('(');
if (paren >= 0)
Modified: myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/style/myfaces-desktop.css
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/style/myfaces-desktop.css?rev=675091&r1=675090&r2=675091&view=diff
==============================================================================
--- myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/style/myfaces-desktop.css (original)
+++ myfaces/trinidad/branches/exhibition/trinidad-skins/myfaces-skin/src/main/resources/META-INF/style/myfaces-desktop.css Tue Jul 8 20:47:05 2008
@@ -66,6 +66,7 @@
.p_OraTreeRow A:visited,
.OraNavBarActiveLink {
-tr-rule-ref:selector(".AFDefaultLink:alias");
+ -tr-rule-ref:selector(".AFDefaultFont:alias");
}
.OraLink:hover,
.p_OraTreeRow A:hover,
@@ -91,6 +92,8 @@
.AFRequiredIcon:alias {
content: '*';
}
+.AFTitleBar,
+.AFTitleBar .OraLink,
.AFTitleBar .OraLink:link,
.AFTitleBar .OraLink:visited {
color: white;