Author: awiner
Date: Fri Apr 13 17:47:41 2007
New Revision: 528723

URL: http://svn.apache.org/viewvc?view=rev&rev=528723
Log:
PanelAccordion cleanup:
- Rename the component demos from showOneAccordion/showManyAccordion to 
panelAccordion
- Now that the renderer is "pure", move it into the core/xhtml and give it a 
standard name
- Improve the docs for panelAccordion just a bit

Added:
    
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/panelAccordion.jspx
      - copied unchanged from r528306, 
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/showOneAccordion.jspx
    
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/panelAccordion_discloseMany.jspx
      - copied unchanged from r528306, 
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/showManyAccordion.jspx
    
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java
      - copied, changed from r528715, 
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelAccordionRenderer.java
Removed:
    
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/showManyAccordion.jspx
    
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/components/showOneAccordion.jspx
    
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelAccordionRenderer.java
Modified:
    
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelAccordion.xml
    
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelAccordion.xml
    
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml

Modified: 
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelAccordion.xml
URL: 
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelAccordion.xml?view=diff&rev=528723&r1=528722&r2=528723
==============================================================================
--- 
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelAccordion.xml
 (original)
+++ 
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CorePanelAccordion.xml
 Fri Apr 13 17:47:41 2007
@@ -1,23 +1,23 @@
 <?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.
-          
--->
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+          
+-->
 <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee";
               xmlns:tr="http://myfaces.apache.org/trinidad";
               xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin";
@@ -36,25 +36,25 @@
     <xi:include href="includes/CoreJSEvents.xml" 
xpointer="/faces-config/component/*"/>
 
     <property>
-      <description>Indicates whether a minimum of one detail item must be 
disclosed at a time.  Use "false" (the default) to keep a minimum of one detail 
item disclosedat all times.  Use "true" to make it possible for zero detail 
items to be disclosed.
+      <description>Indicates whether a minimum of one detail item must be
+disclosed at a time.  Use "false" (the default) to keep a minimum of one
+detail item disclosed at all times.  Use "true" to make it possible for
+all items to be collapsed.
       </description>
       <property-name>discloseNone</property-name>
       <property-class>boolean</property-class>
       <default-value>false</default-value>
-      <property-extension>
-        <mfp:required>false</mfp:required>
-      </property-extension>
-    </property>
-    
-    <property>
-      <description>Indicates whether more than one detail item may be 
disclosed at a time.  Use "false" (the default) to keep a maximum of one detail 
item disclosed at all times.  Use "true" to make it possible for multiple 
detail items to be disclosed.
-      </description>
-      <property-name>discloseMany</property-name>
-      <property-class>boolean</property-class>
-      <default-value>false</default-value>
-      <property-extension>
-        <mfp:required>false</mfp:required>
-      </property-extension>
+    </property>
+    
+    <property>
+      <description>Indicates whether more than one detail item may be
+disclosed at a time.  Use "false" (the default) to keep a maximum of
+one detail item disclosed at all times.  Use "true" to make it
+possible for multiple detail items to be disclosed.
+      </description>
+      <property-name>discloseMany</property-name>
+      <property-class>boolean</property-class>
+      <default-value>false</default-value>
     </property>
 
     <component-extension>
@@ -62,11 +62,12 @@
       
<mfp:renderer-type>org.apache.myfaces.trinidad.Accordion</mfp:renderer-type>
       <mfp:tag-name>tr:panelAccordion</mfp:tag-name>
       
<mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.core.layout.CorePanelAccordionTag</mfp:tag-class>
-      <mfp:long-description><![CDATA[The panelAccordion control can be used to 
display a group of contents belonging to a showDetailItem.
-          Accordion bar(s) with panels representing showDetailItem children is 
displayed.
-          The panel for the showDetailItem that is selected to be shown is 
shown as expanded and contents of 
-          selected showDetailItem is displayed. If none of the showDetailItem 
children are selected, the first showDetailItem
-          that is enabled is considered to be selected.]]>
+      <mfp:long-description><![CDATA[The panelAccordion control can be used to
+display a group of contents belonging to a showDetailItem.  It supports
+both a one-item-at-a-time mode - the default - or multiple-items-at-a-time.
+The latter can be enabled by setting "discloseMany" to true.  Visually,
+an accordion looks like a series of accordion bars,
+with panels below the bar representing disclosed showDetailItem children.]]>
       </mfp:long-description>
       <mfp:example>
         <xhtml:p>The following is an example of panelAccordion.</xhtml:p>
@@ -86,13 +87,11 @@
         </tr:panelAccordion>]]>
         </mfp:source-code>
       </mfp:example>
-      <mfp:author>Ravi Baranwal</mfp:author>
       <mfp:component-metadata>
         <mfp:favorite-property>id</mfp:favorite-property>
         <mfp:group>${md:getTranslatedString("PALETTE_LAYOUT")}</mfp:group>
         <mfp:preferred-children>tr:showDetailItem</mfp:preferred-children>
       </mfp:component-metadata>
