You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ck...@apache.org on 2010/01/27 21:37:48 UTC
svn commit: r903822 [2/17] - in /myfaces/trinidad/trunk/trinidad-examples:
./ trinidad-components-showcase/ trinidad-components-showcase/src/
trinidad-components-showcase/src/main/
trinidad-components-showcase/src/main/java/ trinidad-components-showcas...
Modified: myfaces/trinidad/trunk/trinidad-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/pom.xml?rev=903822&r1=903821&r2=903822&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/pom.xml Wed Jan 27 20:37:29 2010
@@ -93,6 +93,7 @@
<modules>
<module>trinidad-blank</module>
<module>trinidad-demo</module>
+ <module>trinidad-components-showcase</module>
</modules>
<profiles>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml Wed Jan 27 20:37:29 2010
@@ -0,0 +1,156 @@
+<?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.
+-->
+<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>
+
+ <name>Apache MyFaces Trinidad Components Showcase</name>
+ <description>Apache MyFaces Trinidad Components Showcase</description>
+
+ <parent>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-example</artifactId>
+ <version>1.2.14-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>trinidad-components-showcase</artifactId>
+ <packaging>war</packaging>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>${jsf-facelets.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.uwyn</groupId>
+ <artifactId>jhighlight</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>includeSources</id>
+ <activation>
+ <property>
+ <name>!excludeSources</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <!--
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generateSiteMap</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>java</executable>
+ <arguments>
+ <argument>-classpath</argument>
+ <classpath/>
+ <argument>org.apache.myfaces.trinidaddemo.support.util.SitemapGenerator</argument>
+ </arguments>
+ </configuration>
+ </plugin> -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>dependency-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-source</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-components-showcase</artifactId>
+ <version>1.2.14-SNAPSHOT</version>
+ <classifier>sources</classifier>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/src</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <repositories>
+ <repository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>http://download.java.net/maven/2/</url>
+ </repository>
+
+ <repository>
+ <id>java.net</id>
+ <url>http://download.java.net/maven/1</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+
+</project>
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,233 @@
+/*
+ * 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.trinidaddemo;
+
+import org.apache.myfaces.trinidaddemo.components.buttonsAndLinks.commandButton.CommandButtonDemo;
+import org.apache.myfaces.trinidaddemo.components.buttonsAndLinks.commandLink.CommandLinkDemo;
+import org.apache.myfaces.trinidaddemo.components.buttonsAndLinks.goButton.GoButtonDemo;
+import org.apache.myfaces.trinidaddemo.components.buttonsAndLinks.goLink.GoLinkDemo;
+import org.apache.myfaces.trinidaddemo.components.buttonsAndLinks.resetButton.ResetButtonDemo;
+import org.apache.myfaces.trinidaddemo.components.graphic.icon.IconDemo;
+import org.apache.myfaces.trinidaddemo.components.graphic.image.ImageDemo;
+import org.apache.myfaces.trinidaddemo.components.graphic.media.MediaDemo;
+import org.apache.myfaces.trinidaddemo.components.input.inputColor.InputColorDemo;
+import org.apache.myfaces.trinidaddemo.components.input.inputDate.InputDateDemo;
+import org.apache.myfaces.trinidaddemo.components.input.inputFile.InputFileDemo;
+import org.apache.myfaces.trinidaddemo.components.input.inputListOfValues.InputListOfValuesDemo;
+import org.apache.myfaces.trinidaddemo.components.input.inputNumberSpinbox.InputNumberSpinboxDemo;
+import org.apache.myfaces.trinidaddemo.components.input.inputText.InputTextDemo;
+import org.apache.myfaces.trinidaddemo.components.layout.panelBorderLayout.BorderLayoutDemo;
+import org.apache.myfaces.trinidaddemo.components.layout.panelFormLayout.FormLayoutDemo;
+import org.apache.myfaces.trinidaddemo.components.layout.panelGroupLayout.GroupLayoutDemo;
+import org.apache.myfaces.trinidaddemo.components.layout.panelHorizontalLayout.HorizontalLayoutDemo;
+import org.apache.myfaces.trinidaddemo.components.layout.separator.SeparatorDemo;
+import org.apache.myfaces.trinidaddemo.components.layout.spacer.SpacerDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.breadCrumbs.BreadCrumbsDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.commandNavigationItem.CommandNavigationItemDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.navigationPane.NavigationPaneDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.navigationTree.NavigationTreeDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.processChoiceBar.ProcessChoiceBarDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.singleStepButtonBar.SingleStepButtonBarDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.train.TrainDemo;
+import org.apache.myfaces.trinidaddemo.components.navigation.tree.TreeDemo;
+import org.apache.myfaces.trinidaddemo.components.output.chart.ChartDemo;
+import org.apache.myfaces.trinidaddemo.components.output.legend.LegendDemo;
+import org.apache.myfaces.trinidaddemo.components.output.message.MessageDemo;
+import org.apache.myfaces.trinidaddemo.components.output.messages.MessagesDemo;
+import org.apache.myfaces.trinidaddemo.components.output.outputDocument.OutputDocumentDemo;
+import org.apache.myfaces.trinidaddemo.components.output.outputFormated.OutputFormatedDemo;
+import org.apache.myfaces.trinidaddemo.components.output.outputLabel.OutputLabelDemo;
+import org.apache.myfaces.trinidaddemo.components.output.outputText.OutputTextDemo;
+import org.apache.myfaces.trinidaddemo.components.output.progessIndicator.ProgressIndicatorDemo;
+import org.apache.myfaces.trinidaddemo.components.output.statusIndicator.StatusIndicatorDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.group.GroupDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.page.PageDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelAccordion.AccordionPanelDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelBox.PanelBoxDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelButtonBar.PanelButtonBarDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelCaptionGroup.PanelCaptionGroupDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelChoice.PanelChoiceDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelHeader.PanelHeaderDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelLabelAndMessage.PanelLabelAndMessageDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelList.PanelListDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelPage.PanelPageDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelPageHeader.PanelPageHeaderDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelPopup.PanelPopupDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelRadio.PanelRadioDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelSideBar.PanelSideBarDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelTabbed.PanelTabbedDemo;
+import org.apache.myfaces.trinidaddemo.components.panel.panelTip.PanelTipDemo;
+import org.apache.myfaces.trinidaddemo.components.select.chooseColor.ChooseColorDemo;
+import org.apache.myfaces.trinidaddemo.components.select.chooseDate.ChooseDateDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectBooleanCheckbox.SelectBooleanCheckboxDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectBooleanRadio.SelectBooleanRadioDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectItem.SelectItemDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectManyCheckbox.SelectManyCheckboxDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectManyListbox.SelectManyListboxDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectManyShuttle.SelectManyShuttleDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectOneChoice.SelectOneChoiceDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectOneListbox.SelectOneListboxDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectOneRadio.SelectOneRadioDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectOrderShuttle.SelectOrderShuttleDemo;
+import org.apache.myfaces.trinidaddemo.components.select.selectRangeChoiceBar.SelectRangeChoiceBarDemo;
+import org.apache.myfaces.trinidaddemo.components.showDetail.showDetail.ShowDetailDemo;
+import org.apache.myfaces.trinidaddemo.components.showDetail.showDetailHeader.ShowDetailHeaderDemo;
+import org.apache.myfaces.trinidaddemo.components.showDetail.showDetailItem.ShowDetailItemDemo;
+import org.apache.myfaces.trinidaddemo.components.table.column.ColumnDemo;
+import org.apache.myfaces.trinidaddemo.components.table.table.TableDemo;
+import org.apache.myfaces.trinidaddemo.components.table.treeTable.TreeTableDemo;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoCategoryId;
+
+/**
+ *
+ */
+public class ComponentDemoInitializer {
+
+ private static ComponentDemoInitializer instance = new ComponentDemoInitializer();
+
+ private static final String CATEGORY_PANEL_TITLE = "Panel";
+ private static final String CATEGORY_LAYOUT_TITLE = "Layout";
+ private static final String CATEGORY_INPUT_TITLE = "Input";
+ private static final String CATEGORY_OUTPUT_TITLE = "Output";
+ private static final String CATEGORY_BUTTON_AND_LINKS_TITLE = "Buttons & Links";
+ private static final String CATEGORY_SELECT_TITLE = "Select";
+ private static final String CATEGORY_TABLE_TITLE = "Table";
+ private static final String CATEGORY_SHOW_DETAILS_TITLE = "Show detail";
+ private static final String CATEGORY_NAVIGATION_TITLE = "Navigation";
+ private static final String CATEGORY_GRAPHIC_TITLE = "Graphic";
+
+ /**
+ * Constructor.
+ */
+ private ComponentDemoInitializer(){}
+
+ /**
+ * Gets the singleton instance of the component demos initializer.
+ *
+ * @return a ComponentDemoInitializer.
+ */
+ public static ComponentDemoInitializer getInstance() {
+ return instance;
+ }
+
+ public void init() {
+ ComponentDemoRegistry registry = ComponentDemoRegistry.getInstance();
+ registerComponentDemos(registry);
+ }
+
+ /**
+ * @param registry
+ */
+ public void registerComponentDemos(ComponentDemoRegistry registry) {
+ //registering Panel category components
+ //registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new FormDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new GroupDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PageDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new AccordionPanelDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelBoxDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelButtonBarDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelCaptionGroupDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelChoiceDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelHeaderDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelLabelAndMessageDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelListDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelPageDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelPageHeaderDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelPopupDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelRadioDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelSideBarDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelTabbedDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.panel, CATEGORY_PANEL_TITLE, new PanelTipDemo());
+
+ // registering Layout category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.layout, CATEGORY_LAYOUT_TITLE, new BorderLayoutDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.layout, CATEGORY_LAYOUT_TITLE, new FormLayoutDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.layout, CATEGORY_LAYOUT_TITLE, new GroupLayoutDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.layout, CATEGORY_LAYOUT_TITLE, new HorizontalLayoutDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.layout, CATEGORY_LAYOUT_TITLE, new SeparatorDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.layout, CATEGORY_LAYOUT_TITLE, new SpacerDemo());
+
+ // registering Input category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.input, CATEGORY_INPUT_TITLE, new InputColorDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.input, CATEGORY_INPUT_TITLE, new InputDateDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.input, CATEGORY_INPUT_TITLE, new InputFileDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.input, CATEGORY_INPUT_TITLE, new InputListOfValuesDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.input, CATEGORY_INPUT_TITLE, new InputNumberSpinboxDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.input, CATEGORY_INPUT_TITLE, new InputTextDemo());
+
+ // registering Output category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new ChartDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new LegendDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new MessageDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new MessagesDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new OutputDocumentDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new OutputFormatedDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new OutputLabelDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new OutputTextDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new ProgressIndicatorDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.output, CATEGORY_OUTPUT_TITLE, new StatusIndicatorDemo());
+
+ // registering Buttons & Links category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.buttonsAndLinks, CATEGORY_BUTTON_AND_LINKS_TITLE, new CommandButtonDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.buttonsAndLinks, CATEGORY_BUTTON_AND_LINKS_TITLE, new CommandLinkDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.buttonsAndLinks, CATEGORY_BUTTON_AND_LINKS_TITLE, new GoButtonDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.buttonsAndLinks, CATEGORY_BUTTON_AND_LINKS_TITLE, new GoLinkDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.buttonsAndLinks, CATEGORY_BUTTON_AND_LINKS_TITLE, new ResetButtonDemo());
+
+ // registering Select category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new ChooseColorDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new ChooseDateDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectBooleanCheckboxDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectBooleanRadioDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectItemDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectManyCheckboxDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectManyListboxDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectManyShuttleDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectOneChoiceDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectOneListboxDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectOneRadioDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectOrderShuttleDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.select, CATEGORY_SELECT_TITLE, new SelectRangeChoiceBarDemo());
+
+ // registering Select category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.table, CATEGORY_TABLE_TITLE, new ColumnDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.table, CATEGORY_TABLE_TITLE, new TableDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.table, CATEGORY_TABLE_TITLE, new TreeTableDemo());
+
+ // registering Show Detail category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.showDetail, CATEGORY_SHOW_DETAILS_TITLE, new ShowDetailDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.showDetail, CATEGORY_SHOW_DETAILS_TITLE, new ShowDetailHeaderDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.showDetail, CATEGORY_SHOW_DETAILS_TITLE, new ShowDetailItemDemo());
+
+ //registering Show Detail category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new BreadCrumbsDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new CommandNavigationItemDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new NavigationPaneDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new NavigationTreeDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new ProcessChoiceBarDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new SingleStepButtonBarDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new TrainDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.navigation, CATEGORY_NAVIGATION_TITLE, new TreeDemo());
+
+ // registering Media category components
+ registry.registerComponentDemo(ComponentDemoCategoryId.graphic, CATEGORY_GRAPHIC_TITLE, new IconDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.graphic, CATEGORY_GRAPHIC_TITLE, new ImageDemo());
+ registry.registerComponentDemo(ComponentDemoCategoryId.graphic, CATEGORY_GRAPHIC_TITLE, new MediaDemo());
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoInitializer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,131 @@
+/*
+ * 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.trinidaddemo;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoCategoryId;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemoCategory;
+import org.apache.myfaces.trinidaddemo.support.impl.ComponentDemoCategoryImpl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Collection;
+
+/**
+ * This class represents the central point where component demos can be registered and obtained from.
+ */
+public class ComponentDemoRegistry {
+
+ private static final Log log = LogFactory.getLog(ComponentDemoRegistry.class);
+
+ private static ComponentDemoRegistry instance = new ComponentDemoRegistry();
+
+ private List<IComponentDemoCategory> categories;
+
+ private Map<ComponentDemoCategoryId, IComponentDemoCategory> categoriesRegistry;
+ private Map<ComponentDemoId, IComponentDemo> componentsDemoRegistry;
+
+ /**
+ * Constructor.
+ */
+ private ComponentDemoRegistry() {
+ categories = new ArrayList<IComponentDemoCategory>();
+
+ categoriesRegistry = new HashMap<ComponentDemoCategoryId, IComponentDemoCategory>();
+ componentsDemoRegistry = new HashMap<ComponentDemoId, IComponentDemo>();
+ }
+
+ /**
+ * Gets the singleton instance of the component demos registry.
+ *
+ * @return a ComponentDemoRegistry.
+ */
+ public static ComponentDemoRegistry getInstance() {
+ return instance;
+ }
+
+ /**
+ * Registers the given component demo into a specific category.
+ *
+ * @param categoryId the unique id of the category.
+ * @param categoryName the name of the category.
+ * @param componentDemo the component demo to be registered.
+ */
+ public void registerComponentDemo(ComponentDemoCategoryId categoryId, String categoryName, IComponentDemo componentDemo) {
+ if (componentDemo == null) {
+ throw new IllegalArgumentException("Trying to register a null component demo!");
+ }
+
+ log.info("Register component demo '" + componentDemo.getDisplayName() + "' in category '" + categoryName + "'");
+
+ IComponentDemoCategory category = categoriesRegistry.get(categoryId);
+ if (category == null) {
+ category = new ComponentDemoCategoryImpl(categoryId, categoryName);
+
+ categories.add(category);
+ categoriesRegistry.put(categoryId, category);
+ }
+
+ category.addComponentDemo(componentDemo);
+ componentsDemoRegistry.put(componentDemo.getId(), componentDemo);
+ }
+
+ /**
+ * Returns the component demo identified by the given id.
+ *
+ * @param id the unique id of the desired component demo.
+ * @return the component demo identified by the given id, or null if it's not available in this registry.
+ */
+ public IComponentDemo getComponentDemo(ComponentDemoId id) {
+ return componentsDemoRegistry.get(id);
+ }
+
+ /**
+ * Returns the category identified by the given id.
+ *
+ * @param id the unique id of the desired category.
+ * @return the category identified by the given id, or null if it's not available in this registry.
+ */
+ public IComponentDemoCategory getComponentDemoCategory(ComponentDemoCategoryId id) {
+ return categoriesRegistry.get(id);
+ }
+
+ /**
+ * Returns the collection containing all available categories.
+ *
+ * @return the collection containing all available categories.
+ */
+ public Collection<IComponentDemoCategory> getDemoCategories() {
+ return categories;
+ }
+
+ /**
+ * Returns the collection containing all available component demos.
+ *
+ * @return the collection containing all available component demos.
+ */
+ public Collection<IComponentDemo> getComponentDemos() {
+ return componentsDemoRegistry.values();
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentDemoRegistry.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,35 @@
+/*
+ * 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.trinidaddemo;
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+
+/**
+ * Custom {@link javax.servlet.ServletContextListener} implementation that registers all available component demos into the
+ * current {@link ComponentDemoRegistry} once the web application was successfully started.
+ */
+public class ComponentShowcaseContextListener implements ServletContextListener {
+
+ public void contextInitialized(ServletContextEvent sce) {
+ ComponentDemoInitializer.getInstance().init();
+ }
+
+ public void contextDestroyed(ServletContextEvent sce) {}
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/ComponentShowcaseContextListener.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,235 @@
+/*
+ * 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.trinidaddemo;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.myfaces.trinidaddemo.support.util.EvalMapAdapter;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoCategoryId;
+import org.apache.myfaces.trinidaddemo.support.IComponentVariantDemo;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemoCategory;
+
+import javax.faces.context.FacesContext;
+import javax.faces.application.FacesMessage;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Central navigation handler bean.
+ */
+public class NavigationHandlerBean {
+
+ private String searchText;
+
+ private ComponentDemoCategoryId defaultDisclosedCategoryId = ComponentDemoCategoryId.layout;
+
+ private IComponentVariantDemo currentComponentVariantDemo;
+
+ /**
+ * @return
+ */
+ public String validateSearch() {
+ FacesContext fc = FacesContext.getCurrentInstance();
+
+ if (((HttpServletRequest) fc.getExternalContext().getRequest()).getLocalName().equals("localhost")) {
+
+ FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Error Msg.", "Search doesn't work offline!");
+
+ fc.getViewRoot().setViewId("/pages/demoStart.xhtml");
+ fc.addMessage(null, msg);
+
+ return null;
+
+ }
+ else if ((searchText == null) || (searchText == "")) {
+
+ FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Error Msg.", "The input Search field is empty!");
+
+ fc.getViewRoot().setViewId("/pages/demoStart.xhtml");
+ fc.addMessage(null, msg);
+
+ return null;
+ }
+
+ return "searchForm";
+ }
+
+ /**
+ * @return
+ */
+ public String showComponentDemo() {
+ if (currentComponentVariantDemo != null) {
+ return currentComponentVariantDemo.getJsfResourcePath();
+ }
+
+ return null;
+ }
+
+ /**
+ * @return
+ */
+ public Map<String, Object> getCategoryDisclosed() {
+ return new CategoryDisclosedStateEvalMap();
+ }
+
+ /**
+ * @return
+ */
+ public Map<String, Object> getComponentDemoSelected() {
+ return new ComponentDemoSelectedEvalMap();
+ }
+
+ /**
+ * @return
+ */
+ public Map<String, Object> getComponentVariantDemoSelected() {
+ return new ComponentVariantDemoSelectedEvalMap();
+ }
+
+ /**
+ * @return
+ */
+ public IComponentDemo getCurrentComponentDemo() {
+ return getCurrentComponentVariantDemo() != null ?
+ ComponentDemoRegistry.getInstance().getComponentDemo(getCurrentComponentVariantDemo().getId()) :
+ null;
+ }
+
+ /**
+ * @return
+ */
+ public IComponentVariantDemo getCurrentComponentVariantDemo() {
+ return currentComponentVariantDemo;
+ }
+
+ /**
+ * @param componentVariantDemo
+ */
+ public void setCurrentComponentVariantDemo(IComponentVariantDemo componentVariantDemo) {
+ this.currentComponentVariantDemo = componentVariantDemo;
+ }
+
+ /**
+ * @return
+ */
+ public IComponentDemoCategory getCurrentCategory() {
+ return getCurrentComponentVariantDemo() != null ? getCurrentComponentVariantDemo().getCategory() : null;
+ }
+
+ /**
+ * @return
+ */
+ public Collection<IComponentDemoCategory> getDemoCategories() {
+ return ComponentDemoRegistry.getInstance().getDemoCategories();
+ }
+
+ /**
+ * @return the searchText
+ */
+ public String getSearchText() {
+ return searchText;
+ }
+
+ /**
+ * @param searchText the searchText to set
+ */
+ public void setSearchText(String searchText) {
+ this.searchText = searchText;
+ }
+
+ /**
+ * @return
+ */
+ public String getCurrentPageTitle() {
+ StringBuilder title = new StringBuilder();
+ title.append("Trinidad Components Showcase");
+ if (currentComponentVariantDemo != null) {
+ title.append(" - ");
+ title.append(currentComponentVariantDemo.getTitle());
+ title.append("");
+ }
+
+ return title.toString();
+ }
+
+ /**
+ * @return
+ */
+ public String getCurrentPageDescription() {
+ if (currentComponentVariantDemo != null && currentComponentVariantDemo.getDescription() != null) {
+ return currentComponentVariantDemo.getDescription();
+ }
+
+ return "";
+ }
+
+ /**
+ *
+ */
+ class CategoryDisclosedStateEvalMap extends EvalMapAdapter {
+
+ @Override
+ public Object get(Object key) {
+ IComponentDemoCategory category = (IComponentDemoCategory) key;
+
+ //if there is no concrete component demo selected yet, disclose the default category
+ if (currentComponentVariantDemo == null &&
+ defaultDisclosedCategoryId.equals(category.getId())) {
+ return true;
+ }
+
+ return category != null &&
+ currentComponentVariantDemo != null &&
+ category.equals(currentComponentVariantDemo.getCategory());
+ }
+ }
+
+ /**
+ *
+ */
+ class ComponentVariantDemoSelectedEvalMap extends EvalMapAdapter {
+
+ @Override
+ public Object get(Object key) {
+ IComponentVariantDemo variantDemo = (IComponentVariantDemo) key;
+
+ return variantDemo != null &&
+ getCurrentComponentVariantDemo() != null &&
+ variantDemo.equals(getCurrentComponentVariantDemo());
+ }
+ }
+
+ /**
+ *
+ */
+ class ComponentDemoSelectedEvalMap extends EvalMapAdapter {
+
+ @Override
+ public Object get(Object key) {
+ IComponentDemo componentDemo = (IComponentDemo) key;
+
+ return componentDemo != null &&
+ getCurrentComponentDemo() != null &&
+ componentDemo.equals(getCurrentComponentDemo());
+ }
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,115 @@
+ /*
+ * 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.trinidaddemo;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.IComponentVariantDemo;
+import org.apache.myfaces.trinidaddemo.support.jsf.JsfHelper;
+
+/**
+ * Phase listener that handles navigation based on URL parameters that identify a certain component demo and its variant.
+ */
+public class NavigationHandlerPhaseListener implements PhaseListener {
+
+ private static final long serialVersionUID = -6002602992566868748L;
+
+ private static final Log log = LogFactory.getLog(NavigationHandlerPhaseListener.class);
+
+ public static final String COMPONENT_DEMO_ID_PARAM_NAME = "id";
+ public static final String COMPONENT_DEMO_VARIANT_ID_PARAM_NAME = "variantId";
+
+ public void beforePhase(PhaseEvent event) {
+ FacesContext fc = event.getFacesContext();
+
+ //ignore request to pages that don't require URL parameters
+ if (fc.getViewRoot().getViewId().startsWith("/feature") ||
+ fc.getViewRoot().getViewId().equals("/pages/demoStart.xhtml") ||
+ fc.getViewRoot().getViewId().equals("/pages/demoSearch.xhtml")) {
+ log.info("Ignore request to demoStart or demoSearch pages.");
+ return;
+ }
+
+ NavigationHandlerBean navigationHandler = (NavigationHandlerBean) JsfHelper.getBean("navigationHandler");
+
+ String componentDemoId = fc.getExternalContext().getRequestParameterMap().get(COMPONENT_DEMO_ID_PARAM_NAME);
+ String variantId = fc.getExternalContext().getRequestParameterMap().get(COMPONENT_DEMO_VARIANT_ID_PARAM_NAME);
+
+ //if the current component demo wasn't selected already and one or both URL parameters are missing,
+ //add error message and redirect to demo start page
+ if (navigationHandler.getCurrentComponentDemo() == null && (componentDemoId == null || variantId == null)) {
+ FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Error Msg.", "Either component demo id or variant name is missing!");
+
+ fc.addMessage(null, msg);
+ fc.getViewRoot().setViewId("/pages/demoStart.xhtml");
+
+ log.error("Either component demo id or variant name is missing.");
+ return;
+ }
+
+ if (componentDemoId == null || variantId == null) {
+ return;
+ }
+
+ try {
+ ComponentDemoId temp = ComponentDemoId.valueOf(componentDemoId);
+ IComponentDemo componentDemo = ComponentDemoRegistry.getInstance().getComponentDemo(temp);
+
+ IComponentVariantDemo resultingDemo = componentDemo.getVariant(variantId);
+ if (resultingDemo == null) {
+ FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Error Msg.", "Component with id: '" + componentDemoId + "' doesn't have a variant with name: '"+variantId+"'!");
+
+ fc.addMessage(null, msg);
+ fc.getViewRoot().setViewId("/pages/demoStart.xhtml");
+
+ log.error("Component with id: '" + componentDemoId + "' doesn't have a variant with name: '"+variantId+"'!");
+ return;
+ }
+
+ log.info("Navigation successfull to component demo id: '"+componentDemoId+"', variant name: '"+variantId+"'");
+ navigationHandler.setCurrentComponentVariantDemo(resultingDemo);
+ }
+ catch (IllegalArgumentException e) {
+ FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Error Msg.", "Component id: '" + componentDemoId + "' not found!");
+
+ fc.addMessage(null, msg);
+ fc.getViewRoot().setViewId("/pages/demoStart.xhtml");
+
+ log.error("Component id: '" + componentDemoId + "' not found!");
+ }
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.RENDER_RESPONSE;
+ }
+
+ public void afterPhase(PhaseEvent event) {
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/NavigationHandlerPhaseListener.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,54 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.commandButton;
+
+/**
+ *
+ */
+public class CommandButtonBean {
+
+ private String name;
+ private String message;
+
+ public String sayHello() {
+ message="Hello "+name+"!";
+ return null;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the message
+ */
+ public String getMessage() {
+ return message;
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,61 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.commandButton;
+
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.impl.ComponentVariantDemoImpl;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemoVariantId;
+
+/**
+ *
+ */
+public class CommandButtonDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982061956883408710L;
+
+ private enum VARIANTS implements IComponentDemoVariantId {
+ fullSubmit,
+ ajaxSubmit
+ }
+
+ /**
+ * Constructor.
+ */
+ public CommandButtonDemo() {
+ super(ComponentDemoId.commnandButton , "Command Button", VARIANTS.fullSubmit, "Full submit");
+
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.ajaxSubmit, "Ajax Submit", this,
+ "/components/buttonsAndLinks/commandButton/commandButtonAjax.xhtml",
+ getSummaryResourcePath(),
+ getBackingBeanResourcePath()));
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/buttonsAndLinks/commandButton/commandButton.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/buttonsAndLinks/commandButton/summary.xhtml";
+ }
+
+ public String getBackingBeanResourcePath() {
+ return "/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonBean.java";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandButton/CommandButtonDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.commandLink;
+
+/**
+ *
+ */
+public class CommandLinkBean {
+ private String text;
+ private String message;
+
+ public CommandLinkBean() {
+ this.text = "Input text";
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void showMessage() {
+ this.message="Input text: "+text;
+ }
+
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,49 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.commandLink;
+
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+
+/**
+ *
+ */
+public class CommandLinkDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982061956883408710L;
+
+ /**
+ * Constructor.
+ */
+ public CommandLinkDemo() {
+ super(ComponentDemoId.commandLink , "Command Link");
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/buttonsAndLinks/commandLink/commandLink.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/buttonsAndLinks/commandLink/summary.xhtml";
+ }
+
+ public String getBackingBeanResourcePath() {
+ return "/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkBean.java";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/commandLink/CommandLinkDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,45 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.goButton;
+
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+
+/**
+ *
+ */
+public class GoButtonDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982061456883408710L;
+
+ /**
+ * Constructor.
+ */
+ public GoButtonDemo() {
+ super(ComponentDemoId.goButton, "Go Button");
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/buttonsAndLinks/goButton/goButton.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/buttonsAndLinks/goButton/summary.xhtml";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goButton/GoButtonDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,44 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.goLink;
+
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+
+/**
+ *
+ */
+public class GoLinkDemo extends AbstractComponentDemo{
+ private static final long serialVersionUID = -1982061956883108710L;
+
+ /**
+ * Constructor.
+ */
+ public GoLinkDemo() {
+ super(ComponentDemoId.goLink , "Go Link");
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/buttonsAndLinks/goLink/goLink.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/buttonsAndLinks/goLink/summary.xhtml";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/goLink/GoLinkDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,45 @@
+/*
+ * 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.trinidaddemo.components.buttonsAndLinks.resetButton;
+
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+
+/**
+ *
+ */
+public class ResetButtonDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982361956883408710L;
+
+ /**
+ * Constructor.
+ */
+ public ResetButtonDemo() {
+ super(ComponentDemoId.resetButton, "Reset Button");
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/buttonsAndLinks/resetButton/resetButton.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/buttonsAndLinks/resetButton/summary.xhtml";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/buttonsAndLinks/resetButton/ResetButtonDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,45 @@
+/*
+ * 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.trinidaddemo.components.graphic.icon;
+
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+
+/**
+ *
+ */
+public class IconDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982061956893498710L;
+
+ /**
+ * Constructor.
+ */
+ public IconDemo() {
+ super(ComponentDemoId.icon, "Icon");
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/graphic/icon/icon.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/graphic/icon/summary.xhtml";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/icon/IconDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,45 @@
+/*
+ * 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.trinidaddemo.components.graphic.image;
+
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+
+/**
+ *
+ */
+public class ImageDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982061956893494710L;
+
+ /**
+ * Constructor.
+ */
+ public ImageDemo() {
+ super(ComponentDemoId.image, "Image");
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/graphic/image/image.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/graphic/image/summary.xhtml";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/image/ImageDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java?rev=903822&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java Wed Jan 27 20:37:29 2010
@@ -0,0 +1,68 @@
+/*
+ * 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.trinidaddemo.components.graphic.media;
+
+import org.apache.myfaces.trinidaddemo.support.impl.AbstractComponentDemo;
+import org.apache.myfaces.trinidaddemo.support.impl.ComponentVariantDemoImpl;
+import org.apache.myfaces.trinidaddemo.support.ComponentDemoId;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemoVariantId;
+
+/**
+ *
+ */
+public class MediaDemo extends AbstractComponentDemo {
+
+ private static final long serialVersionUID = -1982063956893498710L;
+
+ private enum VARIANTS implements IComponentDemoVariantId {
+ AllControls,
+ Link,
+ NoControls,
+ Quicktime,
+ Real,
+ Windows
+ }
+
+ /**
+ * Constructor.
+ */
+ public MediaDemo() {
+ super(ComponentDemoId.media, "Media");
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.AllControls, "All controls", this,
+ "/components/graphic/media/mediaAllControls.xhtml", getSummaryResourcePath()));
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.Link, this,
+ "/components/graphic/media/mediaLink.xhtml", getSummaryResourcePath()));
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.NoControls, "No controls", this,
+ "/components/graphic/media/mediaNoControls.xhtml", getSummaryResourcePath()));
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.Quicktime, this,
+ "/components/graphic/media/mediaQuicktime.xhtml", getSummaryResourcePath()));
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.Real, this,
+ "/components/graphic/media/mediaReal.xhtml", getSummaryResourcePath()));
+ addComponentDemoVariant(new ComponentVariantDemoImpl(VARIANTS.Windows, this,
+ "/components/graphic/media/mediaWindows.xhtml", getSummaryResourcePath()));
+ }
+
+ public String getJsfResourcePath() {
+ return "/components/graphic/media/media.xhtml";
+ }
+
+ public String getSummaryResourcePath() {
+ return "/components/graphic/media/summary.xhtml";
+ }
+}
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/components/graphic/media/MediaDemo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain