shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@apache.org
Subject svn commit: r474666 - in /shale/sandbox/shale-clay-trinidad: ./ src/main/java/org/apache/myfaces/trinidad/blank/ src/main/java/org/apache/shale/clay/component/chain/trinidad/ src/main/webapp/WEB-INF/ src/main/webapp/pages/
Date Tue, 14 Nov 2006 05:13:21 GMT
Author: gvanmatre
Date: Mon Nov 13 21:13:20 2006
New Revision: 474666

URL: http://svn.apache.org/viewvc?view=rev&rev=474666
Log:
More on the Clay/Trinidad integration.  Added support for the rest of the Trinidad custom
method action component attributes.   Dropped in a partial page rendering test and added a
tree component and a few other components.  The partial page rendering is amazingly simple
to use.

Added:
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
      - copied, changed from r473148, shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
Removed:
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
Modified:
    shale/sandbox/shale-clay-trinidad/pom.xml
    shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ComponentTreeModelAdapter.java
    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/java/org/apache/myfaces/trinidad/blank/TreeModelAdapter.java
    shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml
    shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html

Modified: shale/sandbox/shale-clay-trinidad/pom.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/pom.xml?view=diff&rev=474666&r1=474665&r2=474666
==============================================================================
--- shale/sandbox/shale-clay-trinidad/pom.xml (original)
+++ shale/sandbox/shale-clay-trinidad/pom.xml Mon Nov 13 21:13:20 2006
@@ -15,8 +15,12 @@
 		<finalName>${artifactId}</finalName>
 		<resources>
 			<resource>
