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/05/03 15:12:13 UTC
svn commit: r940443 [2/2] - in
/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main:
java/org/apache/myfaces/trinidaddemo/
java/org/apache/myfaces/trinidaddemo/feature/
java/org/apache/myfaces/trinidaddemo/feature/changePersi...
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/ReceivedEmailListBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/ReceivedEmailListBean.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/ReceivedEmailListBean.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/ReceivedEmailListBean.java Mon May 3 13:12:11 2010
@@ -0,0 +1,96 @@
+/*
+ * 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.samples.email;
+
+import org.apache.myfaces.trinidaddemo.samples.email.Email;
+import org.apache.myfaces.trinidaddemo.samples.email.TableBean;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ *
+ */
+public class ReceivedEmailListBean {
+ private List<ReceivedEmail> list = new ArrayList<ReceivedEmail>();
+ private ReceivedEmail receivedEmail;
+ private TableBean tableBean = new TableBean();
+
+
+ public ReceivedEmailListBean(List<ReceivedEmail> list) {
+ this.list = list;
+ }
+
+ public ReceivedEmailListBean() {
+ list.add(new ReceivedEmail("jack@yahoo.com","subject1","2009.09.25 at 04:34:32","This is the content of the mail (Inbox) whitch you selected"));
+ list.add(new ReceivedEmail("john@yahoo.com","subject2","2009.09.25 at 04:34:32","content2"));
+ list.add(new ReceivedEmail("john@yahoo.com","subject2","2009.09.25 at 04:34:32","content3"));
+ }
+
+ public ReceivedEmail getReceivedEmail() {
+ return receivedEmail;
+ }
+
+ public void setReceivedEmail(ReceivedEmail receivedEmail) {
+ this.receivedEmail = receivedEmail;
+ }
+
+ public TableBean getTableBean() {
+ return tableBean;
+ }
+
+ public void setTableBean(TableBean tableBean) {
+ this.tableBean = tableBean;
+ }
+
+ public List<ReceivedEmail> getList() {
+ return list;
+ }
+
+ public void setList(List<ReceivedEmail> list) {
+ this.list = list;
+ }
+
+ public void openMail() {
+ tableBean.performReport();
+ List<Object> reportItems = tableBean.getReportItems();
+ if (reportItems.size() > 0) {
+ receivedEmail = (ReceivedEmail) reportItems.get(0);
+ } else {
+ receivedEmail = null;
+ }
+ }
+
+ public void deleteInboxEmail() {
+ tableBean.performReport();
+ List<Object> reportItems = tableBean.getReportItems();
+ for (Object reportItem : reportItems) {
+ if (list.contains((ReceivedEmail)reportItem)) {
+ list.remove(reportItem);
+ }
+ }
+ tableBean = new TableBean();
+ }
+
+ public static class ReceivedEmail extends Email {
+ public ReceivedEmail(String from, String subject, String date, String content) {
+ super(from, "Yourself", subject, date, content);
+ }
+ }
+}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/SentEmailListBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/SentEmailListBean.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/SentEmailListBean.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/SentEmailListBean.java Mon May 3 13:12:11 2010
@@ -0,0 +1,126 @@
+/*
+ * 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.samples.email;
+
+import org.apache.myfaces.trinidaddemo.samples.email.Email;
+import org.apache.myfaces.trinidaddemo.samples.email.TableBean;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Calendar;
+import java.util.Locale;
+import java.text.SimpleDateFormat;
+
+/**
+ *
+ */
+public class SentEmailListBean {
+ private List<SentEmail> list = new ArrayList<SentEmail>();
+ private TableBean tableBean = new TableBean();
+ private SentEmail sentEmail;
+
+
+ public SentEmailListBean(List list) {
+ this.list = list;
+ }
+
+ public SentEmailListBean() {
+ list.add(new SentEmail("jack@yahoo.com", "subject1", "2009.09.25 at 04:34:32", "This is the content of the mail (Sent) whitch you selected"));
+ list.add(new SentEmail("john@yahoo.com", "subject2", "2009.09.25 at 04:55:32", "content2"));
+ list.add(new SentEmail("john@yahoo.com", "subject2", "2009.09.25 at 04:10:32", "content3"));
+ }
+
+ public TableBean getTableBean() {
+ return tableBean;
+ }
+
+ public void setTableBean(TableBean tableBean) {
+ this.tableBean = tableBean;
+ }
+
+ public SentEmail getSentEmail() {
+ return sentEmail;
+ }
+
+ public void setSentEmail(SentEmail sentEmail) {
+ this.sentEmail = sentEmail;
+ }
+
+ public List<SentEmail> getList() {
+ return list;
+ }
+
+ public void setList(List<SentEmail> list) {
+ this.list = list;
+ }
+
+ public void openMail() {
+ tableBean.performReport();
+ List<Object> reportItems = tableBean.getReportItems();
+ if (reportItems.size() > 0) {
+ sentEmail = (SentEmail) reportItems.get(0);
+ } else {
+ sentEmail = null;
+ }
+ }
+
+ public void deleteSentEmail() {
+ tableBean.performReport();
+ List<Object> reportItems = tableBean.getReportItems();
+ for (Object reportItem : reportItems) {
+ if (list.contains((SentEmail) reportItem)) {
+ list.remove(reportItem);
+ }
+ }
+ tableBean = new TableBean();
+ }
+
+ public String newEmail() {
+ sentEmail = new SentEmail();
+ sentEmail.setFrom("Yourself");
+ Calendar now = Calendar.getInstance();
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd 'at' hh:mm:ss", new Locale("de", "CH"));
+ sentEmail.setDate(formatter.format(now.getTime()));
+ return "goToNewMail";
+ }
+
+ public String save() {
+ if (!list.contains(sentEmail)) {
+ list.add(sentEmail);
+ }
+ sentEmail = null;
+ return "goToSent";
+ }
+
+ public String cancel() {
+ sentEmail = null;
+ return "goToSent";
+ }
+
+
+ public static class SentEmail extends Email {
+ public SentEmail(String to, String subject, String date, String content) {
+ super("Yourself", to, subject, date, content);
+ }
+
+ public SentEmail() {
+ super();
+ }
+ }
+}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/TableBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/TableBean.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/TableBean.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/samples/email/TableBean.java Mon May 3 13:12:11 2010
@@ -0,0 +1,74 @@
+/*
+ * 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.samples.email;
+
+import org.apache.myfaces.trinidad.component.UIXCollection;
+import org.apache.myfaces.trinidad.component.UIXTable;
+import org.apache.myfaces.trinidad.component.UIXTree;
+import org.apache.myfaces.trinidad.model.RowKeySet;
+
+import javax.faces.component.UIComponent;
+import java.util.List;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+/**
+ *
+ */
+public class TableBean {
+ private UIComponent _table = null;
+ private List<Object> _selection;
+
+ @SuppressWarnings("unchecked")
+ public TableBean() {
+ _selection = Collections.EMPTY_LIST;
+ }
+
+ public UIComponent getTable() {
+ return _table;
+ }
+
+ public void setTable(UIComponent hgrid) {
+ _table = hgrid;
+ }
+
+ @SuppressWarnings("unchecked")
+ public void performReport() {
+ UIXCollection table = (UIXCollection) _table;
+ final RowKeySet state;
+ if (table instanceof UIXTable)
+ state = ((UIXTable) table).getSelectedRowKeys();
+ else
+ state = ((UIXTree) table).getSelectedRowKeys();
+ Iterator<Object> selection = state.iterator();
+ Object oldKey = table.getRowKey();
+ _selection = new ArrayList<Object>();
+ while (selection.hasNext()) {
+ table.setRowKey(selection.next());
+ _selection.add(table.getRowData());
+ }
+ table.setRowKey(oldKey);
+ }
+
+ public List<Object> getReportItems() {
+ return _selection;
+ }
+
+}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoCategoryId.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoCategoryId.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoCategoryId.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoCategoryId.java Mon May 3 13:12:11 2010
@@ -0,0 +1,29 @@
+/*
+ * 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.support;
+
+/**
+ * Defines the unique identifiers of each feature demo category.
+ */
+public enum FeatureDemoCategoryId {
+ convertersAndValidators,
+ changePersistence,
+ table,
+ others;
+}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoId.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoId.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoId.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/FeatureDemoId.java Mon May 3 13:12:11 2010
@@ -0,0 +1,53 @@
+/*
+ * 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.support;
+
+/**
+ *
+ */
+public enum FeatureDemoId {
+
+ //Converters and Validators category demos
+ clientSideConverters,
+ clientSideValidators,
+ clientSideDateRestriction,
+ serverSideConverters,
+ serverSideValidators,
+ serverSideDateRestrictions,
+ messageCustomization,
+
+ //Change Persistence category demos
+ implicitAttributeChange,
+ explicitAttributeChange,
+ addRemoveReorderChildren,
+ addRemoveFacets,
+
+ //Table category demos
+ addRow,
+ totalRow,
+ exportToCSV,
+
+ //Others category demos
+ partialPageRendering,
+ dialogFramework,
+ progressSteps,
+ accessibilityProfile,
+ showDetailDisclosure,
+ fileDownload;
+}
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IComponentDemoVariantId.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IComponentDemoVariantId.java?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IComponentDemoVariantId.java (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IComponentDemoVariantId.java Mon May 3 13:12:11 2010
@@ -22,4 +22,5 @@ package org.apache.myfaces.trinidaddemo.
*
*/
public interface IComponentDemoVariantId {
+ //marker interface
}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemo.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemo.java Mon May 3 13:12:11 2010
@@ -0,0 +1,77 @@
+/*
+ * 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.support;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public interface IFeatureDemo extends Serializable {
+
+ /**
+ * Returns the unique identifier of this component demo, unique across the whole application.
+ *
+ * @return the unique identifier of this component demo.
+ */
+ FeatureDemoId getId();
+
+ /**
+ * Returns the title to be shown at the top in the corresponding JSF page.
+ *
+ * @return the title or null if none is available.
+ */
+ String getTitle();
+
+ /**
+ * Returns the display name of this feature demo.
+ *
+ * @return the display name.
+ */
+ String getDisplayName();
+
+ /**
+ * Returns the path which can be used to navigate to this feature variant demo.
+ *
+ * @return the path.
+ */
+ String getDestination();
+
+ /**
+ * Returns the category this feature demo belongs to.
+ *
+ * @return the category or null if none is available.
+ */
+ IFeatureDemoCategory getCategory();
+
+ /**
+ * Returns the entry page path to the corresponding JSF page.
+ *
+ * @return the path or null if none is available.
+ */
+ String getPagePath();
+
+ /**
+ * Sets this feature demo's category to be the specified one.
+ *
+ * @param category the new category of this feature demo.
+ */
+ void setCategory(IFeatureDemoCategory category);
+
+}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemoCategory.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemoCategory.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemoCategory.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/IFeatureDemoCategory.java Mon May 3 13:12:11 2010
@@ -0,0 +1,50 @@
+/*
+ * 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.support;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ *
+ */
+public interface IFeatureDemoCategory extends Serializable {
+
+ /**
+ * @return the name of this category.
+ */
+ String getName();
+
+ /**
+ * @return the unique identifier of this category, unique across the whole application.
+ */
+ FeatureDemoCategoryId getId();
+
+ /**
+ * Adds the specified feature demo to this category.
+ */
+ void addFeatureDemo(IFeatureDemo featureDemo);
+
+ /**
+ * Returns a list containing the feature demos part of this category.
+ *
+ * @return a list containing the feature demos part of this category.
+ */
+ List<IFeatureDemo> getFeatureDemos();
+}
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/PrettyUrlFilter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/PrettyUrlFilter.java?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/PrettyUrlFilter.java (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/PrettyUrlFilter.java Mon May 3 13:12:11 2010
@@ -20,6 +20,7 @@ package org.apache.myfaces.trinidaddemo.
import org.apache.myfaces.trinidaddemo.NavigationHandlerBean;
import org.apache.myfaces.trinidaddemo.ComponentDemoRegistry;
+import org.apache.myfaces.trinidaddemo.FeatureDemoRegistry;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.Filter;
@@ -43,21 +44,38 @@ import java.util.logging.Level;
*/
public class PrettyUrlFilter implements Filter {
+ private enum TYPES{
+ component,
+ feature
+ }
+
private static final Logger _LOG = Logger.getLogger(PrettyUrlFilter.class.getName());
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
String requestURI = getRequestURI(request);
- IComponentVariantDemo resultingDemo = getComponentVariantDemo(requestURI);
FacesContext fc = getFacesContext(request, response);
NavigationHandlerBean navigationHandler = (NavigationHandlerBean) fc.getApplication().getELResolver().getValue(fc.getELContext(), null, "navigationHandler");
- navigationHandler.setCurrentComponentVariantDemo(resultingDemo);
+ if (getDemoType(requestURI).equals(TYPES.component)){
+ IComponentVariantDemo componentDemo = getComponentVariantDemo(requestURI);
+ navigationHandler.setCurrentComponentVariantDemo(componentDemo);
+
+ _LOG.log(Level.INFO,"Forwarding request [" + requestURI + "] to view [" + componentDemo.getEntryPagePath()+"]");
+ if (!response.isCommitted()) {
+ request.getRequestDispatcher("/faces"+componentDemo.getEntryPagePath()).forward(request, response);
+ }
+ }
- _LOG.log(Level.INFO,"Forwarding request [" + requestURI + "] to view [" + resultingDemo.getEntryPagePath()+"]");
- if (!response.isCommitted()) {
- request.getRequestDispatcher("/faces"+resultingDemo.getEntryPagePath()).forward(request, response);
- }
+ if (getDemoType(requestURI).equals(TYPES.feature)){
+ IFeatureDemo featureDemo = getFeatureDemo(requestURI);
+ navigationHandler.setCurrentFeatureDemo(featureDemo);
+
+ _LOG.log(Level.INFO,"Forwarding request [" + requestURI + "] to view [" + featureDemo.getPagePath()+"]");
+ if (!response.isCommitted()) {
+ request.getRequestDispatcher("/faces"+featureDemo.getPagePath()).forward(request, response);
+ }
+ }
}
/**
@@ -74,6 +92,11 @@ public class PrettyUrlFilter implements
return requestURI;
}
+ private TYPES getDemoType(String requestURI) {
+ String demoType = requestURI.substring(1,requestURI.indexOf("-"));
+
+ return TYPES.valueOf(demoType);
+ }
/**
* @param requestURI
* @return
@@ -96,6 +119,19 @@ public class PrettyUrlFilter implements
return resultingDemo;
}
+ private IFeatureDemo getFeatureDemo(String requestURI) {
+ int idPathIndex = requestURI.lastIndexOf("/");
+ if (idPathIndex == -1) {
+ return null;
+ }
+
+ String idPath = requestURI.substring(idPathIndex+1);
+ FeatureDemoId featureDemoId = FeatureDemoId.valueOf(idPath);
+
+ return FeatureDemoRegistry.getInstance().getFeatureDemo(featureDemoId);
+
+ }
+
/**
* @param request
* @param response
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/AbstractFeatureDemo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/AbstractFeatureDemo.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/AbstractFeatureDemo.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/AbstractFeatureDemo.java Mon May 3 13:12:11 2010
@@ -0,0 +1,103 @@
+/*
+ * 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.support.impl;
+
+import org.apache.myfaces.trinidaddemo.support.IFeatureDemo;
+import org.apache.myfaces.trinidaddemo.support.FeatureDemoId;
+import org.apache.myfaces.trinidaddemo.support.IComponentDemoVariantId;
+import org.apache.myfaces.trinidaddemo.support.IFeatureDemoCategory;
+
+/**
+ *
+ */
+public abstract class AbstractFeatureDemo implements IFeatureDemo {
+
+ private static final String DEFAULT_VARIANT_NAME = "Default";
+
+ private FeatureDemoId id;
+ private String displayName;
+ private String title;
+ private String pagePath;
+ private IFeatureDemoCategory category;
+
+ /**
+ * Constructor.
+ *
+ * @param id the unique id of this feature demo.
+ * @param displayName the display name of this feature demo.
+ * @param pagePath th entry page path to the corresponding JSF page.
+ */
+ public AbstractFeatureDemo(FeatureDemoId id, String displayName, String pagePath) {
+ this.id = id;
+ this.displayName = displayName;
+ this.pagePath = pagePath;
+ title = getDisplayName();
+ }
+
+ public FeatureDemoId getId() {
+ return id;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public String getDestination() {
+ StringBuilder url = new StringBuilder();
+ url.append("/feature-demo/");
+ url.append(getId().toString());
+
+ return url.toString();
+ }
+
+ public IFeatureDemoCategory getCategory() {
+ return category;
+ }
+
+ public void setCategory(IFeatureDemoCategory category) {
+ this.category = category;
+ }
+
+ public String getPagePath(){
+ return pagePath;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof AbstractFeatureDemo) {
+ return getId() == ((AbstractFeatureDemo)obj).getId();
+ }
+
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return getId() != null ? getId().hashCode() : super.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return getDisplayName();
+ }
+}
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/FeatureDemoCategoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/FeatureDemoCategoryImpl.java?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/FeatureDemoCategoryImpl.java (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/java/org/apache/myfaces/trinidaddemo/support/impl/FeatureDemoCategoryImpl.java Mon May 3 13:12:11 2010
@@ -0,0 +1,70 @@
+package org.apache.myfaces.trinidaddemo.support.impl;
+
+import org.apache.myfaces.trinidaddemo.support.IFeatureDemoCategory;
+import org.apache.myfaces.trinidaddemo.support.FeatureDemoCategoryId;
+import org.apache.myfaces.trinidaddemo.support.IFeatureDemo;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Default implementation of the {@link IFeatureDemoCategory} interface.
+ */
+public class FeatureDemoCategoryImpl implements IFeatureDemoCategory {
+
+ private static final long serialVersionUID = -7078447662522060454L;
+
+ private FeatureDemoCategoryId id;
+ private String name;
+
+ private List<IFeatureDemo> featureDemos;
+
+ /**
+ * Constructor.
+ *
+ * @param id the unique id of this category.
+ * @param name the name of this category.
+ */
+ public FeatureDemoCategoryImpl(FeatureDemoCategoryId id, String name) {
+ this.id = id;
+ this.name = name;
+
+ featureDemos = new ArrayList<IFeatureDemo>();
+ }
+
+ public void addFeatureDemo(IFeatureDemo featureDemo) {
+ featureDemo.setCategory(this);
+ featureDemos.add(featureDemo);
+ }
+
+ public List<IFeatureDemo> getFeatureDemos() {
+ return featureDemos;
+ }
+
+ public FeatureDemoCategoryId getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof FeatureDemoCategoryImpl) {
+ return getId() == ((FeatureDemoCategoryImpl)obj).getId();
+ }
+
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return getId() != null ? getId().hashCode() : super.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return getName();
+ }
+}
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/faces-config.xml?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/faces-config.xml Mon May 3 13:12:11 2010
@@ -30,11 +30,6 @@
</default-render-kit-id>
</application>
-
- <lifecycle>
- <phase-listener>org.apache.myfaces.trinidaddemo.NavigationHandlerPhaseListener</phase-listener>
- </lifecycle>
-
<managed-bean>
<managed-bean-name>navigationHandler</managed-bean-name>
<managed-bean-class>org.apache.myfaces.trinidaddemo.NavigationHandlerBean</managed-bean-class>
@@ -172,7 +167,7 @@
<managed-bean>
<managed-bean-name>contactListBean</managed-bean-name>
<managed-bean-class>
- org.apache.myfaces.trinidaddemo.feature.ContactListBean
+ org.apache.myfaces.trinidaddemo.samples.email.ContactListBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
@@ -180,7 +175,7 @@
<managed-bean>
<managed-bean-name>receivedEmailListBean</managed-bean-name>
<managed-bean-class>
- org.apache.myfaces.trinidaddemo.feature.ReceivedEmailListBean
+ org.apache.myfaces.trinidaddemo.samples.email.ReceivedEmailListBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
@@ -188,7 +183,7 @@
<managed-bean>
<managed-bean-name>sentEmailListBean</managed-bean-name>
<managed-bean-class>
- org.apache.myfaces.trinidaddemo.feature.SentEmailListBean
+ org.apache.myfaces.trinidaddemo.samples.email.SentEmailListBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
@@ -216,7 +211,7 @@
</navigation-case>
<navigation-case>
<from-outcome>demoAppForm</from-outcome>
- <to-view-id>/feature/e-mailTemplate.xhtml</to-view-id>
+ <to-view-id>/samples/email/e-mailTemplate.xhtml</to-view-id>
<redirect/>
</navigation-case>
@@ -272,22 +267,22 @@
<navigation-case>
<from-outcome>goToEMailContacts</from-outcome>
- <to-view-id>/feature/e-mailContacts.xhtml</to-view-id>
+ <to-view-id>/samples/email/e-mailContacts.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>goToInbox</from-outcome>
- <to-view-id>/feature/e-mailListReceived.xhtml</to-view-id>
+ <to-view-id>/samples/email/e-mailListReceived.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>goToSent</from-outcome>
- <to-view-id>/feature/e-mailListSent.xhtml</to-view-id>
+ <to-view-id>/samples/email/e-mailListSent.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>goToNewMail</from-outcome>
- <to-view-id>/feature/newEmail.xhtml</to-view-id>
+ <to-view-id>/samples/email/newEmail.xhtml</to-view-id>
</navigation-case>
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/trinidad-skins.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/trinidad-skins.xml?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/trinidad-skins.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/trinidad-skins.xml Mon May 3 13:12:11 2010
@@ -38,5 +38,5 @@
skins/layout.css
</style-sheet-name>
</skin-addition>
-
+
</skins>
\ No newline at end of file
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/web.xml?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/WEB-INF/web.xml Mon May 3 13:12:11 2010
@@ -139,7 +139,12 @@
<filter-name>prettyUrl</filter-name>
<url-pattern>/component-demo/*</url-pattern>
</filter-mapping>
-
+
+ <filter-mapping>
+ <filter-name>prettyUrl</filter-name>
+ <url-pattern>/feature-demo/*</url-pattern>
+ </filter-mapping>
+
<filter-mapping>
<filter-name>trinidad</filter-name>
<servlet-name>faces</servlet-name>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/feature/notImplemented.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/feature/notImplemented.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/feature/notImplemented.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/feature/notImplemented.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,34 @@
+<!--
+ 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/template/featureDemosTemplate.xhtml">
+
+ <ui:define name="featureContent">
+ <div style="padding: 20px 24px 5px;">
+ <tr:panelGroupLayout inlineStyle="background: #F6F4F0; border: 1px solid #E0DCD5; padding: 20px 30px;
+ text-align: left;" layout="vertical">
+ <tr:outputText value="Not yet implemented"
+ inlineStyle="font-size: 1.8em; color: #444444; line-height: 1.2em; font-weight: bold;"/>
+ </tr:panelGroupLayout>
+ </div>
+ </ui:define>
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/pages/featureDemo.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/pages/featureDemo.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/pages/featureDemo.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/pages/featureDemo.xhtml Mon May 3 13:12:11 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/template/featureDemosTemplate.xhtml">
+
+ <ui:define name="featureContent">
+
+ <tr:messages/>
+
+ <h1>Welcome to the Apache Trinidad Feature Demos</h1>
+
+ <tr:spacer height="20px"/>
+
+ <tr:outputText value=" Apache MyFaces Trinidad is a JSF framework including a large, enterprise
+ quality component library, supporting critical features such as accessibility (e.g. Section 508),
+ right-to-left languages, etc. It also includes a set of framework features, including :"/>
+
+ <tr:spacer height="12px"/>
+
+ <tr:panelList rows="4">
+ <tr:outputText value="Partial-page rendering support for the entire component set"/>
+ <tr:outputText value="Integrated client-side validation"/>
+ <tr:outputText value="A dialog framework"/>
+ <tr:outputText value="pageFlowScope, for communicating between pages"/>
+ </tr:panelList>
+
+ </ui:define>
+
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/defaultPageTemplateE-Mail.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/defaultPageTemplateE-Mail.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/defaultPageTemplateE-Mail.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/defaultPageTemplateE-Mail.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,69 @@
+<?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.
+-->
+
+<tr:document xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ title="Trinidad Components Demo"
+ inlineStyle="margin: 0;">
+
+ <div class="main_container email_app">
+ <div class="page_container">
+
+ <tr:form id="logoForm">
+ <tr:commandLink styleClass="logo" action="homeForm"/>
+ </tr:form>
+
+ <tr:form id="searchForm" defaultCommand="searchCommand">
+ <ui:include src="/template/fragment/searchBar.xhtml"/>
+ </tr:form>
+
+ <tr:form id="mainForm">
+ <div class="page_top">
+ <ui:include src="/template/fragment/navigationBar.xhtml"/>
+ </div><!-- close page top -->
+
+ <tr:navigationPane hint="bar" styleClass="toolbar">
+ <tr:commandNavigationItem icon="/skins/slices-email/project.png"
+ text="Project" styleClass="project"/>
+ <tr:commandNavigationItem icon="/skins/slices-email/pages.png"
+ text="Pages" styleClass="pages"/>
+ <tr:commandNavigationItem icon="/skins/slices-email/blocks.png"
+ text="Blocks" styleClass="blocks"/>
+ <tr:commandNavigationItem icon="/skins/slices-email/themes.png"
+ text="Themes" styleClass="themes"/>
+ <tr:commandNavigationItem icon="/skins/slices-email/browser.png"
+ text="Browser" styleClass="browser"/>
+ <tr:commandNavigationItem icon="/skins/slices-email/events.png"
+ text="Events" styleClass="events"/>
+ <tr:commandNavigationItem icon="/skins/slices-email/members.png"
+ text="Members" styleClass="members"/>
+ </tr:navigationPane>
+
+ <div class="page_middle">
+ <ui:insert name="content"/>
+ </div><!-- close page middle -->
+ <div class="page_bottom"></div>
+ </tr:form>
+
+ </div><!-- close page container -->
+ </div><!-- close main container -->
+ <ui:debug/>
+
+</tr:document>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailContacts.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailContacts.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailContacts.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailContacts.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,150 @@
+<!--
+ 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/samples/email/e-mailTemplate.xhtml">
+
+ <ui:define name="componentContent">
+ <tr:panelHorizontalLayout styleClass="fit_to_parrent">
+ <h2>
+ Contacts
+ </h2>
+ <tr:spacer width="30px"/>
+ <tr:panelHorizontalLayout halign="end">
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink id="newContactImg" action="#{contactListBean.newContact}" partialSubmit="true"
+ styleClass="newContact" inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink id="newContactLink" text="New" action="#{contactListBean.newContact}"
+ partialSubmit="true"/>
+ </tr:panelGroupLayout>
+ <tr:spacer width="10px"/>
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink id="editContactImg" action="#{contactListBean.editContact}" partialSubmit="true"
+ styleClass="editContact" inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink id="editContactLink" text="Edit" action="#{contactListBean.editContact}"
+ partialSubmit="true" />
+ </tr:panelGroupLayout>
+ <tr:spacer width="10px"/>
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink styleClass="deleteContact" action="#{contactListBean.deleteContact}"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink text="Delete" action="#{contactListBean.deleteContact}"/>
+ </tr:panelGroupLayout>
+ </tr:panelHorizontalLayout>
+ </tr:panelHorizontalLayout>
+
+ <tr:panelGroupLayout layout="vertical" inlineStyle="margin-top: 22px;" styleClass="rightColumn">
+
+ <tr:panelBox text="Contact List" inlineStyle="width: 100%" styleClass="mail_list"
+ partialTriggers="saveContact">
+ <tr:table id="contactList"
+ binding="#{contactListBean.tableBean.table}"
+ value="#{contactListBean.list}" var="row" rowSelection="multiple"
+ verticalGridVisible="false" styleClass="fit_to_parrent">
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="First Name"/>
+ </f:facet>
+ <tr:outputText value="#{row.firstName}"/>
+ </tr:column>
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="Last Name"/>
+ </f:facet>
+ <tr:outputText value="#{row.lastName}"/>
+ </tr:column>
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="Email"/>
+ </f:facet>
+ <tr:outputText value="#{row.EMailAddress}"/>
+ </tr:column>
+ <tr:column align="center" inlineStyle="">
+ <f:facet name="header">
+ <tr:outputText value="Birthday"/>
+ </f:facet>
+ <tr:outputText value="#{row.birthDay}"/>
+ </tr:column>
+ </tr:table>
+ </tr:panelBox>
+
+ <tr:spacer height="10px"/>
+
+
+ <tr:panelGroupLayout layout="vertical"
+ partialTriggers="newContactImg newContactLink editContactImg editContactLink saveContact cancelContact" >
+ <tr:panelTabbed position="above" rendered="#{contactListBean.contact != null}">
+ <tr:showDetailItem text="Personal">
+ <h:panelGrid columns="2" width="100%" style="width: 100%;" cellpadding="0" cellspacing="2px">
+ <tr:outputLabel value="First Name" for="firstname"/>
+ <tr:inputText id="firstname" value="#{contactListBean.contact.firstName}"/>
+
+ <tr:outputLabel value="Last Name" for="lastname"/>
+ <tr:inputText id="lastname" value="#{contactListBean.contact.lastName}"/>
+
+ <tr:outputLabel value="E-Mail" for="email"/>
+ <tr:inputText id="email" value="#{contactListBean.contact.EMailAddress}"/>
+
+ <tr:outputLabel value="Street" for="street"/>
+ <tr:inputText id="street" value="#{contactListBean.contact.street}"/>
+
+ <tr:outputLabel value="ZIP" for="zip"/>
+ <tr:inputText id="zip" value="#{contactListBean.contact.zip}"/>
+
+ <tr:outputLabel value="City" for="city"/>
+ <tr:inputText id="city" value="#{contactListBean.contact.city}"/>
+
+ <tr:outputLabel value="Country" for="country"/>
+ <tr:inputText id="country" value="#{contactListBean.contact.country}"/>
+
+ <tr:outputLabel value="Birthday" for="birthday"/>
+ <tr:inputDate id="birthdate" value="#{contactListBean.contact.birthDay}">
+ <f:convertDateTime pattern="yyyy.M.d"/>
+ </tr:inputDate>
+
+ <tr:commandButton id="saveContact" text="Save"
+ action="#{contactListBean.save}" partialSubmit="true"/>
+ <tr:commandButton id="cancelContact" text="Cancel"
+ action="#{contactListBean.cancel}" partialSubmit="true"/>
+
+ </h:panelGrid>
+
+
+ </tr:showDetailItem>
+
+ <tr:showDetailItem text="Bussines">
+ </tr:showDetailItem>
+
+
+ <tr:showDetailItem text="Misc">
+ </tr:showDetailItem>
+
+ </tr:panelTabbed>
+ </tr:panelGroupLayout>
+
+
+ </tr:panelGroupLayout>
+
+ </ui:define>
+
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListReceived.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListReceived.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListReceived.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListReceived.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,118 @@
+<!--
+ 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/samples/email/e-mailTemplate.xhtml">
+
+ <ui:define name="componentContent">
+ <tr:panelHorizontalLayout styleClass="fit_to_parrent">
+ <h2>
+ Inbox
+ </h2>
+ <tr:spacer width="30px"/>
+ <tr:panelHorizontalLayout halign="end">
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink id="newEmailImg"
+ partialSubmit="true"
+ styleClass="newContact" action="#{sentEmailListBean.newEmail}"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink id="newEmailLink"
+ partialSubmit="true"
+ text="New" action="#{sentEmailListBean.newEmail}"/>
+ </tr:panelGroupLayout>
+
+ <tr:spacer width="10px"/>
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink styleClass="deleteContact" action="#{receivedEmailListBean.deleteInboxEmail}"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink text="Delete" action="#{receivedEmailListBean.deleteInboxEmail}"/>
+ </tr:panelGroupLayout>
+ </tr:panelHorizontalLayout>
+ </tr:panelHorizontalLayout>
+
+ <tr:panelGroupLayout layout="vertical" inlineStyle="margin-top: 22px;" styleClass="rightColumn">
+
+ <tr:panelBox text="Inbox" inlineStyle="width: 100%" styleClass="mail_list"
+ partialTriggers="saveEmail">
+ <tr:table id="receivedEmailList"
+ binding="#{receivedEmailListBean.tableBean.table}"
+ value="#{receivedEmailListBean.list}" var="row" rowSelection="multiple"
+ verticalGridVisible="false" styleClass="fit_to_parrent">
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="From"/>
+ </f:facet>
+ <tr:outputText value="#{row.from}"/>
+ </tr:column>
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="Subject"/>
+ </f:facet>
+ <tr:outputText value="#{row.subject}"/>
+ </tr:column>
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="Date"/>
+ </f:facet>
+ <tr:outputText value="#{row.date}"/>
+ </tr:column>
+ </tr:table>
+
+ <tr:commandButton id="openMail"
+ partialSubmit="true"
+ action="#{receivedEmailListBean.openMail}"
+ text="Open Mail"/>
+ </tr:panelBox>
+
+ <tr:spacer height="10px"/>
+
+ <tr:panelGroupLayout layout="vertical"
+ partialTriggers="newEmailImg newEmailLink openMail receivedEmailList">
+ <tr:panelBox inlineStyle="width: 97%" rendered="#{receivedEmailListBean.receivedEmail != null}">
+ <h:panelGrid columns="2" width="100%" style="width: 100%;" cellpadding="0" cellspacing="2px">
+ <tr:outputLabel value="From:" for="from"/>
+ <tr:outputText id="from" value="#{receivedEmailListBean.receivedEmail.from}"/>
+
+ <tr:outputLabel value="Subject:" for="subject"/>
+ <tr:outputText id="Subject" value="#{receivedEmailListBean.receivedEmail.subject}"/>
+
+ <tr:outputLabel value="Date:" for="date"/>
+ <tr:outputText value="#{receivedEmailListBean.receivedEmail.date}"/>
+ </h:panelGrid>
+
+ <tr:spacer height="20px"/>
+ <tr:panelGroupLayout layout="vertical">
+ <tr:outputLabel value="Content:" for="content"/>
+ <tr:spacer height="10px"/>
+ <tr:outputText id="content" value="#{receivedEmailListBean.receivedEmail.content}"/>
+ </tr:panelGroupLayout>
+ </tr:panelBox>
+
+ </tr:panelGroupLayout>
+
+
+ </tr:panelGroupLayout>
+
+
+ </ui:define>
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListSent.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListSent.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListSent.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailListSent.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,118 @@
+<!--
+ 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/samples/email/e-mailTemplate.xhtml">
+
+ <ui:define name="componentContent">
+ <tr:panelHorizontalLayout styleClass="fit_to_parrent">
+ <h2>
+ Sent
+ </h2>
+ <tr:spacer width="30px"/>
+ <tr:panelHorizontalLayout halign="end">
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink id="newEmailImg"
+ partialSubmit="true"
+ styleClass="newContact" action="#{sentEmailListBean.newEmail}"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink id="newEmailLink"
+ partialSubmit="true"
+ text="New" action="#{sentEmailListBean.newEmail}"/>
+ </tr:panelGroupLayout>
+
+ <tr:spacer width="10px"/>
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink styleClass="deleteContact" action="#{sentEmailListBean.deleteSentEmail}"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink text="Delete" action="#{sentEmailListBean.deleteSentEmail}"/>
+ </tr:panelGroupLayout>
+ </tr:panelHorizontalLayout>
+ </tr:panelHorizontalLayout>
+
+ <tr:panelGroupLayout layout="vertical" inlineStyle="margin-top: 22px;" styleClass="rightColumn">
+
+ <tr:panelBox text="Sent" inlineStyle="width: 100%" styleClass="mail_list"
+ partialTriggers="saveEmail">
+ <tr:table id="receivedEmailList"
+ binding="#{sentEmailListBean.tableBean.table}"
+ value="#{sentEmailListBean.list}" var="row" rowSelection="multiple"
+ verticalGridVisible="false" styleClass="fit_to_parrent">
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="To"/>
+ </f:facet>
+ <tr:outputText value="#{row.to}"/>
+ </tr:column>
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="Subject"/>
+ </f:facet>
+ <tr:outputText value="#{row.subject}"/>
+ </tr:column>
+ <tr:column align="center">
+ <f:facet name="header">
+ <tr:outputText value="Date"/>
+ </f:facet>
+ <tr:outputText value="#{row.date}"/>
+ </tr:column>
+ </tr:table>
+
+ <tr:commandButton id="openMail"
+ partialSubmit="true"
+ action="#{sentEmailListBean.openMail}"
+ text="Open Mail"/>
+ </tr:panelBox>
+
+ <tr:spacer height="10px"/>
+
+ <tr:panelGroupLayout layout="vertical"
+ partialTriggers="newEmailImg newEmailLink openMail receivedEmailList">
+ <tr:panelBox inlineStyle="width: 97%" rendered="#{sentEmailListBean.sentEmail != null}">
+ <h:panelGrid columns="2" width="100%" style="width: 100%;" cellpadding="0" cellspacing="2px">
+ <tr:outputLabel value="To:" for="to"/>
+ <tr:outputText id="to" value="#{sentEmailListBean.sentEmail.to}"/>
+
+ <tr:outputLabel value="Subject:" for="subject"/>
+ <tr:outputText id="Subject" value="#{sentEmailListBean.sentEmail.subject}"/>
+
+ <tr:outputLabel value="Date:" for="date"/>
+ <tr:outputText value="#{sentEmailListBean.sentEmail.date}"/>
+ </h:panelGrid>
+
+ <tr:spacer height="20px"/>
+ <tr:panelGroupLayout layout="vertical">
+ <tr:outputLabel value="Content:" for="content"/>
+ <tr:spacer height="10px"/>
+ <tr:outputText id="content" value="#{sentEmailListBean.sentEmail.content}"/>
+ </tr:panelGroupLayout>
+ </tr:panelBox>
+
+ </tr:panelGroupLayout>
+
+
+ </tr:panelGroupLayout>
+
+
+ </ui:define>
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailTemplate.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailTemplate.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailTemplate.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/e-mailTemplate.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,67 @@
+<!--
+ 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/samples/email/defaultPageTemplateE-Mail.xhtml">
+
+ <ui:define name="content">
+
+ <h:panelGrid columns="2" columnClasses="column25percent,column75percent" cellpadding="0"
+ cellspacing="0" style="width: 100%;" width="100%">
+
+ <tr:panelGroupLayout layout="vertical" styleClass="layoutLeftColumn">
+
+ <tr:outputText value="Folders" styleClass="head"/>
+
+ <tr:panelAccordion discloseNone="true" inlineStyle="width: 100%;" styleClass="components_accordion">
+ <tr:showDetailItem text="Mail">
+ <tr:navigationPane hint="list"
+ styleClass="components_list">
+ <tr:commandNavigationItem text="Inbox" action="goToInbox"/>
+ <tr:commandNavigationItem text="Sent" action="goToSent"/>
+ <tr:commandNavigationItem text="Drafts"/>
+ <tr:commandNavigationItem text="Junk"/>
+ <tr:commandNavigationItem text="Trash"/>
+ </tr:navigationPane>
+ </tr:showDetailItem>
+ <tr:showDetailItem text="Contacts">
+ <tr:navigationPane hint="list"
+ styleClass="components_list">
+ <tr:commandNavigationItem text="Private" action="goToEMailContacts"/>
+ <tr:commandNavigationItem text="Business" action="goToEMailContacts"/>
+ </tr:navigationPane>
+ </tr:showDetailItem>
+ </tr:panelAccordion>
+
+ </tr:panelGroupLayout>
+
+ <tr:panelGroupLayout layout="vertical">
+ <ui:insert name="componentContent"/>
+ </tr:panelGroupLayout>
+
+ </h:panelGrid>
+
+ </ui:define>
+
+
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/index.html
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/index.html?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/index.html (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/index.html Mon May 3 13:12:11 2010
@@ -0,0 +1,23 @@
+<html>
+<!--
+ 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.
+-->
+<header>
+<meta http-equiv="Refresh" content="0;url=/faces/pages/demoStart.xhtml">
+</header>
+</html>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/newEmail.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/newEmail.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/newEmail.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/samples/email/newEmail.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,104 @@
+<!--
+ 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.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/samples/email/e-mailTemplate.xhtml">
+
+ <ui:define name="componentContent">
+ <tr:panelHorizontalLayout styleClass="fit_to_parrent">
+ <h2>
+ New
+ </h2>
+ <tr:spacer width="30px"/>
+ <tr:panelHorizontalLayout halign="end">
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink id="newEmailImg"
+ partialSubmit="true"
+ styleClass="newContact" action="#{sentEmailListBean.newEmail}"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink id="newEmailLink"
+ partialSubmit="true"
+ text="New" action="#{sentEmailListBean.newEmail}"/>
+ </tr:panelGroupLayout>
+
+ <tr:spacer width="10px"/>
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink styleClass="deleteContact" action="none"
+ inlineStyle="width:16px;height:16px;"/>
+ <tr:commandLink text="Delete" action="none"/>
+ </tr:panelGroupLayout>
+
+ </tr:panelHorizontalLayout>
+ </tr:panelHorizontalLayout>
+
+ <tr:panelGroupLayout layout="vertical" inlineStyle="margin-top: 22px;" styleClass="rightColumn">
+
+ <tr:panelBox text="New E-Mail" inlineStyle="width: 100%" styleClass="mail_list"
+ partialTriggers="saveEmail">
+ <tr:panelGroupLayout layout="vertical"
+ partialTriggers="newEmailImg newEmailLink openMail receivedEmailList">
+ <tr:panelBox inlineStyle="width: 97%">
+ <h:panelGrid columns="2" width="100%" style="width: 100%;" cellpadding="0" cellspacing="0px">
+ <tr:outputLabel value="To:" for="to"/>
+ <tr:inputText id="to" value="#{sentEmailListBean.sentEmail.to}"/>
+
+ <tr:spacer height="5px"/>
+ <tr:spacer height="5px"/>
+
+ <tr:outputLabel value="Subject:" for="subject"/>
+ <tr:inputText id="Subject" value="#{sentEmailListBean.sentEmail.subject}"/>
+ </h:panelGrid>
+
+ <tr:spacer height="20px"/>
+
+ <tr:panelGroupLayout layout="vertical" >
+ <tr:outputLabel value="Content:" for="content"/>
+ <tr:spacer height="10px"/>
+ <tr:inputText id="content" value="#{sentEmailListBean.sentEmail.content}"
+ rows="7" columns="100"/>
+ </tr:panelGroupLayout>
+
+ <tr:spacer height="10px"/>
+
+ <tr:panelHorizontalLayout>
+ <tr:spacer width="8px"/>
+ <tr:commandButton id="saveEmail" text="Save"
+ action="#{sentEmailListBean.save}" partialSubmit="true"/>
+ <tr:spacer width="10px"/>
+ <tr:commandButton id="cancelEmail" text="Cancel"
+ action="#{sentEmailListBean.cancel}" partialSubmit="true"/>
+ </tr:panelHorizontalLayout>
+
+
+ </tr:panelBox>
+
+ </tr:panelGroupLayout>
+
+
+ </tr:panelBox>
+
+ </tr:panelGroupLayout>
+
+
+ </ui:define>
+</ui:composition>
Added: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/featureDemosTemplate.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/featureDemosTemplate.xhtml?rev=940443&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/featureDemosTemplate.xhtml (added)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/featureDemosTemplate.xhtml Mon May 3 13:12:11 2010
@@ -0,0 +1,66 @@
+<!--
+ 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.
+-->
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="/template/defaultColumnPageTemplate.xhtml">
+
+ <ui:define name="content">
+
+ <h:panelGrid columns="2" columnClasses="column25percent,column75percent" cellpadding="0"
+ cellspacing="0" style="width: 100%;" width="100%">
+
+ <tr:subform>
+ <tr:panelGroupLayout layout="vertical">
+
+ <tr:outputText value="Browse Demos" styleClass="head"/>
+
+ <tr:panelAccordion discloseNone="true" inlineStyle="width: 100%;" styleClass="components_accordion">
+ <c:forEach items="#{navigationHandler.featureDemoCategories}" var="aCategory">
+ <tr:showDetailItem text="#{aCategory.name}" immediate="true"
+ disclosed="#{navigationHandler.featureCategoryDisclosed[aCategory]}">
+ <tr:navigationPane hint="list" var="aFeature" value="#{aCategory.featureDemos}" styleClass="components_list">
+ <f:facet name="nodeStamp">
+ <tr:commandNavigationItem text="#{aFeature.displayName}"
+ selected="#{navigationHandler.featureDemoSelected[aFeature]}"
+ destination="#{aFeature.destination}">
+ </tr:commandNavigationItem>
+ </f:facet>
+ </tr:navigationPane>
+ </tr:showDetailItem>
+ </c:forEach>
+ </tr:panelAccordion>
+
+ </tr:panelGroupLayout>
+ </tr:subform>
+
+ <tr:subform>
+ <tr:panelGroupLayout layout="vertical">
+ <ui:insert name="featureContent"/>
+ </tr:panelGroupLayout>
+ </tr:subform>
+
+ </h:panelGrid>
+
+ </ui:define>
+
+</ui:composition>
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/navigationBar.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/navigationBar.xhtml?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/navigationBar.xhtml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/navigationBar.xhtml Mon May 3 13:12:11 2010
@@ -1,3 +1,21 @@
+<!--
+ 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.
+-->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
@@ -14,7 +32,7 @@
</tr:goLink>
</li>
<li>
- <tr:goLink destination="/faces/pages/notImplemented.xhtml">
+ <tr:goLink destination="/faces/pages/featureDemo.xhtml">
<tr:outputText id="demosId" value="Feature Demos"/>
</tr:goLink>
</li>
@@ -25,7 +43,7 @@
<div class="submenu_container">
<table class="submenu">
<tr><td>
- <tr:goLink destination="/faces/feature/e-mailTemplate.xhtml">
+ <tr:goLink destination="/faces/samples/email/e-mailTemplate.xhtml">
<tr:outputText id="emailId" value="Email"/>
</tr:goLink>
</td></tr>
@@ -59,16 +77,6 @@
<f:setPropertyActionListener value="Casablanca" target="#{skinFamilySelection.skinFamily}"/>
</tr:commandLink>
</td></tr>
- <tr><td>
- <tr:goLink destination="/faces/pages/notImplemented.xhtml">
- <tr:outputText id="suedeId" value="Suede"/>
- </tr:goLink>
- </td></tr>
- <tr><td>
- <tr:goLink destination="/faces/pages/notImplemented.xhtml">
- <tr:outputText id="purpleId" value="Purple"/>
- </tr:goLink>
- </td></tr>
</table>
</div><!-- cloase submenu container -->
</span>
Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/searchBar.xhtml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/searchBar.xhtml?rev=940443&r1=940442&r2=940443&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/searchBar.xhtml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/src/main/webapp/template/fragment/searchBar.xhtml Mon May 3 13:12:11 2010
@@ -1,3 +1,21 @@
+<!--
+ 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.
+-->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"