You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by to...@apache.org on 2006/04/18 23:28:28 UTC

svn commit: r395048 - in /myfaces/tomahawk/trunk: core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/ core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/ core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnav...

Author: tomsp
Date: Tue Apr 18 14:28:26 2006
New Revision: 395048

URL: http://svn.apache.org/viewcvs?rev=395048&view=rev
Log:
new attribute "renderAll" for panelNavigation2

Added:
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/resource/
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/resource/HMenuIEHover.js
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_4.jsp
Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java
    myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_column_attributes.xml
    myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_panel_navigation_2_attributes.xml
    myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/css/basic.css
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlCommandNavigationItem.java Tue Apr 18 14:28:26 2006
@@ -97,6 +97,11 @@
         if (! super.isRendered()) {
             return false;
         }
+                
+        HtmlPanelNavigationMenu parentPanelNavMenu = getParentPanelNavigation();
+        if (parentPanelNavMenu != null && parentPanelNavMenu.isRenderAll())
+            return true;
+        
         UIComponent parent = getParent();
         while (parent != null)
         {
@@ -125,25 +130,26 @@
     {
         UIComponent parent = getParent();
 
-            // search HtmlPanelNavigation
-            UIComponent p = parent;
-            while (p != null && !(p instanceof HtmlPanelNavigationMenu))
-            {
-                p = p.getParent();
-            }
-            // p is now the HtmlPanelNavigation
-           if (!(p instanceof HtmlPanelNavigationMenu))
-                {
-                    log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
-                    return null;
-                }
+        // search HtmlPanelNavigation
+        UIComponent p = parent;
+        while (p != null && !(p instanceof HtmlPanelNavigationMenu))
+        {
+            p = p.getParent();
+        }
+        // p is now the HtmlPanelNavigation
+        if (!(p instanceof HtmlPanelNavigationMenu))
+        {
+            log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
+            return null;
+        }
+        
         return (HtmlPanelNavigationMenu) p;
     }
 
     public void toggleOpen()
     {
         HtmlPanelNavigationMenu menu = getParentPanelNavigation();
-        if (isOpen() && menu != null && ! menu.isExpandAll() )
+        if (isOpen() && menu != null && !menu.isExpandAll() )
         {
             if (getChildCount() > 0)
             {
@@ -169,27 +175,27 @@
                 p = p.getParent();
             }
             // p is now the HtmlPanelNavigation
-           if (!(p instanceof HtmlPanelNavigationMenu))
+            if (!(p instanceof HtmlPanelNavigationMenu))
+            {
+                log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
+            }
+            else
+            {
+                if (!hasCommandNavigationChildren() || ((HtmlPanelNavigationMenu) p).isExpandAll())
                 {
-                    log.error("HtmlCommandNavigation without parent HtmlPanelNavigation ?!");
+                    //item is an end node or Menu always expanded --> deactivate all other nodes, and then...
+
+                    //deactivate all other items
+                    deactivateAllChildren(p.getChildren().iterator());
+                    //...activate this item
+                    setActive(true);
                 }
                 else
                 {
-                    if (!hasCommandNavigationChildren() || ((HtmlPanelNavigationMenu) p).isExpandAll())
-                    {
-                        //item is an end node or Menu always expanded --> deactivate all other nodes, and then...
-
-                        //deactivate all other items
-                        deactivateAllChildren(p.getChildren().iterator());
-                        //...activate this item
-                        setActive(true);
-                    }
-                    else
-                    {
-                        //open item
-                        setOpen(true);
-                    }
+                    //open item
+                    setOpen(true);
                 }
+            }
         }
     }
 

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRenderer.java Tue Apr 18 14:28:26 2006
@@ -34,6 +34,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import org.apache.myfaces.renderkit.html.util.AddResource;
+import org.apache.myfaces.renderkit.html.util.AddResourceFactory;
 
 /**
  * Many thanks to the guys from Swiss Federal Institute of Intellectual Property & Marc Bouquet
@@ -48,7 +50,9 @@
     public static final String RENDERER_TYPE = "org.apache.myfaces.NavigationMenu";
 
     private static final Integer ZERO_INTEGER = new Integer(0);
-
+    
+    private static final String HORIZ_MENU_SCRIPT = "HMenuIEHover.js";
+    
     public boolean getRendersChildren()
     {
         return true;
@@ -66,7 +70,7 @@
     public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException
     {
         if (component instanceof HtmlCommandNavigationItem)
-        {
+        {             
             //HtmlCommandNavigationItem
             super.encodeBegin(facesContext, component);
         }
@@ -82,7 +86,7 @@
     }
 
     public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
-    {
+    {        
         if (component instanceof HtmlCommandNavigationItem)
         {
             //HtmlCommandNavigationItem
@@ -91,6 +95,7 @@
         }
         RendererUtils.checkParamValidity(facesContext, component, HtmlPanelNavigationMenu.class);
         HtmlPanelNavigationMenu panelNav = (HtmlPanelNavigationMenu)component;
+        
         if (HtmlNavigationMenuRendererUtils.isListLayout(panelNav))
         {
             boolean preprocess = true;
@@ -158,7 +163,7 @@
                     HtmlCommandNavigationItem item = (HtmlCommandNavigationItem) panelNav.findComponent(uiComponent.getClientId(facesContext));
                     if (item != null)
                     {
-                        if(item.getActiveDirectly()!=null)
+                        if (item.getActiveDirectly() != null)
                         {
                             item.setActive(prevItem.isActive());
                         }
@@ -167,7 +172,7 @@
                             copyValueBinding(prevItem, item, "active");
                         }
 
-                        if(item.getOpenDirectly()!=null)
+                        if (item.getOpenDirectly() != null)
                         {
                             item.setOpen(prevItem.isOpen());
                         }
@@ -176,8 +181,9 @@
                             copyValueBinding(prevItem, item, "open");
                         }
 
-                        if(!panelNav.isExpandAll() || prevItem.isActive() )
-                        item.toggleOpen();
+                        if (!panelNav.isExpandAll() || prevItem.isActive())
+                            item.toggleOpen();
+                        
                         if (prevItem.isOpen())
                             restoreOpenActiveStates(facesContext, panelNav, prevItem.getChildren());
                     }
@@ -203,17 +209,23 @@
 
     protected void renderListLayout(FacesContext facesContext, HtmlPanelNavigationMenu panelNav) throws IOException
     {
+        if (panelNav.isRenderAll())
+            addResourcesToHeader(facesContext);
+         
         ResponseWriter writer = facesContext.getResponseWriter();
         if (panelNav.getChildCount() > 0)
         {
             HtmlRendererUtils.writePrettyLineSeparator(facesContext);
             writer.startElement(HTML.UL_ELEM, panelNav);
+            
             HtmlRendererUtils.renderHTMLAttributes(writer, panelNav, HTML.UL_PASSTHROUGH_ATTRIBUTES);
+            
             //iterate over the tree and set every item open if expandAll
-            if(panelNav.isExpandAll())
+            if (panelNav.isExpandAll())
             {
                 expandAll(panelNav);
             }
+            
             HtmlNavigationMenuRendererUtils.renderChildrenListLayout(facesContext, writer, panelNav, panelNav.getChildren(), 0);
 
             HtmlRendererUtils.writePrettyLineSeparator(facesContext);
@@ -248,6 +260,12 @@
         {
             if (log.isWarnEnabled()) log.warn("PangelNavaigationMenu without children.");
         }
+    }          
+    
+    private void addResourcesToHeader(FacesContext context)
+    {
+         AddResource addResource = AddResourceFactory.getInstance(context);
+         addResource.addJavaScriptAtPosition(context, AddResource.HEADER_BEGIN, HtmlPanelNavigationMenu.class, HORIZ_MENU_SCRIPT);
     }
 
     /**
@@ -573,7 +591,8 @@
     }
 
     private void expandAll(UIComponent parent)
-    {   //Recurse over all Children setOpen if child is HtmlCommandNavigationItem
+    {   
+        //Recurse over all Children setOpen if child is HtmlCommandNavigationItem
         if(parent instanceof HtmlCommandNavigationItem)
         {
             HtmlCommandNavigationItem navItem = (HtmlCommandNavigationItem) parent;
@@ -586,7 +605,5 @@
             child =  (UIComponent) children.get(i);
             expandAll(child);
         }
-
     }
-
 }

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java Tue Apr 18 14:28:26 2006
@@ -55,7 +55,7 @@
     {
         for (Iterator it = children.iterator(); it.hasNext(); )
         {
-            UIComponent child = (UIComponent)it.next();
+            UIComponent child = (UIComponent)it.next();            
             if (!child.isRendered()) continue;
             if (child instanceof UINavigationMenuItem)
             {
@@ -65,11 +65,12 @@
             {
                 //navigation item
                 HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-
+                
                 HtmlCommandNavigationItem navItem = (HtmlCommandNavigationItem) child;
+                
                 String style = HtmlNavigationMenuRendererUtils.getNavigationItemStyle(panelNav, navItem);
                 String styleClass = HtmlNavigationMenuRendererUtils.getNavigationItemClass(panelNav, navItem);
-
+                                
                 writer.startElement(HTML.LI_ELEM, panelNav);
                 HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, style, styleClass);
 
@@ -82,7 +83,11 @@
 
                 if (hasCommandNavigationItemChildren(navItem))
                 {
-                    writer.startElement(HTML.UL_ELEM, panelNav);
+                    writer.startElement(HTML.UL_ELEM, panelNav);   
+                    
+                    if (panelNav.isRenderAll())
+                        HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, navItem.getStyle(), navItem.getStyleClass());
+                    
                     //HtmlRendererUtils.renderHTMLAttributes(writer, panelNav, HTML.UL_PASSTHROUGH_ATTRIBUTES);
                     renderChildrenListLayout(facesContext, writer, panelNav, child.getChildren(), level + 1);
                     writer.endElement(HTML.UL_ELEM);
@@ -188,9 +193,7 @@
         }
         writer.write(buf.toString());
     }
-
-
-
+    
     public static String getNavigationItemStyle(HtmlPanelNavigationMenu navPanel, HtmlCommandNavigationItem navItem)
     {
         if (navItem.isActive())
@@ -211,14 +214,13 @@
                                                 HtmlCommandNavigationItem navItem)
     {
         // MYFACES-117, if a styleClass is supplied for a HtmlCommandNavigationItem,
-        // panelNavigation active/open/normal styles for items will be overriden
+        // panelNavigation active/open/normal styles for items will be overriden                       
         if (navItem.getStyleClass() != null)
         {
             return navItem.getStyleClass();
         }
-
         if (navItem.isActive())
-        {
+        {            
             return navPanel.getActiveItemClass();
         }
         else if (navItem.isOpen())

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java Tue Apr 18 14:28:26 2006
@@ -119,7 +119,8 @@
     private String _separatorStyle = null;
     private String _layout = null;
     private Boolean _preprocessed = Boolean.FALSE;
-    private Boolean _expandAll;
+    private Boolean _expandAll = null;
+    private Boolean _renderAll = null;
 
     public HtmlPanelNavigationMenu()
     {
@@ -261,6 +262,19 @@
     {
         _expandAll = expandAll ? Boolean.TRUE : Boolean.FALSE;
     }
+    
+    public boolean isRenderAll()
+    {
+        if (_renderAll != null) return _renderAll.booleanValue();
+        ValueBinding vb = getValueBinding("renderAll");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null && v.booleanValue();
+    }
+
+    public void setRenderAll(boolean renderAll)
+    {
+        _renderAll = renderAll ? Boolean.TRUE : Boolean.FALSE;
+    }
 
     public boolean isDisabled()
     {
@@ -301,7 +315,7 @@
 
     public Object saveState(FacesContext context)
     {
-        Object values[] = new Object[15];
+        Object values[] = new Object[16];
         values[0] = super.saveState(context);
         values[1] = _itemClass;
         values[2] = _openItemClass;
@@ -317,6 +331,7 @@
         values[12] = _disabled;
         values[13] = _disabledStyle;
         values[14] = _disabledStyleClass;
+        values[15] = _renderAll;
         return values;
     }
 
@@ -338,5 +353,6 @@
         _disabled = (Boolean) values[12];
         _disabledStyle = (String) values[13];
         _disabledStyleClass = (String) values[14];
+        _renderAll = (Boolean) values[15];
     }
 }

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java Tue Apr 18 14:28:26 2006
@@ -55,6 +55,7 @@
     private String _separatorStyle;
     private String _layout;
     private String _expandAll;
+    private String _renderAll;
     private String _disabled;
     private String _disabledStyle;
     private String _disabledStyleClass;
@@ -98,6 +99,7 @@
         _width=null;
         _layout = null;
         _expandAll = null;
+        _renderAll = null;
     }
 
     // User Role support --> already handled by HtmlPanelGroupTag
@@ -117,6 +119,7 @@
         setStringProperty(component, "separatorStyle", _separatorStyle);
         setStringProperty(component, "layout", _layout);
         setBooleanProperty(component, "expandAll", _expandAll);
+        setBooleanProperty(component, "renderAll", _renderAll);
         setBooleanProperty(component, "disabled", _disabled);
         setStringProperty(component, "disabledStyle", _disabledStyle);
         setStringProperty(component, "disabledStyleClass", _disabledStyleClass);
@@ -248,6 +251,11 @@
     public void setExpandAll(String expandAll)
     {
         _expandAll = expandAll;
+    }
+    
+    public void setRenderAll(String renderAll)
+    {
+        _renderAll = renderAll;
     }
 
     public void setDisabled(String disabled)

Added: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/resource/HMenuIEHover.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/resource/HMenuIEHover.js?rev=395048&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/resource/HMenuIEHover.js (added)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/htmlnavmenu/resource/HMenuIEHover.js Tue Apr 18 14:28:26 2006
@@ -0,0 +1,24 @@
+startList = function() 
+{
+    if (document.all && document.getElementById) 
+    {
+        navDivRoot = document.getElementById("hNav_outer");
+        navRoot = navDivRoot.childNodes[0];    
+        for (i=0; i<navRoot.childNodes.length; i++) 
+        {
+            node = navRoot.childNodes[i];
+            if (node.nodeName=="LI") 
+            {
+                node.onmouseover=function() 
+                {
+                    this.className+=" over";
+                }
+                node.onmouseout=function() 
+                {
+                    this.className=this.className.replace(" over", "");
+                }
+            }
+        }
+    }
+}
+window.onload=startList;
\ No newline at end of file

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_column_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_column_attributes.xml?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_column_attributes.xml (original)
+++ myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_column_attributes.xml Tue Apr 18 14:28:26 2006
@@ -48,4 +48,10 @@
             <rtexprvalue>false</rtexprvalue>
             <description>This attribute can be used to set the width of the &lt;TD> elements</description>
         </attribute>
+        <attribute>
+            <name>groupBy</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>This attribute tells the datatable to group by data in this column</description>
+        </attribute>
 

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_panel_navigation_2_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_panel_navigation_2_attributes.xml?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_panel_navigation_2_attributes.xml (original)
+++ myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_panel_navigation_2_attributes.xml Tue Apr 18 14:28:26 2006
@@ -79,4 +79,13 @@
                 and never closed.
             </description>
         </attribute>
-        &ext_disabled_attribute;
\ No newline at end of file
+        <attribute>
+            <name>renderAll</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                If set to true all Items are rendered and other methods, like CSS
+                should be used to hide them as necesary
+            </description>
+        </attribute>
+        &ext_disabled_attribute;

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld (original)
+++ myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld Tue Apr 18 14:28:26 2006
@@ -913,10 +913,20 @@
 
             Unless otherwise specified, all attributes accept static values or EL expressions.
         </description>
+         <attribute>
+            <name>renderAll</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <type>java.lang.Boolean</type>
+            <description>
+                If set to true all Items are rendered and other methods, like CSS
+                should be used to hide them as necesary
+            </description>
+        </attribute>
         &ui_panel_attributes;
         &html_universal_attributes;
         &html_event_handler_attributes;
-	    &html_table_attributes;
+	&html_table_attributes;
         &tomahawk_panel_navigation_2_attributes;
     </tag>
 

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml Tue Apr 18 14:28:26 2006
@@ -135,7 +135,16 @@
         <managed-bean-class>org.apache.myfaces.examples.listexample.SimpleCountryList</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
-    
+
+    <!-- Managed Beans for simpleGroupBy.jsp -->
+
+    <managed-bean>
+        <managed-bean-name>simpleGroupBy</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.examples.listexample.SimpleGroupByList</managed-bean-class>
+        <managed-bean-scope>session</managed-bean-scope>
+    </managed-bean>
+
+
     <!-- Managed Beans for tree.jsp -->
 
     <managed-bean>
@@ -514,6 +523,8 @@
             <from-outcome>go_panelnavigation_3</from-outcome>
             <to-view-id>/panelnavigation_3.jsp</to-view-id>
         </navigation-case>
+
+
 
     </navigation-rule>
 

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/css/basic.css
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/css/basic.css?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/css/basic.css (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/css/basic.css Tue Apr 18 14:28:26 2006
@@ -417,6 +417,95 @@
 padding: 0px 0px 15px 0px;
 }
 
+/*
+   --------------------------------------------------------------
+    Horizontal Panelnavigation
+   --------------------------------------------------------------
+*/
+#hNav_outer {
+    margin: 0;
+    padding: 0;   
+    height: 60px;
+    width: 800px;
+}
+#hNav_outer ul {    
+    padding: 0;
+    margin: 0;    
+}
+#hNav_outer ul li ul {
+    margin: 0;
+    padding: 0;
+}
+#hNav_outer ul a {
+    text-decoration: none;
+}
+#hNav_outer ul li { /*float the main list items*/
+    margin: 0;
+    float: left;
+    display: block;
+    padding: 5px;
+}
+#hNav_outer ul li ul {
+    display: none;
+}
+#hNav_outer ul li.off ul, #hNav_outer ul li.on ul { /*put the subnav below*/
+    position: absolute;
+    top: 36px;
+    *top: 44px;/*reposition for IE*/    
+    background: #224d6f;    
+    left: 13px;
+    *left: 15px;
+    width: 740px;    
+}
+#hNav_outer ul li.on ul {    
+    display: block;
+    background: #f90;
+}
+#hNav_outer ul li.on:hover ul, #hNav_outer ul li.over ul { /*for ie*/
+    background: #224d6f;
+}
+#hNav_outer ul li a {
+    color: #224d6f;
+    font-weight: bold;
+    display: block;
+    padding: 5;
+}
+#hNav_outer ul li.on a {   
+    color: #fff;
+    background: #f90;
+}
+#hNav_outer ul li.on ul a, #hNav_outer ul li.off ul a {
+    float: left; /*ie doesn't inherit the float*/
+    border: 0;
+    color: #f90;
+    width: auto;    
+}
+#hNav_outer ul li.on:hover ul a, #hNav_outer ul li.over ul li a { /*for ie - the specificity is necessary*/
+    background: #224d6f;
+}
+#hNav_outer ul li.off:hover ul, #hNav_outer ul li.over ul {
+    display: block;
+    z-index: 6000;
+}		
+#hNav_outer ul li.off a:hover, #hNav_outer ul li:hover a, #hNav_outer ul li.over a {
+    background: #29497b;
+    color: #f90;
+}
+#hNav_outer ul li.off a:hover, #hNav_outer ul li.on a:hover { 
+    color: #f90;
+}		
+/*subnav formatting*/
+#hNav_outer ul li.off ul a {
+    display: block;
+    background: #224d6f;
+    color: #fff;    
+}		
+#hNav_outer ul li.on ul a {       
+    display: block;
+    background: #f90;
+    color: #fff;    
+}
+
 /**************************************************
  * css layers and classes for list navigation list
  **************************************************/

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp Tue Apr 18 14:28:26 2006
@@ -38,6 +38,7 @@
                     <h:outputLink value="openDataTable.jsf" ><f:verbatim>Paged and Sortable (dynamic number of columns; mouseover)</f:verbatim></h:outputLink>
                     <h:outputLink value="crossDataTable.jsf" ><f:verbatim>Dynamic number of columns, add a column</f:verbatim></h:outputLink>
                     <h:outputLink value="optDataTable.jsf" ><f:verbatim>Optional Header/Footer</f:verbatim></h:outputLink>
