From richfaces-svn-commits at lists.jboss.org Thu Aug 2 11:35:05 2007 Content-Type: multipart/mixed; boundary="===============2780721481889877965==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r2014 - trunk/docs/userguide/en/src/main/docbook/included. Date: Thu, 02 Aug 2007 11:35:04 -0400 Message-ID: --===============2780721481889877965== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: vkorluzhenko Date: 2007-08-02 11:35:04 -0400 (Thu, 02 Aug 2007) New Revision: 2014 Added: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml Log: http://jira.jboss.com/jira/browse/RF-445 Added: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml = (rev 0) +++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-08= -02 15:35:04 UTC (rev 2014) @@ -0,0 +1,227 @@ + +
+ + + dropDownMenu + + + + + Component identification parameters + + + + + Name + + Value + + + + + + component-type + + org.richfaces.PanelMenu + + + + component-class + + org.richfaces.component.html.HtmlPanelMenu + + + + component-family + + org.richfaces.PanelMenu + + + + renderer-type + + org.richfaces.PanelMenuRenderer + + + + tag-class + + org.richfaces.taglib.PanelMenuTag + + + +
+ +
+ Creating the Component with a Page Tag + + To create the simplest variant on the page use the following syn= tax: + + + + Example: + + ... + <rich:panelMenu event=3D"onmouseover"> + <!--Nested panelMenu components--> + </rich:panelMenu> +... +
+ +
+ Creating the Component Dynamically Using Java + + + Example: + + ... + org.richfaces.component.html.HtmlpanelMenu mypanelMenu =3D new org.= richfaces.component.html.HtmlpanelMenu(); +... +
+ +
+ Details of Usage + + All attributes are not required. + Use "event" attribute to define an event for appearanc= e of + collapsing/expanding sublevels. Default value is "onclick"= . An example could + be seen below. + + + Example: + + ... + <rich:panelMenu event=3D"onmouseover"> + <!--Nested panelMenu components--> + </rich:panelMenu> +... + + Switching mode could be chosen with the "mode" attribu= te for all + panelMenu items except ones where this attribute was redefined. By d= efault all items send + traditional request. + The "expandMode" attribute defines the submission mode= s for all + collapsing/expanding panelMenu groups except ones where this attribu= te was redefined. + The "mode" and "expandMode" attributes could= be used + with three possible parameters. + + + + Server (default) + + + + The common submission of the form is performed and a page is com= pletely refreshed. + + + + Ajax + + + + An Ajax form submission is performed additionally specified elem= ents in the + "reRender" attribute are reRendered. + + + + None + + + + "Action" and "ActionListener" attributes are= ignored. + Items don't fire any submits itself. Behavior is fully defined = by the components + nested to items. Groups expand on the client side. + + + Example: + + ... + <rich:panelMenu event=3D"onclick" submitMode=3D"none"> + < rich:panelMenuItem label=3D"Link to external page"> + <h:outputLink ... > + <rich:panelMenuItem> + </rich:panelMenu> +... + + Note: As the + <rich:panelMenu> + component doesn't provide its own form, use it betw= een + <h:form> and </h:form> tags. + + The "expandSingle" attribute is defined for expanding = more than one + submenu on the same level. The default value is "false". I= f it's + true the previously opened group on the top level closes before open= ing another one. See the + picture below. + +
+ Using the "expandSingle" attribute + + + + + + +
+ + The "selectedChild" attribute is used for defining the= name of the + selected group or item. An example for group is placed below: + + Here is an example: + + + Example: + + ... + <rich:panelMenu selectedChild=3D"thisChild"> + <rich:panelMenuGroup label=3D"Group1" name=3D"thisChild"> + <!--Nested panelMenu components--> + </rich:panelMenuGroup> + </rich:panelMenu> +... +
+ +
+ JavaScript API + In Java Script code for expanding/collapsing group element creat= ion it=E2=80=99s necessary to use + doExpand()/doCollapse() function. + + + JavaScript API + + + + + Function + + Description + + + + + + doExpand() + + Expand group element + + + + doCollapse() + + Collapse group element + + + +
+ +
+ + +
+ Look-and-Feel Customization + + As this component is just a wrapper for its children its provide= the only "rich-panel-menu" + class for wrapper div element. To redefine appearance of particular = panel menus, it's possible + to define your own CSS class. And then just define it in the compone= nts class attribute. + = +
+ +
--===============2780721481889877965==--