<?xml version='1.0' encoding='UTF-8'?>
<section>
<sectioninfo>
<keywordset>
<keyword>items</keyword>
<keyword>rich:toolBarGroup</keyword>
<keyword>HtmlToolBarGroup</keyword>
</keywordset>
</sectioninfo>
  <section>
     <table>
	  <title>Component identification parameters </title>
      <tgroup cols="2">
	  <thead>
            <row>
                  <entry>Name</entry>
                  <entry>Value</entry>
            </row>
        </thead>
        <tbody>
          <row>
            <entry>component-type</entry>
            <entry>org.richfaces.ToolBarGroup</entry>
          </row>
          <row>
            <entry>component-class</entry>
            <entry>org.richfaces.component.html.HtmlToolBarGroup</entry>
          </row>
          <row>
            <entry>component-family</entry>
            <entry>org.richfaces.ToolBarGroup</entry>
          </row>
          <row>
            <entry>renderer-type</entry>
            <entry>org.richfaces.ToolBarGroupRenderer</entry>
		  </row>
		  <row>
			<entry>tag-class</entry>
            <entry>org.richfaces.taglib.ToolBarGroupTag</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </section>
  <section>
    <title>Creating the Component with a Page Tag</title>
    <para>To create the simplest variant on a page use the following syntax:</para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[...
    <rich:toolBar>
        ...
        <rich:toolBarGroup>
            <!--...Set of action or other JSF components-->
        </rich:toolBarGroup>
        <rich:toolBarGroup>
            <!--...Set of action or other JSF components-->
        </rich:toolBarGroup>
        ...
    </rich:toolBar>
...
]]></programlisting>
  </section>
  <section>
<title>Creating the Component Dynamically Using Java</title>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlToolBarGroup;
...
HtmlToolBarGroup myToolBarGroup = new HtmlToolBarGroup();
...
]]></programlisting>
  </section>
  
  
  <section>
    <title>Details of Usage</title>
	<para>A <property>toolBarGroup</property> is a wrapper component that groups <property>toolBar</property> content and facilitates creation of menu and tool bars. All components defined inside are located on a stylized bar with a possibility to group, arrange on the both bar sides, and place predefined separators between them.</para>
	<para>Separators are located between components with the help of the <emphasis 

><property>&quot;itemSeparator&quot;</property></emphasis> attribute with four
 predefined values:</para>
	  	<itemizedlist>
        <listitem><para>
          none
        </para></listitem>
        <listitem><para>
          line
        </para></listitem>
		<listitem><para>
		  square
		</para></listitem>
		<listitem><para>
		  disc
		</para></listitem>
      </itemizedlist>
	  <para>To control the group location inside, use the <emphasis 

><property>&quot;location&quot;</property></emphasis> attribute with left (DEFAULT) and right values.</para>
	  <para><emphasis role="bold">Example:</emphasis></para>
    <programlisting role="XML"><![CDATA[...
    <rich:toolBar itemSeparator="disc" width="500">
        <rich:toolBarGroup itemSeparator="line">
            <h:commandLink value="Command 1.1"/>
            <h:commandLink value="Command 2.1"/>
        </rich:toolBarGroup>
        <rich:toolBarGroup itemSeparator="line" location="right">
            <h:commandLink value="Command 1.2"/>
            <h:commandLink value="Command 2.2"/>
        </rich:toolBarGroup>
    </rich:toolBar>
...
]]></programlisting>
<para>The code result is the following:</para>
    <figure>
      <title>Stylized <emphasis role="bold"><property>&lt;rich:toolbarGroup&gt;</property></emphasis> with <emphasis 
        
        ><property>&quot;location&quot;</property></emphasis>, <emphasis 
          
          ><property>&quot;itemSeparator&quot;</property></emphasis> attributes</title>
<mediaobject> 
        <imageobject>
          <imagedata fileref="images/toolBarGroup2.png"/>
        </imageobject>
</mediaobject>
      </figure>
  </section>
  <section>
    <title>Look-and-Feel Customization</title>
    
    <para>For skinnability implementation, the components use a <emphasis>
      <property>style class redefinition method.</property>
    </emphasis> Default style classes are mapped on <emphasis>
      <property>skin parameters.</property>
    </emphasis></para>
    
    <para>There are two ways to redefine the appearance of all <emphasis role="bold">
      <property>&lt;rich:toolBarGroup&gt;</property>
    </emphasis> components at once:</para>
    
    <itemizedlist>
      <listitem>
        <para>Redefine the corresponding skin parameters</para>
      </listitem>
      
      <listitem>
        <para>Add to your style sheets <emphasis>
          <property>style classes</property>
        </emphasis> used by a <emphasis role="bold">
          <property>&lt;rich:toolBarGroup&gt;</property>
        </emphasis> component</para>
      </listitem>
    </itemizedlist>
  </section>
  <section>
    <title>Definition of Custom Style Classes</title>    
    <para>It’s possible to change styles of particular <emphasis role="bold"
      ><property>&lt;rich:toolBarGroup&gt;</property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"
        ><property>&lt;rich:toolBarGroup&gt;</property></emphasis> <property>styleClass</property> attributes. An example is placed below:</para>
    
    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="CSS"><![CDATA[...
.myClass{
        font-style: italic;
}
...]]></programlisting>  
    <para>The <emphasis><property>&quot;styleClass&quot;</property></emphasis> attribute for <emphasis role="bold"
      ><property>&lt;rich:toolBarGroup&gt;</property></emphasis> is defined as it’s shown in the example below:</para>
    
    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[<rich:toolBarGroup ... styleClass="myClass"/>
]]></programlisting>    
    
    <para>This is a result:</para>
    
    <figure>
      <title>Redefinition styles with own classes and <emphasis><property>&quot;styleClass&quot;</property></emphasis> attributes</title>
      <mediaobject>
        <imageobject>
          <imagedata fileref="images/toolBarGroup_oc.png"/>
        </imageobject>
      </mediaobject>
    </figure>  
    
    <para>As it could be seen on the picture above,font style for first toolBarGroup was changed.</para>    
  </section>
  <section>
    <title>Relevant resources links</title>
    <para>
      Some additional information about usage of component can be found 
      <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/toolBar.jsf?c=toolBar">here</ulink>.
    </para>
  </section>
</section>