+                    <h:outputLink value="simpleGroupBy.jsf" ><f:verbatim>Group by columes</f:verbatim></h:outputLink>
                 </h:panelGrid>
                 <h:outputLink value="selectbox.jsf" ><f:verbatim>Select boxes</f:verbatim></h:outputLink>
                 <h:outputLink value="fileupload.jsf" ><f:verbatim>File upload</f:verbatim></h:outputLink>
@@ -49,6 +50,7 @@
                     <h:outputLink value="jscookmenu.jsf" ><f:verbatim>JSCookMenu</f:verbatim></h:outputLink>
                     <h:outputLink value="panelnavigation_1.jsf" ><f:verbatim>PanelNavigation Classic (Static JSP)</f:verbatim></h:outputLink>
                     <h:outputLink value="panelnavigation_2.jsf" ><f:verbatim>PanelNavigation with NavigationMenuItems (Dynamic)</f:verbatim></h:outputLink>
+                    <h:outputLink value="panelnavigation_4.jsf" ><f:verbatim>Horizontal PanelNavigation</f:verbatim></h:outputLink>
                 </h:panelGrid>
                 <h:outputLink value="jslistener.jsf" ><f:verbatim>Javascript Listener</f:verbatim></h:outputLink>
                 <h:outputLink value="date.jsf" ><f:verbatim>Date</f:verbatim></h:outputLink>

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp?rev=395048&r1=395047&r2=395048&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_2.jsp Tue Apr 18 14:28:26 2006
@@ -34,7 +34,7 @@
     <t:div id="subnavigation_outer">
     <t:div id="subnavigation">
     <t:panelNavigation2 id="nav1" layout="list" itemClass="mypage" activeItemClass="selected"