-      <mfp:uix2-local-name>panelPanel</mfp:uix2-local-name>
       <mfp:unsupported-agents>phone voice</mfp:unsupported-agents>
     </component-extension>
   </component>

Modified: 
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelAccordion.xml
URL: 
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelAccordion.xml?view=diff&rev=528723&r1=528722&r2=528723
==============================================================================
--- 
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelAccordion.xml
 (original)
+++ 
incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/PanelAccordion.xml
 Fri Apr 13 17:47:41 2007
@@ -1,23 +1,23 @@
 <?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.
-          
--->
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+          
+-->
 <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee";
               xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin";>
   <render-kit>
@@ -25,7 +25,7 @@
     <renderer>
       <component-family>org.apache.myfaces.trinidad.Panel</component-family>
       <renderer-type>org.apache.myfaces.trinidad.Accordion</renderer-type>
-      
<renderer-class>org.apache.myfaces.trinidadinternal.renderkit.html.layout.CorePanelAccordionRenderer</renderer-class>
+      
<renderer-class>org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelAccordionRenderer</renderer-class>
       <renderer-extension>
         
<mfp:component-type>org.apache.myfaces.trinidad.CorePanelAccordion</mfp:component-type>
         <mfp:unsupported-agents>phone voice</mfp:unsupported-agents>

Modified: 
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: 
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml?view=diff&rev=528723&r1=528722&r2=528723
==============================================================================
--- 
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml
 (original)
+++ 
incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml
 Fri Apr 13 17:47:41 2007
@@ -816,6 +816,8 @@
         <value>outputLabel.jspx</value>
         <value>outputText.jspx</value>
         <value>page.jspx</value>
+        <value>panelAccordion.jspx</value>
+        <value>panelAccordion_discloseMany.jspx</value>
         <value>panelBorderLayout.jspx</value>
         <value>panelBox.jspx</value>
         <value>panelButtonBar.jspx</value>
@@ -853,8 +855,6 @@
         <value>showDetail.jspx</value>
         <value>showDetailHeader.jspx</value>
         <value>showDetailItem.jspx</value>
-        <value>showManyAccordion.jspx</value>
-        <value>showOneAccordion.jspx</value>
         <value>panelChoice.jspx</value>
         <value>panelRadio.jspx</value>
         <value>panelTabbed.jspx</value>
@@ -2437,14 +2437,14 @@
     </navigation-case>
 
     <navigation-case>
-      <from-outcome>guide.showManyAccordion</from-outcome>
-      <to-view-id>/components/showManyAccordion.jspx</to-view-id>
+      <from-outcome>guide.panelAccordion_discloseMany</from-outcome>
+      <to-view-id>/components/panelAccordion_discloseMany.jspx</to-view-id>
       <redirect/>
     </navigation-case>
 
     <navigation-case>
-      <from-outcome>guide.showOneAccordion</from-outcome>
-      <to-view-id>/components/showOneAccordion.jspx</to-view-id>
+      <from-outcome>guide.panelAccordion</from-outcome>
+      <to-view-id>/components/panelAccordion.jspx</to-view-id>
       <redirect/>
     </navigation-case>
 

Copied: 
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java
 (from r528715, 
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelAccordionRenderer.java)
URL: 
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java?view=diff&rev=528723&p1=incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelAccordionRenderer.java&r1=528715&p2=incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java&r2=528723
==============================================================================
--- 
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelAccordionRenderer.java
 (original)
+++ 
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java
 Fri Apr 13 17:47:41 2007
@@ -16,11 +16,10 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.myfaces.trinidadinternal.renderkit.html.layout;
+package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
 import java.io.IOException;
 import java.util.List;
-import java.util.ListIterator;
 import java.util.Map;
 
 import javax.faces.component.UIComponent;
@@ -37,23 +36,15 @@
 import org.apache.myfaces.trinidad.context.RequestContext;
 import org.apache.myfaces.trinidad.event.DisclosureEvent;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-import org.apache.myfaces.trinidad.render.RenderUtils;
-
-import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer;
-import 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PartialPageUtils;
-import 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ShowDetailRenderer;
-import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
-import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
-import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer;
 
 /**
  * Renderer for PanelAccordion
  *
  * @version $Name:  $ ($Revision: 
adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/renderkit/html/layout/CoreShowOneAccordionRenderer.java#0
 $) $Date: 10-nov-2005.19:01:13 $
  */
-public class CorePanelAccordionRenderer extends XhtmlRenderer
+public class PanelAccordionRenderer extends XhtmlRenderer
 {
-  public CorePanelAccordionRenderer()
+  public PanelAccordionRenderer()
   {
     super(CorePanelAccordion.TYPE);
   }
@@ -515,7 +506,7 @@
   }
 
   private static final TrinidadLogger _LOG =
-    TrinidadLogger.createTrinidadLogger(CorePanelAccordionRenderer.class);
+    TrinidadLogger.createTrinidadLogger(PanelAccordionRenderer.class);
 
   private PropertyKey _discloseNoneKey;
   private PropertyKey _discloseManyKey;


Reply via email to