-				<targetPath>${project.build.outputDirectory}/META-INF</targetPath>
-				<directory>${project.build.outputDirectory}/src/main/resources/META-INF</directory>
+				<targetPath>
+					${project.build.outputDirectory}/META-INF
+				</targetPath>
+				<directory>
+					${project.build.outputDirectory}/src/main/resources/META-INF
+				</directory>
 				<includes>
 					<include>**/*.xml</include>
 				</includes>
@@ -162,12 +166,12 @@
 		</dependency>
 
 		<!-- Apache Trinidad 
-                     You need to build for the source.
-                     svn co http://svn.apache.org/repos/asf/incubator/adffaces/trunk/trinidad
trinidad
-                     cd trinidad
-                     mvn install
-                     ** rock on **
-                -->
+			You need to build for the source.
+			svn co http://svn.apache.org/repos/asf/incubator/adffaces/trunk/trinidad trinidad
+			cd trinidad
+			mvn install
+			** rock on **
+		-->
 		<dependency>
 			<groupId>org.apache.myfaces.trinidad</groupId>
 			<artifactId>trinidad-api</artifactId>
@@ -206,13 +210,12 @@
 			<artifactId>shale-view</artifactId>
 			<version>1.0.4-SNAPSHOT</version>
 		</dependency>
-		
+
 		<dependency>
-            <groupId>org.apache.shale</groupId>
-            <artifactId>shale-tiger</artifactId>
-            <version>1.0.4-SNAPSHOT</version>
-        </dependency>
-		
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-tiger</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+		</dependency>
 
 		<dependency>
 			<groupId>org.apache.shale</groupId>

Modified: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ComponentTreeModelAdapter.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ComponentTreeModelAdapter.java?view=diff&rev=474666&r1=474665&r2=474666
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ComponentTreeModelAdapter.java
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/ComponentTreeModelAdapter.java
Mon Nov 13 21:13:20 2006
@@ -1,12 +1,24 @@
+/*
+ * 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 org.apache.shale.tiger.managed.Bean;
 import org.apache.shale.tiger.managed.Scope;
 
-/**
- * @author Gary VanMatre
- * 
- */
 @Bean(name = "displayElementTree", scope = Scope.SESSION)
 public class ComponentTreeModelAdapter extends TreeModelAdapter {
     private static final long serialVersionUID = -6792244110698122858L;

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=474666&r1=474665&r2=474666
==============================================================================
--- 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
Mon Nov 13 21:13:20 2006
@@ -1,12 +1,13 @@
 /*
- * Copyright 2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
+ * 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.

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=474666&r1=474665&r2=474666
==============================================================================
--- 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
Mon Nov 13 21:13:20 2006
@@ -1,13 +1,43 @@
+/*
+ * 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.io.Serializable;
 import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
+import org.apache.myfaces.trinidad.event.FocusEvent;
+import org.apache.myfaces.trinidad.event.RangeChangeEvent;
+import org.apache.myfaces.trinidad.event.RowDisclosureEvent;
+import org.apache.myfaces.trinidad.event.SelectionEvent;
+import org.apache.shale.clay.config.beans.ActionListenerBean;
 import org.apache.shale.clay.config.beans.ComponentBean;
 import org.apache.shale.clay.config.beans.ConfigBean;
 import org.apache.shale.clay.config.beans.ConfigBeanFactory;
+import org.apache.shale.clay.config.beans.ConverterBean;
+import org.apache.shale.clay.config.beans.ValidatorBean;
+import org.apache.shale.clay.config.beans.ValueChangeListenerBean;
 import org.apache.shale.tiger.managed.Bean;
 import org.apache.shale.tiger.managed.Scope;
 import org.apache.shale.tiger.view.Prerender;
@@ -17,6 +47,16 @@
 @Bean(name="page3", scope=Scope.REQUEST)
 @View public class ShowDisplayElementBacking extends AbstractFacesBean {
 
+    /**
+     * <p>
+     * Common logger utility class.
+     * </p>
+     */
+    private static Log log;
+    static {
+        log = LogFactory.getLog(ShowDisplayElementBacking.class);
+    }
+
     private String showJsfid = null;
     
     @Prerender public void load() {
@@ -70,6 +110,7 @@
 
     
     public static class ComponentWrapper implements Serializable {
+      
        private ComponentBean bean = null;
        private List<ComponentWrapper> children = null;
        
@@ -78,9 +119,6 @@
        }
        
        public String getJsfid() {
-           if (bean.getJsfid().startsWith("/")) {
-              return bean.getJsfid().substring(1);
-           }
            return bean.getJsfid();
        }
        
@@ -95,20 +133,91 @@
        public String getId() {
            return bean.getId();
        }
-
-       public List<ComponentWrapper> getChildren() {
-           if (bean.getChildren().size() > 0) {
-               children = new ArrayList<ComponentWrapper>();
-               Iterator ci = bean.getChildrenIterator();
-               while (ci.hasNext()) {
-                   ComponentBean c = (ComponentBean) ci.next();
-                   children.add(new ComponentWrapper(c));
-               }
+       
+       public String getType() {
+           if (bean instanceof ValidatorBean) {
+               return "Validator";
+           } else if (bean instanceof ConverterBean) {
+               return "Converter";      
+           } else if (bean instanceof ActionListenerBean) {
+               return "ActionListener";
+           } else if (bean instanceof ValueChangeListenerBean) {
+               return "ValueChangeListener";
            }
-                  
-           return children;
+           
+           return "Component";
        }
-        
+
+       public List<ComponentWrapper> getChildren() {
+            List tmpList = new ArrayList<ComponentBean>();
+            Iterator ci = bean.getChildrenIterator();
+            while (ci.hasNext()) {
+                ComponentBean c = (ComponentBean) ci.next();
+                tmpList.add(new ComponentWrapper(c));
+            }
+
+            if (bean.getConverter() != null) {
+                tmpList.add(new ComponentWrapper(bean.getConverter()));
+            }
+            
+            ci = bean.getActionListenerIterator();
+            while (ci.hasNext()) {
+                ComponentBean c = (ComponentBean) ci.next();
+                tmpList.add(new ComponentWrapper(c));
+            }
+
+            ci = bean.getValidatorIterator();
+            while (ci.hasNext()) {
+                ComponentBean c = (ComponentBean) ci.next();
+                tmpList.add(new ComponentWrapper(c));
+            }
+
+            ci = bean.getValueChangeListenerIterator();
+            while (ci.hasNext()) {
+                ComponentBean c = (ComponentBean) ci.next();
+                tmpList.add(new ComponentWrapper(c));
+            }
+
+
+            if (tmpList.size() > 0) {
+                children = new ArrayList<ComponentWrapper>();
+                children.addAll(tmpList);
+            }
+
+            return children;
+        }
+
     };
     
+    public void rowDisclosureListener(RowDisclosureEvent event) {
+       log.info("fire --> rowDisclosureListener: " + event.toString());   
+        
+    }
+
+    public void attributeChangeListener(AttributeChangeEvent event) {
+        log.info("fire --> attributeChangeListener: " + event.toString());   
+         
+     }
+
+    public void selectionListener(SelectionEvent event) {
+        log.info("fire --> selectionListener: " + event.toString());   
+         
+     }
+
+    
+    public void focusListener(FocusEvent event) {
+        log.info("fire --> focusListener: " + event.toString());   
+         
+     }
+
+    public void rangeChangeListener(RangeChangeEvent event) {
+        log.info("fire --> rangeChangeListener: " + event.toString());   
+         
+     }
+
+    
+     public Date getCurrentTime() {
+        return Calendar.getInstance().getTime();
+     }
+
 }

Modified: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/TreeModelAdapter.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/TreeModelAdapter.java?view=diff&rev=474666&r1=474665&r2=474666
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/TreeModelAdapter.java
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/myfaces/trinidad/blank/TreeModelAdapter.java
Mon Nov 13 21:13:20 2006
@@ -1,3 +1,20 @@
+/*
+ * 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.beans.IntrospectionException;
@@ -7,6 +24,8 @@
 import org.apache.myfaces.trinidad.model.TreeModel;
 
 /**
+ * Note: Copied from the Trinidad Demo
+ * 
  * This class facilitates the construction of a ChildPropertyTreeModel instance
  * via managed-beans. ChildPropertyTreeModel does not have a no-arg constructor.
  * This class does, and so can be instantiated as a managed-bean. Two properties

Copied: shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
(from r473148, shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java)
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java?view=diff&rev=474666&p1=shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java&r1=473148&p2=shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java&r2=474666
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/AttributeChangeListenerCommand.java
(original)
+++ shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
Mon Nov 13 21:13:20 2006
@@ -1,21 +1,42 @@
 package org.apache.shale.clay.component.chain.trinidad;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.el.MethodBinding;
+import javax.faces.event.ActionEvent;
 
 import org.apache.commons.chain.Context;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.trinidad.component.UIXComponent;
 import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
+import org.apache.myfaces.trinidad.event.ChartDrillDownEvent;
+import org.apache.myfaces.trinidad.event.DisclosureEvent;
+import org.apache.myfaces.trinidad.event.FocusEvent;
+import org.apache.myfaces.trinidad.event.LaunchEvent;
+import org.apache.myfaces.trinidad.event.PollEvent;
+import org.apache.myfaces.trinidad.event.RangeChangeEvent;
+import org.apache.myfaces.trinidad.event.ReturnEvent;
+import org.apache.myfaces.trinidad.event.RowDisclosureEvent;
+import org.apache.myfaces.trinidad.event.SelectionEvent;
+import org.apache.myfaces.trinidad.event.SortEvent;
 import org.apache.shale.clay.component.chain.AbstractCommand;
 import org.apache.shale.clay.component.chain.AssignPropertiesCommand;
 import org.apache.shale.clay.component.chain.ClayContext;
 import org.apache.shale.clay.config.beans.AttributeBean;
 import org.apache.shale.clay.config.beans.ComponentBean;
+import org.apache.shale.util.PropertyHelper;
+
+public class PropertyListenerCommand extends AbstractCommand {
+  
+    /**
+     * <p>Holds a cross-reference of attribute name to formal parameter.</p>
+     */
+    private static Map methodBindAttrs = new HashMap();
 
-public class AttributeChangeListenerCommand extends AbstractCommand {
     /**
      * <p>
      * Common logger utility class.
@@ -23,17 +44,32 @@
      */
     private static Log log;
     static {
-        log = LogFactory.getLog(AttributeChangeListenerCommand.class);
-    }
+        log = LogFactory.getLog(PropertyListenerCommand.class);
+        
+        methodBindAttrs.put("attributeChangeListener", new Class[] {AttributeChangeEvent.class});
+        methodBindAttrs.put("focusListener", new Class[] {FocusEvent.class});
+        methodBindAttrs.put("rowDisclosureListener", new Class[] {RowDisclosureEvent.class});
+        methodBindAttrs.put("selectionListener", new Class[] {SelectionEvent.class});
+        methodBindAttrs.put("rangeChangeListener", new Class[] {RangeChangeEvent.class});
+        methodBindAttrs.put("sortListener", new Class[] {SortEvent.class});
+        methodBindAttrs.put("chartDrillDownListener", new Class[] {ChartDrillDownEvent.class});
+        methodBindAttrs.put("returnListener", new Class[] {ReturnEvent.class});
+        methodBindAttrs.put("launchListener", new Class[] {LaunchEvent.class});
+        methodBindAttrs.put("pollListener", new Class[] {PollEvent.class});
+        methodBindAttrs.put("disclosureListener", new Class[] {DisclosureEvent.class});
+        methodBindAttrs.put("previousActionListener", new Class[] {ActionEvent.class});
+        methodBindAttrs.put("nextActionListener", new Class[] {ActionEvent.class});
+        methodBindAttrs.put("nextAction", new Class[0]);
+        methodBindAttrs.put("previousAction", new Class[0]);
+    };
 
     /**
      * <p>
-     * Looks to see if the {@link AttributeBean} on the {@link ClayContext} is a
-     * <code>AttributeChangeListener</code> attribute. If it is, create a
+     * Looks to see if the {@link AttributeBean} on the {@link ClayContext} is one
+     * of the custom Trinidad method binding event attributes. If it is, create a
      * <code>MethodBinding</code> and assign it to the component returning a
      * <code>true</code> value. Otherwise, return a <code>false</code>
-     * value. This <code>Command</code> is invoked from the
-     * {@link AssignPropertiesCommand} chain.
+     * value. 
      * </p>
      *
      * @param context common chains
@@ -61,7 +97,8 @@
             throw new NullPointerException(getMessages().getMessage("clay.null.facesContext"));
         }
 
-        if (attributeBean.getName().equals("attributeChangeListener") && attributeBean.getValue()
!= null) {
+        Class[] formalParameter = (Class[]) methodBindAttrs.get(attributeBean.getName());
+        if (formalParameter != null && attributeBean.getValue() != null) {
             isFinal = true;
 
             UIComponent child = (UIComponent) clayContext.getChild();
@@ -74,12 +111,14 @@
                 String expr = replaceMnemonic(clayContext);
                 
                 MethodBinding mb = facesContext.getApplication()
-                        .createMethodBinding(expr, new Class[]{AttributeChangeEvent.class});
-                ((UIXComponent) child).setAttributeChangeListener(mb);
+                        .createMethodBinding(expr, formalParameter);
+                PropertyHelper propertyHelper = new PropertyHelper();
+                
+                propertyHelper.setValue(child, attributeBean.getName(), mb);
 
 
             } else {
-                log.error("Cannot bind attributeChangeListener expression to a"
+                log.error("Cannot bind " + attributeBean.getName() + " expression to a"
                         + " component not extending UIXComponent: " + attributeBean.toString());
             }
         }

Modified: shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=diff&rev=474666&r1=474665&r2=474666
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml (original)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml Mon Nov 13
21:13:20 2006
@@ -52,10 +52,65 @@
 				className="org.apache.shale.clay.parser.builder.chain.JsfDefaultBuilderRule"
 				prefix="trh" />
 		</chain>
-        <!-- defines a custom handler for the attributeChangeListener component method
binding event property -->
 		<chain name="attributeChangeListener">
 			<command
-				className="org.apache.shale.clay.component.chain.trinidad.AttributeChangeListenerCommand"
/>
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="rowDisclosureListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="selectionListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="focusListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="sortListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="rangeChangeListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="chartDrillDownListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="returnListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="launchListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="pollListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="disclosureListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="previousActionListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="nextActionListener">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="nextAction">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
+		</chain>
+		<chain name="previousAction">
+			<command
+				className="org.apache.shale.clay.component.chain.trinidad.PropertyListenerCommand" />
 		</chain>
 	</catalog>
 

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=474666&r1=474665&r2=474666
==============================================================================
--- shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html (original)
+++ shale/sandbox/shale-clay-trinidad/src/main/webapp/pages/showDisplayElement.html Mon Nov
13 21:13:20 2006
@@ -24,26 +24,43 @@
           xmlns:tr="http://myfaces.apache.org/trinidad" >
 
   <jsp:directive.page contentType="text/html;charset=utf-8"/>
+   <f:view>
     <tr:form id="form">
+    
        <tr:panelGroupLayout layout="vertical">
             <f:facet name="separator">
               <tr:separator />
             </f:facet>
-            <tr:panelGroupLayout layout="horizontal">   
-               <f:facet name="separator">
-                 <tr:separator />
-               </f:facet>
+                  
+            <tr:panelGroupLayout layout="horizontal">
 
-               <tr:selectOneChoice id="jsfid" required="true" label="Choose a Page:" value="#{@managed-bean-name.showJsfid}">
+              <tr:outputLabel for="currentTime" value="Last Full Page Submit Timestamp:"
/>
+              <tr:outputText id="currentTime" value="#{@managed-bean-name.currentTime}">
+                <f:convertDateTime pattern="MM/dd/yyyy hh:mm:ss"/>
+              </tr:outputText>
+
+            </tr:panelGroupLayout>
+          
+          <tr:panelPartialRoot id="ajax"> 
+            <tr:subform id="subform">
+            <tr:panelGroupLayout layout="horizontal">   
+               <tr:selectOneChoice id="jsfid" required="true" label="Choose a Page:" 
+                   value="#{@managed-bean-name.showJsfid}">
                  <f:selectItem itemLabel="Page 1" itemValue="/pages/index.html"/>
                  <f:selectItem itemLabel="Page 2" itemValue="/pages/page2.html"/>
                  <f:selectItem itemLabel="Page 3" itemValue="/pages/showDisplayElement.html"/>
                </tr:selectOneChoice>
-              <tr:commandLink text="Show" />    
+              <tr:commandLink id="showit" text="Show" partialSubmit="true"/>    
             </tr:panelGroupLayout>
-
     
-            <tr:treeTable id="tree" var="foo" value="#{displayElementTree.model}" summary="Component
Tree">
+            <tr:treeTable id="treeTable" var="foo" value="#{displayElementTree.model}"
summary="Component Tree" 
+                rowDisclosureListener="#{@managed-bean-name.rowDisclosureListener}"
+                attributeChangeListener="#{@managed-bean-name.attributeChangeListener}" 
+                selectionListener="#{@managed-bean-name.selectionListener}" 
+                focusListener="#{@managed-bean-name.focusListener}" 
+                rangeChangeListener="#{@managed-bean-name.rangeChangeListener}" 
+                partialTriggers="jsfid showit"
+                >
 
               <f:facet name="nodeStamp">
                 <tr:column>
@@ -59,6 +76,13 @@
 
               <tr:column>
                 <f:facet name="header">
+                  <h:outputText value="type"/>
+                </f:facet>
+                <tr:outputText value="#{foo.type}"/>
+              </tr:column>
+
+              <tr:column>
+                <f:facet name="header">
                   <h:outputText value="componentType"/>
                 </f:facet>
                 <tr:outputText value="#{foo.componentType}"/>
@@ -72,6 +96,33 @@
               </tr:column>
 
             </tr:treeTable>
+          </tr:subform>
+          
+              <tr:tree id="tree" var="foo" value="#{displayElementTree.model}" summary="Component
Tree" 
+                rowDisclosureListener="#{@managed-bean-name.rowDisclosureListener}"
+                attributeChangeListener="#{@managed-bean-name.attributeChangeListener}" 
+                selectionListener="#{@managed-bean-name.selectionListener}" 
+                focusListener="#{@managed-bean-name.focusListener}" 
+                partialTriggers="subform:jsfid subform:showit"
+                >
+
+              <f:facet name="nodeStamp">
+                 <tr:panelList rows="2">
+                    <tr:outputText value="#{foo.type}"/>
+                    <tr:outputText value="#{foo.jsfid}"/>
+                    <tr:outputText value="#{foo.componentType}"/>
+                    <tr:outputText value="#{foo.id}"/> 
+                    <tr:outputText value="#{foo.extends}"/>                       
               
+                 </tr:panelList>
+              </f:facet>
+              
+            </tr:tree>
+          
+         </tr:panelPartialRoot>
+
+         
         </tr:panelGroupLayout>
-      </tr:form>   
+        
+      </tr:form>
+    </f:view>   
 </jsp:root>



Mime
View raw message