View Source

h2. Overview
_Since 3.1_

The multi-column submenu defines a submenu with multiple columns, defined by {{<ace:menuColumn>}}. It can be nested inside {{<ace:menuBar>}}, {{<ace:contextMenu>}}, and {{<ace:menu>}} in fly-out mode (tiered, non-sliding).

{tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=multiColumnSubmenuBean] of this component, complete with source code.{tip}



h2. Getting Started

Like the regular submenu, the multi-column submenu needs a label.

{panel}
{code:xml|borderStyle=dashed}<ace:dataExporter type="csv" target="myTable" fileName="tableData"/>

<ace:menuBar id="menubar" autoSubmenuDisplay="true">
<ace:multiColumnSubmenu label="Multi 1">
<ace:menuColumn width="200">
<ace:submenu label="Submenu 1.1">
<ace:menuItem value="Item 1.1.1">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.1.2">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
</ace:submenu>
<ace:submenu label="Submenu 1.2">
<ace:menuItem value="Item 1.2.1">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.2.2">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.2.3">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
</ace:submenu>
</ace:menuColumn>
<ace:menuColumn>
<ace:submenu label="Submenu 1.3">
<ace:menuItem value="Item 1.3.1">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.3.2">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.3.3">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.3.4">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
<ace:menuItem value="Item 1.3.5">
<ace:ajax event="activate" execute="@this" render="@form" />
</ace:menuItem>
</ace:submenu>
</ace:menuColumn>
</ace:multiColumnSubmenu>
</ace:menuBar>
{code}
{panel}

h2. Attributes

{tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://res.icesoft.org/docs/v4_latest/ace/tld/ace/multiColumnSubmenu.html].{tip}

{panel}
*label* Sets the label of the submenu.
{panel}
{panel}
*icon* Sets the CSS class name that contains the styling to display an icon.
{panel}
{panel}
*disabled* Disables/enables the submenu.
{panel}
{panel}
*positionTop* Specifies a 'top' position (in pixels) that will override the automatic positioning of the submenu. This value is relative to the 'top' position of the submenu label or of the menu bar (see 'relativeTo' attribute). A negative value means that this custom position is above the reference point, while and positive value means that this custom position is below.
{panel}
{panel}
*positionLeft* Specifies a 'left' position (in pixels) that will override the automatic positioning of the submenu. This value is relative to the 'left' position of the submenu label or of the menu bar (see 'relativeTo' attribute). A negative value means that this custom position is to the left the reference point, while and positive value means that this custom position is to the right.
{panel}
{panel}
*relativeTo* Specifies whether the 'positionLeft' and 'positionRight' attributes are relative to the submenu label or the menu bar. It also affects centering when using the value 'center' in 'direction. Possible values are 'label' and 'menubar'. The default value is 'label'.
{panel}

h2. Client Behavior Events

None.

h2. JavaScript APIs

Not applicable.

h2. Keyboard and ARIA Support

The following ARIA roles are supported: menuitem.

h2. CSS Classes

The following markup represents the basic HTML structure of the component and the CSS classes it uses.

{code:xml}
<!-- Root container (inside ace:menuBar or ace:contextMenu) -->
<li class="ui-widget wijmo-wijmenu-item ui-state-default ui-corner-all wijmo-wijmenu-parent">
<!-- Label in menu bar -->
<a class="wijmo-wijmenu-link ui-corner-all ui-state-active">
<span class="wijmo-wijmenu-text">
<span class="wijmo-wijmenu-text [user defined classes]" style="[user defined styles]">Multi-column submenu title</span>
</span>
<span class="ui-icon ui-icon-triangle-1-s"></span>
</a>
<!-- Multi-column submenu container -->
<div class="wijmo-wijmenu ui-menu-multicolumn wijmo-wijmenu-list ui-widget-content ui-corner-all ui-helper-clearfix wijmo-wijmenu-child wijmo-wijmenu-flyout">
<div class="ui-menu-multicolumn-header"><div></div></div>
<div>
<ul>
<!-- Submenu -->
<li class="ui-widget-header ui-corner-all"><h3>Submenu title</h3></li>
<!-- Menu item -->
<li class="ui-widget wijmo-wijmenu-item ui-state-default ui-corner-all">
<a class="wijmo-wijmenu-link ui-corner-all">
<span class="wijmo-wijmenu-text">
<span class="wijmo-wijmenu-text">Menu item title</span>
</span>
</a>
</li>
</ul>
</div>
<div class="ui-menu-multicolumn-footer"><div></div></div>
</div>
</li>
{code}

h2. Known Issues

None.