-                         expandAll="true" disabledStyle="color:red;padding: 2px 20px 2px 25px">
+                         disabledStyle="color:red;padding: 2px 20px 2px 25px">
         <t:navigationMenuItems id="navitems" value="#{navigationMenu.panelNavigationItems}" />
     </t:panelNavigation2>
     </t:div>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_4.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_4.jsp?rev=395048&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_4.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/panelnavigation_4.jsp Tue Apr 18 14:28:26 2006
@@ -0,0 +1,70 @@
+
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<html>
+
+<%@include file="inc/head.inc"%>
+
+<!--
+/*
+ * Copyright 2004 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
+ *
+ *      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.
+ */
+//-->
+
+<body>
+<f:view>
+            
+    <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages"
+		  var="example_messages" />
+    
+    <t:div id="hNav_outer">  
+        <t:panelNavigation2 id="nav1" layout="list" itemClass="off" activeItemClass="on" openItemClass="on" renderAll="true">
+            <t:commandNavigation2 value="#{example_messages['panelnav_products']}" style="padding-left: 0px;">
+                <t:commandNavigation2>
+                    <f:verbatim>&#8250; </f:verbatim>
+                    <t:outputText value="#{example_messages['panelnav_serach1']}" />
+                </t:commandNavigation2>
+                <t:commandNavigation2>
+                    <f:verbatim>&#8250; </f:verbatim>
+                    <t:outputText value="#{example_messages['panelnav_serach_acc1']}" />
+                </t:commandNavigation2>
+                <t:commandNavigation2 >
+                    <f:verbatim>&#8250; </f:verbatim>
+                    <t:outputText value="#{example_messages['panelnav_search_adv1']}" />
+                </t:commandNavigation2>
+            </t:commandNavigation2>
+            <t:commandNavigation2 value="#{example_messages['panelnav_shop']}"/>
+            <t:commandNavigation2 value="#{example_messages['panelnav_corporate']}" style="padding-left: 150px;">
+                <t:commandNavigation2>
+                    <f:verbatim>&#8250; </f:verbatim>
+                    <t:outputText value="#{example_messages['panelnav_news1']}" />
+                </t:commandNavigation2>
+                <t:commandNavigation2>
+                    <f:verbatim>&#8250; </f:verbatim>
+                    <t:outputText value="#{example_messages['panelnav_investor1']}" />
+                </t:commandNavigation2>
+            </t:commandNavigation2>
+            <t:commandNavigation2 value="#{example_messages['panelnav_contact']}"/>
+        </t:panelNavigation2>
+    </t:div>    
+
+</f:view>
+<%@include file="inc/page_footer.jsp"%>
+
+</body>
+
+</html>