Author: gvanmatre
Date: Wed Nov 29 21:00:46 2006
New Revision: 480837
URL: http://svn.apache.org/viewvc?view=rev&rev=480837
Log:
I've added a few more random components to the testbed (so, so many choices).
I also added an InternalView implementation that would be another option for
Clay/Trinidad integration. This InternalView is a really slick idea. It's
like a pseudo view handler that is mapped by the view id (wish I had thought of
this). You can use it to build a specific JSF component tree. In this
example, I just add a clay component to the view root and load a full clay view
but you could use to build pages using java code. I would think this would
perform very well (the heck with templating).
The second page, /page2.jsf, shows an example. The Clay PageHander is mapped
the the view id of /clay.jsf. The Trinidad view handler intercepts, find an
InternalView implementation and delegates. The clay version looks for a
request param of jsfid and uses that to build the root of the clay subtree.
For example:
<h:outputLink value="clay.jsf">
Clay InternalView Example
<f:param name="jsfid" value="/index.jsf"/>
</h:outputLink>
Added:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ProcessBacking.java
(with props)
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/PageHandler.java
(with props)
shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/
shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/org.apache.myfaces.trinidad.render.InternalView.properties
(with props)
Modified:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ShowDisplayElementBacking.java
shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html
Modified:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
---
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
(original)
+++
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
Wed Nov 29 21:00:46 2006
@@ -26,6 +26,7 @@
import org.apache.myfaces.trinidad.util.Service;
import org.apache.shale.tiger.managed.Bean;
import org.apache.shale.tiger.managed.Scope;
+import org.apache.shale.view.AbstractRequestBean;
/**
* A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
@@ -33,7 +34,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Matthias Weßendorf</a>
*/
@Bean(name="helloWorldBacking", scope=Scope.REQUEST)
-public class HelloWorldBacking {
+public class HelloWorldBacking extends AbstractRequestBean {
/**
* <p>
@@ -83,12 +84,15 @@
}
public String throwException() {
-
+ log.info("Throwing action Exception");
throw new NullPointerException("action: Testing Exception page.");
}
public void throwActionListener(ActionEvent event) {
+ log.info("Throwing actionListener Exception");
throw new NullPointerException("actionListener: Testing Exception
page.");
}
+
+
}
Added:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ProcessBacking.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ProcessBacking.java?view=auto&rev=480837
==============================================================================
---
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ProcessBacking.java
(added)
+++
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ProcessBacking.java
Wed Nov 29 21:00:46 2006
@@ -0,0 +1,82 @@
+/*
+ * 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.trinidad.blank;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.model.MenuModel;
+import org.apache.shale.tiger.managed.Bean;
+import org.apache.shale.tiger.managed.Scope;
+import org.apache.shale.view.AbstractRequestBean;
+
[EMAIL PROTECTED](name="processBacking", scope=Scope.REQUEST)
+public class ProcessBacking extends AbstractRequestBean {
+
+ public MenuModel getModel() {
+
+ FacesContext context = FacesContext.getCurrentInstance();
+ MenuModel model = (MenuModel) getBean("processMenuModel");
+ if (model.getWrappedData() == null) {
+ List list = new ArrayList();
+
+ list.add(new CommandBean("/index.jsf", "process.step1",
"home"));
+ list.add(new CommandBean("/page2.jsf", "process.step2",
"page2"));
+ list.add(new CommandBean("/page3.jsf", "process.step3",
"page3"));
+ list.add(new CommandBean("/error.jsf", "process.step4",
"error"));
+
+ model.setWrappedData(list);
+ }
+ return model;
+ }
+
+ public static class CommandBean {
+ private String viewId = null;
+ private String action = null;
+ private String text = null;
+
+ public CommandBean(String viewId, String action,
+ String text) {
+ this.viewId = viewId;
+ this.action = action;
+ this.text = text;
+ }
+
+ public String getAction() {
+ return action;
+ }
+ public void setAction(String action) {
+ this.action = action;
+ }
+ public String getText() {
+ return text;
+ }
+ public void setText(String text) {
+ this.text = text;
+ }
+ public String getViewId() {
+ return viewId;
+ }
+ public void setViewId(String viewId) {
+ this.viewId = viewId;
+ }
+
+
+ }
+}
Propchange:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ProcessBacking.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ShowDisplayElementBacking.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ShowDisplayElementBacking.java?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
---
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ShowDisplayElementBacking.java
(original)
+++
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ShowDisplayElementBacking.java
Wed Nov 29 21:00:46 2006
@@ -62,7 +62,7 @@
@Prerender public void load() {
if (showJsfid == null) {
- throw new NullPointerException("The jsfid property can not be
null");
+ return;
}
ComponentTreeModelAdapter adapter = (ComponentTreeModelAdapter)
getBean("displayElementTree");
Added:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/PageHandler.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/PageHandler.java?view=auto&rev=480837
==============================================================================
---
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/PageHandler.java
(added)
+++
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/PageHandler.java
Wed Nov 29 21:00:46 2006
@@ -0,0 +1,267 @@
+package org.apache.shale.clay;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Locale;
+
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.myfaces.trinidad.render.InternalView;
+import org.apache.myfaces.trinidad.render.RenderUtils;
+import org.apache.shale.clay.component.Clay;
+import org.apache.shale.clay.config.beans.PageNotFoundException;
+import org.apache.shale.clay.utils.JSFRuntimeTracker;
+
+/**
+ * <p>This is a Trinidad InternalView handler implementation.
+ * The handler is mapped to a view id of "/clay.jsf". The
+ * suffix of ".jsf" is not part of the mapping but the default
+ * <code>javax.faces.DEFAULT_SUFFIX</code> is assumed. This
+ * pseudo view handler snaps a Clay component to the view root
+ * and uses a requestScope param of "jsfid" to derive the
+ * subtree root.<br/>
+ * <br/>
+ *
+ * The InternalView root mappings are registered in a properties file
+ * in any META-INF directory
+ * (META-INF/org.apache.myfaces.trinidad.render.InternalView.properties).
+ * </p>
+ */
+public class PageHandler extends InternalView {
+
+ /**
+ * <p>
+ * The [EMAIL PROTECTED] Clay} component <code>id</code> property value.
+ * </p>
+ */
+ private static final String CLAY_VIEW_ID = "clayPageView";
+
+ /**
+ * <p>
+ * [EMAIL PROTECTED] Clay} <code>componentType</code> that is used to
create a
+ * instance using the faces Application object.
+ * </p>
+ */
+ private static final String CLAY_COMPONENT_TYPE =
"org.apache.shale.clay.component.Clay";
+
+ /**
+ * <p>Instantiates a view root and sets it's properties. Next we add
+ * a Clay component as a child of the view root. A request scoped
+ * parameter with the name of "jsfid" is used to define the subtree
+ * of the clay component.</p>
+ * </p>
+ * @param facesContext faces context
+ * @param viewId name of the view
+ * @return root of the component tree
+ */
+ public UIViewRoot createView(FacesContext facesContext, String viewId) {
+ Application application = facesContext.getApplication();
+ ViewHandler applicationViewHandler = application.getViewHandler();
+
+ UIViewRoot view = (UIViewRoot)
application.createComponent(UIViewRoot.COMPONENT_TYPE);
+ view.setViewId(viewId);
+ // calculate locale
+ view.setLocale(applicationViewHandler.calculateLocale(facesContext));
+ // calculate renderKit
+
view.setRenderKitId(applicationViewHandler.calculateRenderKitId(facesContext));
+
+ // look for a jsfid String in all scopes
+ ValueBinding vb = application.createValueBinding("#{param.jsfid}");
+ String jsfid = (String) vb.getValue(facesContext);
+
+ // add a Clay component to the view root.
+ Clay clay = (Clay) application.createComponent(CLAY_COMPONENT_TYPE);
+ clay.setId(CLAY_VIEW_ID);
+ clay.setJsfid(jsfid);
+ clay.setManagedBeanName(getManagedBeanName(facesContext, jsfid));
+
+ view.getChildren().add(view.getChildren().size(), clay);
+
+ facesContext.setViewRoot(view);
+
+ return view;
+ }
+
+
+ /**
+ * <p>Recursively renders the component tree (just like in JSF 1.2) and
+ * pushes the rendered markup to the response writer.</p>
+ *
+ * @param facesContext faces context
+ * @param view root of the component tree
+ */
+ public void renderView(FacesContext facesContext, UIViewRoot view)
+ throws IOException, FacesException {
+
+
+ //get the response
+ HttpServletResponse response = (HttpServletResponse)
facesContext.getExternalContext().getResponse();
+ //set the locale
+ (response).setLocale(facesContext.getViewRoot().getLocale());
+
+ //builds a buffer to write the page to
+ StringWriter writer = new StringWriter();
+ //create a buffered response writer
+ ResponseWriter buffResponsewriter = facesContext.getRenderKit()
+ .createResponseWriter(writer, null,
response.getCharacterEncoding());
+ //push buffered writer to the faces context
+ facesContext.setResponseWriter(buffResponsewriter);
+ //start a document
+ buffResponsewriter.startDocument();
+
+ try {
+ RenderUtils.encodeRecursive(facesContext, view);
+ } catch (PageNotFoundException e) {
+ //look to see if the page not found is a top level page
+ if (e.getResource().equals(view.getViewId())) {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
e.getResource());
+ facesContext.responseComplete();
+ return;
+ }
+
+ throw e;
+ }
+ //end the document
+ buffResponsewriter.endDocument();
+
+ //save the view
+ StateManager stateManager =
facesContext.getApplication().getStateManager();
+ StateManager.SerializedView serializedview =
stateManager.saveSerializedView(facesContext);
+
+ ResponseWriter responsewriter = facesContext.getRenderKit()
+ .createResponseWriter(response.getWriter(), null,
response.getCharacterEncoding());
+ //push response writer to the faces context
+ facesContext.setResponseWriter(responsewriter);
+
+ StringBuffer buff = writer.getBuffer();
+ if (stateManager.isSavingStateInClient(facesContext)) {
+ int curPos = 0; // current position
+ int fndPos = 0; //start of a marker
+ int frmMkrIdx = indexOfFormMarker();
+
+ //might be multiple forms in the document
+ do {
+ fndPos = buff.indexOf(FORM_MARKERS[frmMkrIdx], curPos);
+ if (fndPos > -1) {
+ responsewriter.write(buff.substring(curPos, fndPos));
+ stateManager.writeState(facesContext, serializedview);
+ curPos = fndPos + FORM_MARKERS[frmMkrIdx].length();
+ } else {
+ responsewriter.write(buff.substring(curPos));
+ }
+ } while(curPos < buff.length() && fndPos > -1);
+
+ } else {
+ //using server side state no need to look for form markers
+ responsewriter.write(buff.toString());
+ }
+
+
+ }
+
+ /**
+ * <p>HTML form markers for client side state saving for MyFaces and Sun RI
+ * implementations.</p>
+ */
+ protected static final String[] FORM_MARKERS = {
+ "com.sun.faces.saveStateFieldMarker", // RI 1.1
+ "<!--@@JSF_FORM_STATE_MARKER@@-->", // myfaces 1.1.x
+ "~com.sun.faces.saveStateFieldMarker~"}; // RI 1.2
+
+ /**
+ * <p>Returns an index into the <code>FORM_MAKKERS</code> array. The
index will be used to
+ * get the form marker matching the JSF runtime. Only the myfaces and Sun
RI are supported.
+ * The form marker is determined by trying to load the myfaces view
handler. Next,
+ * the Sun RI 1.2 JSPVersionTracker is attempted to be loaded. The default
+ * is the marker for the Sun RI.</p>
+ *
+ * @return index into the FORM_MARKERS array
+ */
+ protected int indexOfFormMarker() {
+ int i = 0;
+ if (JSFRuntimeTracker.getJsfRuntime() ==
JSFRuntimeTracker.MYFACES_1_1) {
+ i = 1;
+ } else if (JSFRuntimeTracker.getJsfRuntime() ==
JSFRuntimeTracker.RI_1_2) {
+ i = 2;
+ }
+ return i;
+ }
+
+
+
+ /**
+ * <p>Ask the state manager if he can restore a component tree by view
id.</p>
+ *
+ * @param facesContext faces context
+ * @param viewId the name of the view
+ * @return root of the component tree
+ */
+ public UIViewRoot restoreView(FacesContext facesContext, String viewId) {
+ Application application = facesContext.getApplication();
+ ViewHandler applicationViewHandler = application.getViewHandler();
+
+
+ StateManager stateManager =
facesContext.getApplication().getStateManager();
+ UIViewRoot view = stateManager.restoreView(facesContext, viewId,
applicationViewHandler.calculateRenderKitId(facesContext));
+ return view;
+ }
+
+ /**
+ * <p>Application scope attribute under which the
+ * <code>ViewControllerMapper</code> for translating view identifiers to
+ * class names of the corresponding <code>ViewController</code> is stored.
+ * </p>
+ */
+ public static final String VIEW_MAPPER =
"org$apache$shale$view$VIEW_MAPPER";
+
+ /**
+ * <p>
+ * Returns the "@managed-bean-name" the view controller is registered
under.
+ * The assumed mapping will be the same as in core Shale.
+ * </p>
+ *
+ * @param context
+ * faces context
+ * @param viewId
+ * name of the page
+ * @return default managed bean name associated with the view
+ */
+ protected String getManagedBeanName(FacesContext context, String viewId) {
+ String managedBeanName = null;
+
+ Object mapper = context.getApplication().getVariableResolver()
+ .resolveVariable(context, VIEW_MAPPER);
+ // is there a view controller mapper
+ if (mapper != null) {
+ StringBuffer el = new StringBuffer();
+ el.append("#{").append(VIEW_MAPPER).append(".mapViewId")
+ .append("}");
+ MethodBinding mb = context.getApplication().createMethodBinding(
+ el.toString(), new Class[] { String.class });
+ managedBeanName = (String) mb.invoke(context,
+ new Object[] { viewId });
+ }
+
+ return managedBeanName;
+ }
+
+
+ /**
+ * @return always returns <code>true</code> indicating this view is
stateful.
+ */
+ public boolean isStateless(FacesContext arg0, String arg1) {
+ return false;
+ }
+
+
+
+}
Propchange:
shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/PageHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/org.apache.myfaces.trinidad.render.InternalView.properties
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/org.apache.myfaces.trinidad.render.InternalView.properties?view=auto&rev=480837
==============================================================================
---
shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/org.apache.myfaces.trinidad.render.InternalView.properties
(added)
+++
shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/org.apache.myfaces.trinidad.render.InternalView.properties
Wed Nov 29 21:00:46 2006
@@ -0,0 +1,15 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+/clay=org.apache.shale.clay.PageHandler
Propchange:
shale/sandbox/shale-clay-trinidad/src/main/resources/META-INF/org.apache.myfaces.trinidad.render.InternalView.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/faces-config.xml
Wed Nov 29 21:00:46 2006
@@ -26,20 +26,17 @@
</default-render-kit-id>
</application>
- <!-- Global preferences object that proxies to others -->
- <!--
- <managed-bean>
- <managed-bean-name>helloWorldBacking</managed-bean-name>
- <managed-bean-class>
- org.apache.myfaces.trinidad.blank.HelloWorldBacking
- </managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- -->
-
- <!-- navigation rules for index.jsf -->
+ <managed-bean>
+ <managed-bean-name>processMenuModel</managed-bean-name>
+
<managed-bean-class>org.apache.myfaces.trinidad.model.ProcessMenuModel</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>viewIdProperty</property-name>
+ <value>viewId</value>
+ </managed-property>
+ </managed-bean>
+
<navigation-rule>
- <from-view-id>/index.jsf</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/page2.jsf</to-view-id>
@@ -48,15 +45,34 @@
<from-outcome>page3</from-outcome>
<to-view-id>/page3.jsf</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/index.jsf</to-view-id>
+ </navigation-case>
+
</navigation-rule>
- <!-- navigation rules for page2.jsf -->
+ <!-- navigation rules for processChoiceBar in /pages/layout.html -->
<navigation-rule>
- <from-view-id>/page2.jsf</from-view-id>
<navigation-case>
- <from-outcome>back</from-outcome>
- <to-view-id>/index.jsf</to-view-id>
+ <from-outcome>process.step1</from-outcome>
+ <to-view-id>/index.jsf</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>process.step2</from-outcome>
+ <to-view-id>/page2.jsf</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>process.step3</from-outcome>
+ <to-view-id>/page3.jsf</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>process.step4</from-outcome>
+ <to-view-id>/error.jsf</to-view-id>
+ </navigation-case>
+
</navigation-rule>
+
+
</faces-config>
Modified: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/index.html Wed Nov
29 21:00:46 2006
@@ -34,12 +34,35 @@
</tr:panelPage>
</tr:form>
<tr:form>
- <tr:panelPage>
- <tr:commandLink id="button2" text="check it out"
action="page3" />
- <tr:commandLink id="throw" text="throw exceptions"
- action="#{helloWorldBacking.throwException}" />
- </tr:panelPage>
- </tr:form>
+ <tr:commandLink id="button2" text="check it out" action="page3" />
+ <tr:showDetailHeader id="main1" text="Exceptions" disclosed="true">
+ <tr:panelHeader text="Throw'em">
+ <tr:commandLink id="throw1" text="throw action exception"
action="#{helloWorldBacking.throwException}" />
+ <br/>
+ <tr:commandLink id="throw2" text="throw listener exception"
+
actionListener="#{helloWorldBacking.throwActionListener}" />
+ </tr:panelHeader>
+ </tr:showDetailHeader>
+
+
+ <tr:showDetail id="main2" text="Detail Menu Content">
+
+ <tr:panelHorizontalLayout valign="top">
+ <f:facet name="separator">
+ <tr:spacer width="10" height="1"/>
+ </f:facet>
+ <tr:goLink text="Shale"
+ destination="http://shale.apache.org"/>
+ <tr:goLink text="Myfaces"
+ destination="http://myfaces.apache.org"/>
+ <tr:goLink text="Tomcat"
+ destination="http://tomcat.apache.org"/>
+
+ </tr:panelHorizontalLayout>
+ </tr:showDetail>
+
+ </tr:form>
+
</span>
Modified: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/layout.html Wed Nov
29 21:00:46 2006
@@ -21,17 +21,63 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:tr="http://myfaces.apache.org/trinidad"
- xmlns:c="http://shale.apache.org/clay">
+ xmlns:c="http://shale.apache.org/clay"
+ xmlns:clay="http://shale.apache.org/xml/clay>
<tr:document title="@title">
- <tr:form id="navigation">
+<tr:panelBorderLayout>
+
+ <f:facet name="top">
+ <tr:form id="navigation">
<tr:navigationPane hint="@navigationPaneHint">
<tr:commandNavigationItem text="shale.apache.org"
destination="http://shale.apache.org" targetFrame="_new"/>
<tr:commandNavigationItem text="myfaces.apache.org"
destination="http://myfaces.apache.org" targetFrame="_new"/>
</tr:navigationPane>
- </tr:form>
+ </tr:form>
+ </f:facet>
+
- <c:clay jsfid="clay" clayJsfid="@bodycontent">
- Mock body goes here
- </c:clay>
+ <!--
+ <f:facet name="innerBottom">
+ <tr:form>
+ <tr:train value="#{processBacking.model}" var="e"
shortDesc="Progress Train">
+ <f:facet name="nodeStamp">
+ <clay:element jsfid="tr:commandNavigationItem">
+ <clay:attributes>
+ <clay:set name="immediate"
value="#{processMenuModel.immediate}" />
+ <clay:set name="readOnly"
value="#{processMenuModel.readOnly}" />
+ <clay:set name="text" value="#{e.text}" />
+ <clay:set name="action"
value="#{e.getAction}" />
+ </clay:attributes>
+ </clay:element>
+ </f:facet>
+ </tr:train>
+ </tr:form>
+ </f:facet>
+
+ -->
+
+ <f:facet name="innerTop">
+ <tr:form>
+ <tr:processChoiceBar value="#{processBacking.model}" var="e"
shortDesc="Progress Choice Bar">
+ <f:facet name="nodeStamp">
+ <clay:element jsfid="tr:commandNavigationItem">
+ <clay:attributes>
+ <clay:set name="immediate"
value="#{processMenuModel.immediate}" />
+ <clay:set name="readOnly"
value="#{processMenuModel.readOnly}" />
+ <clay:set name="text" value="#{e.text}" />
+ <clay:set name="action"
value="#{e.getAction}" />
+ </clay:attributes>
+ </clay:element>
+ </f:facet>
+ </tr:processChoiceBar>
+ </tr:form>
+ </f:facet>
+
+ <c:clay jsfid="clay" clayJsfid="@bodycontent">
+ Mock body goes here
+ </c:clay>
+
+</tr:panelBorderLayout>
+
</tr:document>
</html>
Modified: shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/page2.html Wed Nov
29 21:00:46 2006
@@ -24,6 +24,15 @@
<tr:form>
<tr:panelPage>
+
+ <f:facet name="navigationGlobal">
+ <h:outputLink value="clay.jsf">
+ Clay InternalView Example
+ <f:param name="jsfid" value="/index.jsf"/>
+ </h:outputLink>
+ </f:facet>
+
+
<tr:outputText id="input1" value="Hello #{helloWorldBacking.name}.
We hope you enjoy Apache MyFaces Trinidad"/>
<tr:commandLink id="link" text="GO HOME" action="back" />
</tr:panelPage>
Modified:
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html?view=diff&rev=480837&r1=480836&r2=480837
==============================================================================
---
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html
(original)
+++
shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html
Wed Nov 29 21:00:46 2006
@@ -31,6 +31,10 @@
<f:facet name="separator">
<tr:separator />
</f:facet>
+ <f:facet name="bottom">
+ <tr:legend name="required"/>
+ </f:facet>
+
<tr:panelGroupLayout layout="horizontal">
@@ -60,8 +64,9 @@
focusListener="[EMAIL PROTECTED]"
rangeChangeListener="[EMAIL PROTECTED]"
partialTriggers="jsfid showit"
+ rowSelection="single"
>
-
+
<f:facet name="nodeStamp">
<tr:column>
<f:facet name="header">
@@ -104,6 +109,7 @@
selectionListener="[EMAIL PROTECTED]"
focusListener="[EMAIL PROTECTED]"
partialTriggers="subform:jsfid subform:showit"
+ rowSelection="multiple"
>
<f:facet name="nodeStamp">