<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- saved from url=(0014)about:internet --> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0_19) on Sun Mar 20 20:56:37 PKT 2011 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
Menu (Click Extras API - v2.3.0) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.click.extras.control.Menu class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="Menu (Click Extras API - v2.3.0)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white"> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/click/extras/control/LongField.html" title="class in org.apache.click.extras.control"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html" title="class in org.apache.click.extras.control"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/click/extras/control/Menu.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="Menu.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.click.extras.control</FONT> | |
<BR> | |
Class Menu</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">org.apache.click.control.AbstractControl</A> | |
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.click.extras.control.Menu</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html" title="class or interface in org.apache.click">Control</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>Menu</B><DT>extends <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></DL> | |
</PRE> | |
<P> | |
Provides a hierarchical Menu control. | |
<table class='htmlHeader' cellspacing='10'> | |
<tr> | |
<td> | |
<img align='middle' hspace='2'src='menu.png' title='Menu'/> | |
</td> | |
</tr> | |
</table> | |
<h3><a name="configuration"></a>Configuration</h3> | |
Application menus are normally defined using a configuration file | |
(<tt>menu.xml</tt> by default) located under the <tt>/WEB-INF</tt> directory | |
or the root classpath. An example Menu configuration file is provided below. | |
<pre class="prettyprint"> | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<menu> | |
<menu label="Home" path="user/home.htm" roles="tomcat, role1"/> | |
<menu label="User" path="user/home.htm" roles="tomcat, role1"> | |
<menu label="User Page 1" path="user/user-1.htm" roles="tomcat, role1"/> | |
<menu label="User Page 2" path="user/user-2.htm" roles="tomcat, role1"/> | |
</menu> | |
<menu label="Admin" path="admin/admin-1.htm" roles="role1"> | |
<menu label="Admin Page 1" path="admin/admin-1.htm" roles="tomcat, role1"/> | |
<menu label="Admin Page 2" path="admin/admin-2.htm" roles="tomcat, role1"/> | |
</menu> | |
</menu> </pre> | |
Use a <A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html" title="class in org.apache.click.extras.control"><CODE>MenuFactory</CODE></A> to load the Menu items and include the root menu | |
item in your page: | |
<pre class="prettyprint"> | |
public class BorderPage extends Page { | |
private Menu rootMenu; | |
public BorderPage() { | |
MenuFactory menuFactory = new MenuFactory(); | |
rootMenu = menuFactory.getRootMenu(); | |
addControl(rootMenu); | |
} | |
@Override | |
public String getTemplate() { | |
return "/border-template.htm"; | |
} | |
} </pre> | |
<h3><a name="programmatic"></a>Programmatically defined menus</h3> | |
It is also possible to create Menus programmatically, for example: | |
<pre class="prettyprint"> | |
public class BorderPage extends Page { | |
private static class Menu rootMenu; | |
public BorderPage() { | |
if (rootMenu == null) { | |
rootMenu = new MenuBuilder().buildMenu(); | |
} | |
addControl(rootMenu); | |
} | |
} </pre> | |
<pre class="prettyprint"> | |
public class MenuBuilder() { | |
public Menu buildMenu() { | |
Menu rootMenu = new Menu("rootMenu"); | |
rootMenu.add(createMenu("Home", "home.htm")); | |
Menu customerMenu = createMenu("Home", "home.htm"); | |
rootMenu.add(customerMenu); | |
customerMenu.add(createMenu("Search Customers", "search-customers.htm")); | |
customerMenu.add(createMenu("Edit Customer", "edit-customer.htm")); | |
... | |
return rootMenu; | |
} | |
private Menu createMenu(String label, String path) { | |
Menu menu = new Menu(); | |
menu.setLabel(label); | |
menu.setPath(path); | |
menu.setTitle(label); | |
return menu; | |
} | |
}</pre> | |
<h3><a name="rendering"></a>Rendering</h3> | |
To render the configured Menu hierarchy you can reference the root menu by | |
its name in the Velocity template. For example: | |
<pre class="codeHtml"> | |
<span class="st">$rootMenu</span> </pre> | |
The hierarchical Menu structure is rendered as an HTML list: <ul>. | |
<p/> | |
Alternatively, you can render the menu using a Velocity #macro or Velocity | |
code in your template. For example: | |
<pre class="codeHtml"> | |
<span class="red">#</span>writeMenu(<span class="st">$rootMenu</span>) </pre> | |
An example menu Velocity macro is provided below: | |
<pre class="codeHtml"> | |
<span class="red">#macro</span>( writeMenu <span class="st">$rootMenu</span> ) | |
<table id="menuTable" border="0" width="100%" cellspacing="0" cellpadding="0" style="margin-top: 2px;"> | |
<tr> | |
<td> | |
<div id="searchbar"> | |
<div class="menustyle" id="menu"> | |
<ul class="menubar" id="dmenu"> | |
<span class="red">#foreach</span> (<span class="st">$topMenu</span> <span class="red">in</span> <span class="st">$rootMenu.children</span>) | |
<span class="red">#if</span> (<span class="st">$topMenu.isUserInRoles</span>() || <span class="st">$topMenu.isUserInChildMenuRoles</span>()) | |
<span class="red">#if</span> (<span class="st">$topMenu.children.empty</span>) | |
<li class="topitem"><span class="st">$topMenu</span></li> | |
<span class="red">#else</span> | |
<li class="topitem"><span class="st">$topMenu</span> | |
<ul class="submenu" | |
<span class="red">#foreach</span> (<span class="st">$subMenu</span> <span class="red">in</span> <span class="st">$topMenu.children</span>) | |
<span class="red">#if</span> (<span class="st">$subMenu.isUserInRoles</span>()) | |
><li><span class="st">$subMenu</span></li | |
<span class="red">#end</span> | |
<span class="red">#end</span> | |
></ul> | |
</li> | |
<span class="red">#end</span> | |
<span class="red">#end</span> | |
<span class="red">#end</span> | |
<span class="red">#if</span> (<span class="st">$request.remoteUser</span>) | |
<li class="topitem"><a href="<span class="st">$logoutLink.href</span>">Logout</a></li> | |
<span class="red">#end</span> | |
</ul> | |
</div> | |
</div> | |
</td> | |
</tr> | |
</table> | |
<span class="red">#end</span> </pre> | |
This example uses role path based security to only display the menu items | |
the user is authorized to see. If you are not using this security feature in | |
your application you should remove the macro <A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInRoles()"><CODE>isUserInRoles()</CODE></A> checks so | |
the menu items will be rendered. | |
<p/> | |
Note individual menu items will render themselves as simple anchor tags using | |
their <A HREF="../../../../../org/apache/click/extras/control/Menu.html#toString()"><CODE>toString()</CODE></A> method. For more fine grain control you should | |
extend your Velocity macro to render individual menu items. | |
<h3><a name="security"></a>Security</h3> | |
Menus support role based security via the <A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInRoles()"><CODE>isUserInRoles()</CODE></A> | |
method. When creating secure menus define the valid roles in the menu items. | |
For example: | |
<pre class="prettyprint"> | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<menu> | |
<menu label="Home" path="user/home.htm" roles="user,admin"> | |
<menu label="Home" path="user/home.htm" roles="user,admin"/> | |
<menu label="Search" path="user/search.htm" roles="user,admin"/> | |
</menu> | |
<menu label="Admin" path="admin/admin.htm"> | |
<menu label="Home" path="admin/admin.htm" roles="admin"/> | |
</menu> | |
</menu> </pre> | |
The underlying implementation of isUserInRoles() method is provided by an | |
<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security"><CODE>AccessController</CODE></A> interface. The default AccessController is provided | |
by the <A HREF="../../../../../org/apache/click/extras/security/RoleAccessController.html" title="class in org.apache.click.extras.security"><CODE>RoleAccessController</CODE></A> which uses the JEE container is user in | |
role facility. By providing your own AccessController you can have menu | |
access control using other security frameworks such as Spring | |
Security (Acegi) or Apache Shiro. | |
<h3><a name="config-dtd"></a>Menu Configuration DTD</h3> | |
The Menu config file DTD is provided below: | |
<pre class="codeConfig"> | |
<!-- The Menu (menu.xml) Document Type Definition. --> | |
<!ELEMENT <span class="red">menu</span> (<span class="st">menu</span>*)> | |
<!ATTLIST <span class="red">menu</span> <span class="st">id</span> ID #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">name</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">label</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">path</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">target</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">title</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">imageSrc</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">external</span> (true|false) "false"> | |
<!ATTLIST <span class="red">menu</span> <span class="st">separator</span> (true|false) "false"> | |
<!ATTLIST <span class="red">menu</span> <span class="st">roles</span> CDATA #IMPLIED> | |
<!ATTLIST <span class="red">menu</span> <span class="st">pages</span> CDATA #IMPLIED> </pre> | |
The Menu DTD is also published online at | |
<a href="http://click.apache.org/dtds/menu-2.2.dtd">http://click.apache.org/dtds/menu-2.2.dtd</a>. | |
<h3><a name="message-resources"></a>Message Resources and Internationalization (i18n)</h3> | |
Menus automatically pick up localized messages where applicable. Please see | |
the following methods on how to customize these messages: | |
<ul> | |
<li><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getLabel()"><CODE>getLabel()</CODE></A></li> | |
<li><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getTitle()"><CODE>getTitle()</CODE></A></li> | |
</ul> | |
<h3><a name="resources"></a>CSS and JavaScript resources</h3> | |
The Menu control makes use of the following resources | |
(which Click automatically deploys to the application directory, <tt>/click</tt>): | |
<ul> | |
<li><tt>click/menu.css</tt></li> | |
<li><tt>click/extras-control.js</tt></li> | |
</ul> | |
To import these Menu files simply reference the variables | |
<span class="blue">$headElements</span> and | |
<span class="blue">$jsElements</span> in the page template. | |
<P> | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security"><CODE>AccessController</CODE></A>, | |
<A HREF="../../../../../serialized-form.html#org.apache.click.extras.control.Menu">Serialized Form</A></DL> | |
<HR> | |
<P> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#accessController">accessController</A></B></CODE> | |
<BR> | |
The menu security access controller.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#children">children</A></B></CODE> | |
<BR> | |
The list of submenu items.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#DEFAULT_CONFIG_FILE">DEFAULT_CONFIG_FILE</A></B></CODE> | |
<BR> | |
The menu configuration filename: "<tt>/WEB-INF/menu.xml</tt>".</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#external">external</A></B></CODE> | |
<BR> | |
The menu path is to an external page flag, by default this value is false.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#imageSrc">imageSrc</A></B></CODE> | |
<BR> | |
The image src path attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#label">label</A></B></CODE> | |
<BR> | |
The menu display label.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#pages">pages</A></B></CODE> | |
<BR> | |
The list of valid page paths.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#path">path</A></B></CODE> | |
<BR> | |
The menu path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#roles">roles</A></B></CODE> | |
<BR> | |
The list of valid role names.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#rootMenu">rootMenu</A></B></CODE> | |
<BR> | |
The cached root Menu as defined in <tt>menu.xml</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#separator">separator</A></B></CODE> | |
<BR> | |
The menu separator flag.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#target">target</A></B></CODE> | |
<BR> | |
The target attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#title">title</A></B></CODE> | |
<BR> | |
The tooltip title attribute.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="fields_inherited_from_class_org.apache.click.control.AbstractControl"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Fields inherited from class org.apache.click.control.<A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#actionListener" title="class or interface in org.apache.click.control">actionListener</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#attributes" title="class or interface in org.apache.click.control">attributes</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#behaviors" title="class or interface in org.apache.click.control">behaviors</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#headElements" title="class or interface in org.apache.click.control">headElements</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#listener" title="class or interface in org.apache.click.control">listener</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#listenerMethod" title="class or interface in org.apache.click.control">listenerMethod</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#messages" title="class or interface in org.apache.click.control">messages</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#name" title="class or interface in org.apache.click.control">name</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#parent" title="class or interface in org.apache.click.control">parent</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#styles" title="class or interface in org.apache.click.control">styles</A></CODE></TD> | |
</TR> | |
</TABLE> | |
<A NAME="fields_inherited_from_class_org.apache.click.Control"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Fields inherited from interface org.apache.click.<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html" title="class or interface in org.apache.click">Control</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html#CONTROL_MESSAGES" title="class or interface in org.apache.click">CONTROL_MESSAGES</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> </CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#Menu()">Menu</A></B>()</CODE> | |
<BR> | |
Create a new Menu instance.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected </CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#Menu(org.w3c.dom.Element, org.apache.click.extras.security.AccessController)">Menu</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A> menuElement, | |
<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#buildMenu(org.w3c.dom.Element, org.apache.click.extras.security.AccessController, java.lang.Class)"><CODE>MenuFactory.buildMenu(org.w3c.dom.Element, org.apache.click.extras.security.AccessController, java.lang.Class)</CODE></A> | |
instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> </CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#Menu(java.lang.String)">Menu</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Create a new Menu instance with the given name.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#add(org.apache.click.extras.control.Menu)">add</A></B>(<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</CODE> | |
<BR> | |
Add the given menu as a submenu.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#canRender(org.apache.click.extras.control.Menu, int)">canRender</A></B>(<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</CODE> | |
<BR> | |
Return true if the given menu can be rendered, false otherwise.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#contains(org.apache.click.extras.control.Menu)">contains</A></B>(<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</CODE> | |
<BR> | |
Return true if this menu contains the given menu, false otherwise.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#findRootMenu()">findRootMenu</A></B>()</CODE> | |
<BR> | |
Find the root menu, or null if no root menu can be found.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getAccessController()">getAccessController</A></B>()</CODE> | |
<BR> | |
Return the menu access controller.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getChildren()">getChildren</A></B>()</CODE> | |
<BR> | |
Return list of of submenu items.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://click.apache.org/docs/click-api/org/apache/click/element/Element.html" title="class or interface in org.apache.click.element">Element</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getHeadElements()">getHeadElements</A></B>()</CODE> | |
<BR> | |
Return the Menu HEAD elements to be included in the page.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getHref()">getHref</A></B>()</CODE> | |
<BR> | |
Return the menu anchor HREF attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getImageSrc()">getImageSrc</A></B>()</CODE> | |
<BR> | |
Return the image src path attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getLabel()">getLabel</A></B>()</CODE> | |
<BR> | |
Return the menu item display label.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getPages()">getPages</A></B>()</CODE> | |
<BR> | |
Return the list of valid Page paths for the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getPath()">getPath</A></B>()</CODE> | |
<BR> | |
Return the path of the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getRoles()">getRoles</A></B>()</CODE> | |
<BR> | |
Return the list of roles for the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getRootMenu()">getRootMenu</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use <A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#getRootMenu()"><CODE>MenuFactory.getRootMenu()</CODE></A> instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getRootMenu(org.apache.click.extras.security.AccessController)">getRootMenu</A></B>(<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#getRootMenu(org.apache.click.extras.security.AccessController)"><CODE>MenuFactory.getRootMenu(org.apache.click.extras.security.AccessController)</CODE></A> | |
instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getSelectedChild()">getSelectedChild</A></B>()</CODE> | |
<BR> | |
Return the selected child menu, or null if no child menu is selected.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getTarget()">getTarget</A></B>()</CODE> | |
<BR> | |
Return the target attribute of the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#getTitle()">getTitle</A></B>()</CODE> | |
<BR> | |
Return the 'title' attribute of the Menu item, or null if not defined.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#hasChildren()">hasChildren</A></B>()</CODE> | |
<BR> | |
Return true if the menu contains any child submenus.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#hasRoles()">hasRoles</A></B>()</CODE> | |
<BR> | |
Return true if the menu has roles defined, false otherwise.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#isExternal()">isExternal</A></B>()</CODE> | |
<BR> | |
Return true if the menu path refers to an external resource.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#isRoot()">isRoot</A></B>()</CODE> | |
<BR> | |
Return true if this is the root menu, false otherwise.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#isSelected()">isSelected</A></B>()</CODE> | |
<BR> | |
Return true if the Menu item is selected.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#isSeparator()">isSeparator</A></B>()</CODE> | |
<BR> | |
Return true if the Menu item is a separator.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInChildMenuRoles()">isUserInChildMenuRoles</A></B>()</CODE> | |
<BR> | |
Return true if any child menus have the user in one of their menu roles.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInRoles()">isUserInRoles</A></B>()</CODE> | |
<BR> | |
Return true if the user is in one of the menu roles, or if any child | |
menus have the user in one of their menu roles.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#loadRootMenu(org.apache.click.extras.security.AccessController)">loadRootMenu</A></B>(<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#loadFromMenuXml(java.lang.String, java.lang.String, org.apache.click.extras.security.AccessController, java.lang.Class)"><CODE>MenuFactory.loadFromMenuXml(java.lang.String, java.lang.String, org.apache.click.extras.security.AccessController, java.lang.Class)</CODE></A> | |
instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#onDestroy()">onDestroy</A></B>()</CODE> | |
<BR> | |
This sets the parent to be null.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#render(org.apache.click.util.HtmlStringBuffer)">render</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Render an HTML representation of the Menu.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderMenuHref(org.apache.click.util.HtmlStringBuffer)">renderMenuHref</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Render the menu <tt>"href"</tt> attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderMenuLink(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu)">renderMenuLink</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</CODE> | |
<BR> | |
Render an HTML link (<a>) representation of the given menu.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderMenuList(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu, int)">renderMenuList</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</CODE> | |
<BR> | |
Render an html representation of the menu list (<ul>) structure.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderMenuListAttributes(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu, int)">renderMenuListAttributes</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</CODE> | |
<BR> | |
Render the attributes of the menu list (>ul<).</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderMenuListItemAttributes(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu, int)">renderMenuListItemAttributes</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</CODE> | |
<BR> | |
Render the attributes of the menu list item (>li<).</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderRootMenu(org.apache.click.util.HtmlStringBuffer)">renderRootMenu</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Render an HTML representation of the root menu.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderSeparator(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu)">renderSeparator</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</CODE> | |
<BR> | |
Render an HTML representation of the menu as a separator.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setAccessController(org.apache.click.extras.security.AccessController)">setAccessController</A></B>(<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</CODE> | |
<BR> | |
Set the menu access controller.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setExternal(boolean)">setExternal</A></B>(boolean value)</CODE> | |
<BR> | |
Set whether the menu path refers to an external resource.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setImageSrc(java.lang.String)">setImageSrc</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> src)</CODE> | |
<BR> | |
Set the image src path attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setLabel(java.lang.String)">setLabel</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> label)</CODE> | |
<BR> | |
Set the label of the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setPages(java.util.List)">setPages</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> pages)</CODE> | |
<BR> | |
Set the list of valid Page paths.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setPath(java.lang.String)">setPath</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path)</CODE> | |
<BR> | |
Set the path of the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setRoles(java.util.List)">setRoles</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> roles)</CODE> | |
<BR> | |
Set the list of valid roles for the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setSeparator(boolean)">setSeparator</A></B>(boolean separator)</CODE> | |
<BR> | |
Set whether the Menu item is a separator.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setTarget(java.lang.String)">setTarget</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> target)</CODE> | |
<BR> | |
Set the target attribute of the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#setTitle(java.lang.String)">setTitle</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> title)</CODE> | |
<BR> | |
Set the title attribute of the Menu item.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/control/Menu.html#toString()">toString</A></B>()</CODE> | |
<BR> | |
Return an HTML representation of the menu.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_org.apache.click.control.AbstractControl"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class org.apache.click.control.<A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#addBehavior(org.apache.click.Behavior)" title="class or interface in org.apache.click.control">addBehavior</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)" title="class or interface in org.apache.click.control">addStyleClass</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#appendAttributes(org.apache.click.util.HtmlStringBuffer)" title="class or interface in org.apache.click.control">appendAttributes</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#dispatchActionEvent()" title="class or interface in org.apache.click.control">dispatchActionEvent</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getActionListener()" title="class or interface in org.apache.click.control">getActionListener</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getAttribute(java.lang.String)" title="class or interface in org.apache.click.control">getAttribute</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getAttributes()" title="class or interface in org.apache.click.control">getAttributes</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getBehaviors()" title="class or interface in org.apache.click.control">getBehaviors</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getContext()" title="class or interface in org.apache.click.control">getContext</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getControlSizeEst()" title="class or interface in org.apache.click.control">getControlSizeEst</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getHtmlImports()" title="class or interface in org.apache.click.control">getHtmlImports</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getId()" title="class or interface in org.apache.click.control">getId</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getMessage(java.lang.String)" title="class or interface in org.apache.click.control">getMessage</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getMessage(java.lang.String, java.lang.Object...)" title="class or interface in org.apache.click.control">getMessage</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getMessages()" title="class or interface in org.apache.click.control">getMessages</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getName()" title="class or interface in org.apache.click.control">getName</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getPage()" title="class or interface in org.apache.click.control">getPage</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getParent()" title="class or interface in org.apache.click.control">getParent</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getStyle(java.lang.String)" title="class or interface in org.apache.click.control">getStyle</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getStyles()" title="class or interface in org.apache.click.control">getStyles</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getTag()" title="class or interface in org.apache.click.control">getTag</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#hasAttribute(java.lang.String)" title="class or interface in org.apache.click.control">hasAttribute</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#hasAttributes()" title="class or interface in org.apache.click.control">hasAttributes</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#hasBehaviors()" title="class or interface in org.apache.click.control">hasBehaviors</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#hasStyles()" title="class or interface in org.apache.click.control">hasStyles</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#isAjaxTarget(org.apache.click.Context)" title="class or interface in org.apache.click.control">isAjaxTarget</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#onDeploy(javax.servlet.ServletContext)" title="class or interface in org.apache.click.control">onDeploy</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#onInit()" title="class or interface in org.apache.click.control">onInit</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#onProcess()" title="class or interface in org.apache.click.control">onProcess</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#onRender()" title="class or interface in org.apache.click.control">onRender</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#removeBehavior(org.apache.click.Behavior)" title="class or interface in org.apache.click.control">removeBehavior</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#removeStyleClass(java.lang.String)" title="class or interface in org.apache.click.control">removeStyleClass</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)" title="class or interface in org.apache.click.control">renderTagBegin</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#renderTagEnd(java.lang.String, org.apache.click.util.HtmlStringBuffer)" title="class or interface in org.apache.click.control">renderTagEnd</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setActionListener(org.apache.click.ActionListener)" title="class or interface in org.apache.click.control">setActionListener</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setAttribute(java.lang.String, java.lang.String)" title="class or interface in org.apache.click.control">setAttribute</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setId(java.lang.String)" title="class or interface in org.apache.click.control">setId</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setListener(java.lang.Object, java.lang.String)" title="class or interface in org.apache.click.control">setListener</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setName(java.lang.String)" title="class or interface in org.apache.click.control">setName</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setParent(java.lang.Object)" title="class or interface in org.apache.click.control">setParent</A>, <A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setStyle(java.lang.String, java.lang.String)" title="class or interface in org.apache.click.control">setStyle</A></CODE></TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="DEFAULT_CONFIG_FILE"><!-- --></A><H3> | |
DEFAULT_CONFIG_FILE</H3> | |
<PRE> | |
protected static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>DEFAULT_CONFIG_FILE</B></PRE> | |
<DL> | |
<DD>The menu configuration filename: "<tt>/WEB-INF/menu.xml</tt>". | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.click.extras.control.Menu.DEFAULT_CONFIG_FILE">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="rootMenu"><!-- --></A><H3> | |
rootMenu</H3> | |
<PRE> | |
protected static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>rootMenu</B></PRE> | |
<DL> | |
<DD>The cached root Menu as defined in <tt>menu.xml</tt>. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="accessController"><!-- --></A><H3> | |
accessController</H3> | |
<PRE> | |
protected transient <A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> <B>accessController</B></PRE> | |
<DL> | |
<DD>The menu security access controller. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="children"><!-- --></A><H3> | |
children</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A>> <B>children</B></PRE> | |
<DL> | |
<DD>The list of submenu items. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="external"><!-- --></A><H3> | |
external</H3> | |
<PRE> | |
protected boolean <B>external</B></PRE> | |
<DL> | |
<DD>The menu path is to an external page flag, by default this value is false. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="imageSrc"><!-- --></A><H3> | |
imageSrc</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>imageSrc</B></PRE> | |
<DL> | |
<DD>The image src path attribute. If the image src is defined then a | |
<tt><img/></tt> element will rendered inside the link when | |
using the Menu <A HREF="../../../../../org/apache/click/extras/control/Menu.html#toString()"><CODE>toString()</CODE></A> method. | |
<p/> | |
If the image src value is prefixed with '/' then the request context path | |
will be prefixed to the src value when rendered by the control. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="label"><!-- --></A><H3> | |
label</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>label</B></PRE> | |
<DL> | |
<DD>The menu display label. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="pages"><!-- --></A><H3> | |
pages</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>pages</B></PRE> | |
<DL> | |
<DD>The list of valid page paths. If any of these page paths match the | |
current request then the Menu item will be selected. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="path"><!-- --></A><H3> | |
path</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>path</B></PRE> | |
<DL> | |
<DD>The menu path. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="roles"><!-- --></A><H3> | |
roles</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>roles</B></PRE> | |
<DL> | |
<DD>The list of valid role names. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="separator"><!-- --></A><H3> | |
separator</H3> | |
<PRE> | |
protected boolean <B>separator</B></PRE> | |
<DL> | |
<DD>The menu separator flag. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="target"><!-- --></A><H3> | |
target</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>target</B></PRE> | |
<DL> | |
<DD>The target attribute. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="title"><!-- --></A><H3> | |
title</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>title</B></PRE> | |
<DL> | |
<DD>The tooltip title attribute. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="Menu()"><!-- --></A><H3> | |
Menu</H3> | |
<PRE> | |
public <B>Menu</B>()</PRE> | |
<DL> | |
<DD>Create a new Menu instance. | |
<p/> | |
Please ensure you have defined a menu <A HREF="../../../../../org/apache/click/extras/control/Menu.html#accessController"><CODE>accessController</CODE></A> if the | |
menu's <A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInRoles()"><CODE>isUserInRoles()</CODE></A> method is going to be called. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/control/Menu.html#Menu(java.lang.String)"><CODE>Menu(java.lang.String)</CODE></A></DL> | |
</DL> | |
<HR> | |
<A NAME="Menu(java.lang.String)"><!-- --></A><H3> | |
Menu</H3> | |
<PRE> | |
public <B>Menu</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Create a new Menu instance with the given name. | |
<p/> | |
Please ensure you have defined a menu <A HREF="../../../../../org/apache/click/extras/control/Menu.html#accessController"><CODE>accessController</CODE></A> if the | |
menu's <A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInRoles()"><CODE>isUserInRoles()</CODE></A> method is going to be called. For example: | |
<pre class="prettyprint"> | |
public class BorderPage extends Page { | |
... | |
public void defineMenus() { | |
// Define an accessController | |
AccessController accessController = new RoleAccessController(); | |
// Retrieve some user roles | |
List roles = securityService.getRoles(); | |
Menu menu = new Menu("root"); | |
menu.setAccessController(accessController); | |
menu.setRoles(roles); | |
Menu subMenu = new Menu("products"); | |
subMenu.setLabel("Products"); | |
subMenu.setAccessController(accessController); | |
subMenu.setRoles(roles); | |
menu.add(subMenu); | |
... | |
} | |
} </pre> | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the menu</DL> | |
</DL> | |
<HR> | |
<A NAME="Menu(org.w3c.dom.Element, org.apache.click.extras.security.AccessController)"><!-- --></A><H3> | |
Menu</H3> | |
<PRE> | |
<FONT SIZE="-1"><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A> | |
</FONT>protected <B>Menu</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/Element.html" title="class or interface in org.w3c.dom">Element</A> menuElement, | |
<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#buildMenu(org.w3c.dom.Element, org.apache.click.extras.security.AccessController, java.lang.Class)"><CODE>MenuFactory.buildMenu(org.w3c.dom.Element, org.apache.click.extras.security.AccessController, java.lang.Class)</CODE></A> | |
instead</I> | |
<P> | |
<DD>Create a Menu from the given menu-item XML Element. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>menuElement</CODE> - the menu-item XML Element<DD><CODE>accessController</CODE> - the menu access controller</DL> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="getRootMenu()"><!-- --></A><H3> | |
getRootMenu</H3> | |
<PRE> | |
<FONT SIZE="-1"><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A> | |
</FONT>public static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>getRootMenu</B>()</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use <A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#getRootMenu()"><CODE>MenuFactory.getRootMenu()</CODE></A> instead</I> | |
<P> | |
<DD>Return root menu item defined in the WEB-INF/menu.xml or classpath | |
menu.xml, and which uses JEE Role Based Access Control (RoleAccessController). | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the root menu item defined in the WEB-INF/menu.xml file or menu.xml | |
in the root classpath<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/security/RoleAccessController.html" title="class in org.apache.click.extras.security"><CODE>RoleAccessController</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRootMenu(org.apache.click.extras.security.AccessController)"><!-- --></A><H3> | |
getRootMenu</H3> | |
<PRE> | |
<FONT SIZE="-1"><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A> | |
</FONT>public static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>getRootMenu</B>(<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#getRootMenu(org.apache.click.extras.security.AccessController)"><CODE>MenuFactory.getRootMenu(org.apache.click.extras.security.AccessController)</CODE></A> | |
instead</I> | |
<P> | |
<DD>Return root menu item defined in the WEB-INF/menu.xml or classpath | |
menu.xml, and which uses the provided AccessController. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>accessController</CODE> - the menu access controller | |
<DT><B>Returns:</B><DD>the root menu item defined in the WEB-INF/menu.xml file or menu.xml | |
in the root classpath</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getAccessController()"><!-- --></A><H3> | |
getAccessController</H3> | |
<PRE> | |
public <A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> <B>getAccessController</B>()</PRE> | |
<DL> | |
<DD>Return the menu access controller. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the menu access controller</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setAccessController(org.apache.click.extras.security.AccessController)"><!-- --></A><H3> | |
setAccessController</H3> | |
<PRE> | |
public void <B>setAccessController</B>(<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</PRE> | |
<DL> | |
<DD>Set the menu access controller. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>accessController</CODE> - the menu access controller</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasChildren()"><!-- --></A><H3> | |
hasChildren</H3> | |
<PRE> | |
public boolean <B>hasChildren</B>()</PRE> | |
<DL> | |
<DD>Return true if the menu contains any child submenus. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the menu contains any child submenus</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getChildren()"><!-- --></A><H3> | |
getChildren</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A>> <B>getChildren</B>()</PRE> | |
<DL> | |
<DD>Return list of of submenu items. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the list of submenu items</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isExternal()"><!-- --></A><H3> | |
isExternal</H3> | |
<PRE> | |
public boolean <B>isExternal</B>()</PRE> | |
<DL> | |
<DD>Return true if the menu path refers to an external resource. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the menu path refers to an external resource</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setExternal(boolean)"><!-- --></A><H3> | |
setExternal</H3> | |
<PRE> | |
public void <B>setExternal</B>(boolean value)</PRE> | |
<DL> | |
<DD>Set whether the menu path refers to an external resource. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the flag as to whether the menu path refers to an external resource</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getImageSrc()"><!-- --></A><H3> | |
getImageSrc</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getImageSrc</B>()</PRE> | |
<DL> | |
<DD>Return the image src path attribute. If the image src is defined then a | |
<tt><img/></tt> element will rendered inside the link when | |
using the Menu <A HREF="../../../../../org/apache/click/extras/control/Menu.html#toString()"><CODE>toString()</CODE></A> method. | |
<p/> | |
If the src value is prefixed with '/' then the request context path will | |
be prefixed to the src value when rendered by the control. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the image src path attribute</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setImageSrc(java.lang.String)"><!-- --></A><H3> | |
setImageSrc</H3> | |
<PRE> | |
public void <B>setImageSrc</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> src)</PRE> | |
<DL> | |
<DD>Set the image src path attribute. If the src value is prefixed with | |
'/' then the request context path will be prefixed to the src value when | |
rendered by the control. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>src</CODE> - the image src path attribute</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getLabel()"><!-- --></A><H3> | |
getLabel</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getLabel</B>()</PRE> | |
<DL> | |
<DD>Return the menu item display label. | |
<p/> | |
If the label value is null, this method will attempt to find a | |
localized label message in the parent messages of the root menu using the | |
key: | |
<blockquote> | |
<tt>getName() + ".label"</tt> | |
</blockquote> | |
If not found then the message will be looked up in the | |
<tt>/click-control.properties</tt> file using the same key. | |
If a value is still not found, the Menu name will be converted | |
into a label using the method: <A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/ClickUtils.html#toLabel(java.lang.String)" title="class or interface in org.apache.click.util"><CODE>ClickUtils.toLabel(String)</CODE></A> | |
<p/> | |
For example given the properties file <tt>src/click-page.properties</tt>: | |
<pre class="codeConfig"> | |
<span class="st">customers</span>.label=<span class="red">Customers</span> | |
<span class="st">customers</span>.title=<span class="red">Find a specific customer</span> </pre> | |
The menu.xml (<b>note</b> that no label attribute is present): | |
<pre class="prettyprint"> | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<menu> | |
<menu name="customers" path="customers.htm" roles="view-customers"/> | |
... | |
</menu> </pre> | |
Will render the Menu label and title properties as: | |
<pre class="codeHtml"> | |
<li><a title="<span class="red">Find a specific customer</span>" ... ><span class="red">Customers</span></a></li> </pre> | |
When a label value is not set, or defined in any properties files, then | |
its value will be created from the Menu name. | |
<p/> | |
For example given the <tt>menu.xml</tt> file: | |
<pre class="prettyprint"> | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<menu> | |
<menu name="product" path="product.htm" roles="view-product"/> | |
... | |
</menu> </pre> | |
Will render the Menu label as: | |
<pre class="codeHtml"> | |
<li><a ... ><span class="red">Product</span></a></li> </pre> | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the display label of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setLabel(java.lang.String)"><!-- --></A><H3> | |
setLabel</H3> | |
<PRE> | |
public void <B>setLabel</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> label)</PRE> | |
<DL> | |
<DD>Set the label of the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>label</CODE> - the label of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getPages()"><!-- --></A><H3> | |
getPages</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getPages</B>()</PRE> | |
<DL> | |
<DD>Return the list of valid Page paths for the Menu item. If any of these | |
page paths match the current request then the Menu item will be selected. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the list of valid Page paths</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setPages(java.util.List)"><!-- --></A><H3> | |
setPages</H3> | |
<PRE> | |
public void <B>setPages</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> pages)</PRE> | |
<DL> | |
<DD>Set the list of valid Page paths. If any of these page paths match the | |
current request then the Menu item will be selected. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>pages</CODE> - the list of valid Page paths</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getPath()"><!-- --></A><H3> | |
getPath</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getPath</B>()</PRE> | |
<DL> | |
<DD>Return the path of the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the path of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setPath(java.lang.String)"><!-- --></A><H3> | |
setPath</H3> | |
<PRE> | |
public void <B>setPath</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path)</PRE> | |
<DL> | |
<DD>Set the path of the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>path</CODE> - the path of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasRoles()"><!-- --></A><H3> | |
hasRoles</H3> | |
<PRE> | |
public boolean <B>hasRoles</B>()</PRE> | |
<DL> | |
<DD>Return true if the menu has roles defined, false otherwise. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the menu has roles defined, false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRoles()"><!-- --></A><H3> | |
getRoles</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getRoles</B>()</PRE> | |
<DL> | |
<DD>Return the list of roles for the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the list of roles for the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRoles(java.util.List)"><!-- --></A><H3> | |
setRoles</H3> | |
<PRE> | |
public void <B>setRoles</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> roles)</PRE> | |
<DL> | |
<DD>Set the list of valid roles for the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>roles</CODE> - the list of valid roles for the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isSelected()"><!-- --></A><H3> | |
isSelected</H3> | |
<PRE> | |
public boolean <B>isSelected</B>()</PRE> | |
<DL> | |
<DD>Return true if the Menu item is selected. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Menu item is selected</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getSelectedChild()"><!-- --></A><H3> | |
getSelectedChild</H3> | |
<PRE> | |
public <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>getSelectedChild</B>()</PRE> | |
<DL> | |
<DD>Return the selected child menu, or null if no child menu is selected. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the selected child menu</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isSeparator()"><!-- --></A><H3> | |
isSeparator</H3> | |
<PRE> | |
public boolean <B>isSeparator</B>()</PRE> | |
<DL> | |
<DD>Return true if the Menu item is a separator. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Menu item is a separator</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSeparator(boolean)"><!-- --></A><H3> | |
setSeparator</H3> | |
<PRE> | |
public void <B>setSeparator</B>(boolean separator)</PRE> | |
<DL> | |
<DD>Set whether the Menu item is a separator. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>separator</CODE> - the flag indicating whether the Menu item is a separator</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isUserInRoles()"><!-- --></A><H3> | |
isUserInRoles</H3> | |
<PRE> | |
public boolean <B>isUserInRoles</B>()</PRE> | |
<DL> | |
<DD>Return true if the user is in one of the menu roles, or if any child | |
menus have the user in one of their menu roles. Otherwise the method will | |
return false. | |
<p/> | |
This method internally uses the | |
<A HREF="../../../../../org/apache/click/extras/security/AccessController.html#hasAccess(javax.servlet.http.HttpServletRequest, java.lang.String)"><CODE>AccessController#hasAccess(HttpServletRequest request, String roleName)</CODE></A> | |
method where the rolenames are derived from the <A HREF="../../../../../org/apache/click/extras/control/Menu.html#getRoles()"><CODE>getRoles()</CODE></A> property. | |
<p/> | |
If no <A HREF="../../../../../org/apache/click/extras/control/Menu.html#getRoles()"><CODE>roles</CODE></A> are defined, the AccessController are invoked | |
with a <tt>null</tt> argument to determine whether access is permitted to | |
menus without roles. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the user is in one of the menu roles, or false otherwise | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the menu accessController is not defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isUserInChildMenuRoles()"><!-- --></A><H3> | |
isUserInChildMenuRoles</H3> | |
<PRE> | |
public boolean <B>isUserInChildMenuRoles</B>()</PRE> | |
<DL> | |
<DD>Return true if any child menus have the user in one of their menu roles. | |
Otherwise the method will return false. | |
<p/> | |
This method internally uses the <tt>HttpServletRequest</tt> function <tt>isUserInRole(rolename)</tt>, | |
where the rolenames are derived from the <A HREF="../../../../../org/apache/click/extras/control/Menu.html#getRoles()"><CODE>getRoles()</CODE></A> property. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the user is in one of the child menu roles, or false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTarget()"><!-- --></A><H3> | |
getTarget</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getTarget</B>()</PRE> | |
<DL> | |
<DD>Return the target attribute of the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the target attribute of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTarget(java.lang.String)"><!-- --></A><H3> | |
setTarget</H3> | |
<PRE> | |
public void <B>setTarget</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> target)</PRE> | |
<DL> | |
<DD>Set the target attribute of the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>target</CODE> - the target attribute of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTitle()"><!-- --></A><H3> | |
getTitle</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getTitle</B>()</PRE> | |
<DL> | |
<DD>Return the 'title' attribute of the Menu item, or null if not defined. | |
<p/> | |
If the title value is null, this method will attempt to find a | |
localized title message in the parent messages of the root menu using the | |
key: | |
<blockquote> | |
<tt>getName() + ".title"</tt> | |
</blockquote> | |
If not found then the message will be looked up in the | |
<tt>/click-control.properties</tt> file using the same key. If still | |
not found the title will be left as null and will not be rendered. | |
<p/> | |
For example given the properties file <tt>src/click-page.properties</tt>: | |
<pre class="codeConfig"> | |
<span class="st">customers</span>.label=<span class="red">Customers</span> | |
<span class="st">customers</span>.title=<span class="red">Find a specific customer</span> </pre> | |
The menu.xml (<b>note</b> that no title attribute is present): | |
<pre class="prettyprint"> | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<menu> | |
<menu name="customers" path="customers.htm" roles="view-customers"/> | |
... | |
</menu> </pre> | |
Will render the Menu label and title properties as: | |
<pre class="codeHtml"> | |
<li><a title="<span class="red">Find a specific customer</span>" ... ><span class="red">Customers</span></a></li> </pre> | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the 'title' attribute of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTitle(java.lang.String)"><!-- --></A><H3> | |
setTitle</H3> | |
<PRE> | |
public void <B>setTitle</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> title)</PRE> | |
<DL> | |
<DD>Set the title attribute of the Menu item. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the title attribute of the Menu item</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHref()"><!-- --></A><H3> | |
getHref</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getHref</B>()</PRE> | |
<DL> | |
<DD>Return the menu anchor HREF attribute. If the menu is referring | |
to an external path, this method will simply return the path, | |
otherwise it will return the menu path prefixed with the | |
request context path. | |
<p/> | |
If the path refers to a hash "#" symbol, this method will return | |
a "#". It is useful to assign a "#" to the path of a menu item | |
containing children, because most modern browsers will not submit | |
the page if clicked on. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the menu anchor HREF attribute</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHeadElements()"><!-- --></A><H3> | |
getHeadElements</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://click.apache.org/docs/click-api/org/apache/click/element/Element.html" title="class or interface in org.apache.click.element">Element</A>> <B>getHeadElements</B>()</PRE> | |
<DL> | |
<DD>Return the Menu HEAD elements to be included in the page. | |
The following resources are returned: | |
<ul> | |
<li><tt>click/menu.css</tt></li> | |
<li><tt>click/control.js</tt></li> | |
<li><tt>click/menu-fix-ie6.js</tt> (fixes IE6 menu burnthrough and hover issues)</li> | |
</ul> | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html#getHeadElements()" title="class or interface in org.apache.click">getHeadElements</A></CODE> in interface <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html" title="class or interface in org.apache.click">Control</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#getHeadElements()" title="class or interface in org.apache.click.control">getHeadElements</A></CODE> in class <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the HTML HEAD elements for the control<DT><B>See Also:</B><DD><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html#getHeadElements()" title="class or interface in org.apache.click"><CODE>Control.getHeadElements()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="add(org.apache.click.extras.control.Menu)"><!-- --></A><H3> | |
add</H3> | |
<PRE> | |
public <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>add</B>(<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</PRE> | |
<DL> | |
<DD>Add the given menu as a submenu. The menu will also be set as the parent | |
of the submenu. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>menu</CODE> - the submenu to add | |
<DT><B>Returns:</B><DD>the menu that was added</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="contains(org.apache.click.extras.control.Menu)"><!-- --></A><H3> | |
contains</H3> | |
<PRE> | |
public boolean <B>contains</B>(<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</PRE> | |
<DL> | |
<DD>Return true if this menu contains the given menu, false otherwise. | |
<p/> | |
To test if the given menu is contained, this method will test against | |
both the menu object reference as well as the menu name. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if this menu contains the given menu, false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="findRootMenu()"><!-- --></A><H3> | |
findRootMenu</H3> | |
<PRE> | |
public <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>findRootMenu</B>()</PRE> | |
<DL> | |
<DD>Find the root menu, or null if no root menu can be found. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the root menu, or null if no root menu can be found.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isRoot()"><!-- --></A><H3> | |
isRoot</H3> | |
<PRE> | |
public boolean <B>isRoot</B>()</PRE> | |
<DL> | |
<DD>Return true if this is the root menu, false otherwise. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if this menu is the root menu, false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onDestroy()"><!-- --></A><H3> | |
onDestroy</H3> | |
<PRE> | |
public void <B>onDestroy</B>()</PRE> | |
<DL> | |
<DD>This sets the parent to be null. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html#onDestroy()" title="class or interface in org.apache.click">onDestroy</A></CODE> in interface <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html" title="class or interface in org.apache.click">Control</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#onDestroy()" title="class or interface in org.apache.click.control">onDestroy</A></CODE> in class <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html#onDestroy()" title="class or interface in org.apache.click"><CODE>Control.onDestroy()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="render(org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
render</H3> | |
<PRE> | |
public void <B>render</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Render an HTML representation of the Menu. | |
<p/> | |
If <tt>this</tt> menu instance is the root menu | |
(<A HREF="../../../../../org/apache/click/extras/control/Menu.html#isRoot()"><CODE>isRoot()</CODE></A> returns true), the menu and all its submenus | |
(recursively), will be rendered by delegating rendering to the method | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderRootMenu(org.apache.click.util.HtmlStringBuffer)"><CODE>renderRootMenu</CODE></A>. | |
The menu structure will be rendered as an HTML List consisting of <ul> | |
and <li> elements. | |
<p/> | |
If <tt>this</tt> menu instance is <tt>not</tt> the root menu, this menu | |
will be rendered by delegating rendering to the method | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html#renderMenuLink(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu)"><CODE>renderMenuLink(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu)</CODE></A>. | |
The menu will be rendered as a link: <a>. | |
<p/> | |
By having two render modes one can render the entire menu | |
automatically, or render each menu item manually using a Velocity macro. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html#render(org.apache.click.util.HtmlStringBuffer)" title="class or interface in org.apache.click">render</A></CODE> in interface <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/Control.html" title="class or interface in org.apache.click">Control</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)" title="class or interface in org.apache.click.control">render</A></CODE> in class <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the specified buffer to render the control's output to<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/control/Menu.html#toString()"><CODE>toString()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toString()"><!-- --></A><H3> | |
toString</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> | |
<DL> | |
<DD>Return an HTML representation of the menu. | |
<P> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#toString()" title="class or interface in org.apache.click.control">toString</A></CODE> in class <CODE><A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html" title="class or interface in org.apache.click.control">AbstractControl</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>an HTML anchor tag representation of the menu<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/control/Menu.html#render(org.apache.click.util.HtmlStringBuffer)"><CODE>render(org.apache.click.util.HtmlStringBuffer)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderRootMenu(org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
renderRootMenu</H3> | |
<PRE> | |
protected void <B>renderRootMenu</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Render an HTML representation of the root menu. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderMenuList(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu, int)"><!-- --></A><H3> | |
renderMenuList</H3> | |
<PRE> | |
protected void <B>renderMenuList</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</PRE> | |
<DL> | |
<DD>Render an html representation of the menu list (<ul>) structure. | |
<p/> | |
<b>Please note</b>: the method | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html#canRender(org.apache.click.extras.control.Menu, int)"><CODE>canRender(menu)</CODE></A> | |
controls whether menu items are rendered or not. If <tt>canRender</tt> | |
returns true, the menu item is rendered, otherwise it is skipped. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render to<DD><CODE>menu</CODE> - the menu that is currently rendered<DD><CODE>depth</CODE> - the current depth in the menu hierarchy<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/control/Menu.html#canRender(org.apache.click.extras.control.Menu, int)"><CODE>canRender(org.apache.click.extras.control.Menu, int)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="canRender(org.apache.click.extras.control.Menu, int)"><!-- --></A><H3> | |
canRender</H3> | |
<PRE> | |
protected boolean <B>canRender</B>(<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</PRE> | |
<DL> | |
<DD>Return true if the given menu can be rendered, false otherwise. | |
<p/> | |
If the menu <A HREF="../../../../../org/apache/click/extras/control/Menu.html#hasRoles()"><CODE>has roles</CODE></A> defined, this method will return | |
true if the user is in one of the menu roles, false otherwise. This method | |
delegates to <A HREF="../../../../../org/apache/click/extras/control/Menu.html#isUserInRoles()"><CODE>isUserInRoles()</CODE></A> if the menu has roles defined. | |
<p/> | |
If the menu has no roles defined, this method returns true. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>menu</CODE> - the menu that should be rendered or not<DD><CODE>depth</CODE> - the current depth in the menu hierarchy | |
<DT><B>Returns:</B><DD>true if the menu can be rendered, false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderMenuListAttributes(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu, int)"><!-- --></A><H3> | |
renderMenuListAttributes</H3> | |
<PRE> | |
protected void <B>renderMenuListAttributes</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</PRE> | |
<DL> | |
<DD>Render the attributes of the menu list (>ul<). | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render to<DD><CODE>menu</CODE> - the menu being rendered<DD><CODE>depth</CODE> - the current depth in the menu hierarchy</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderMenuListItemAttributes(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu, int)"><!-- --></A><H3> | |
renderMenuListItemAttributes</H3> | |
<PRE> | |
protected void <B>renderMenuListItemAttributes</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu, | |
int depth)</PRE> | |
<DL> | |
<DD>Render the attributes of the menu list item (>li<). | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render to<DD><CODE>menu</CODE> - the menu being rendered<DD><CODE>depth</CODE> - the current depth in the menu hierarchy</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderMenuLink(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu)"><!-- --></A><H3> | |
renderMenuLink</H3> | |
<PRE> | |
protected void <B>renderMenuLink</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</PRE> | |
<DL> | |
<DD>Render an HTML link (<a>) representation of the given menu. | |
<p/> | |
If the menu item is selected the anchor tag will be rendered with | |
class="selected" attribute. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render to<DD><CODE>menu</CODE> - the menu to render</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderSeparator(org.apache.click.util.HtmlStringBuffer, org.apache.click.extras.control.Menu)"><!-- --></A><H3> | |
renderSeparator</H3> | |
<PRE> | |
protected void <B>renderSeparator</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer, | |
<A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> menu)</PRE> | |
<DL> | |
<DD>Render an HTML representation of the menu as a separator. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render to<DD><CODE>menu</CODE> - the menu to render as a separator</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderMenuHref(org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
renderMenuHref</H3> | |
<PRE> | |
protected void <B>renderMenuHref</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/HtmlStringBuffer.html" title="class or interface in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Render the menu <tt>"href"</tt> attribute. This method can be overridden | |
to render dynamic <tt>"href"</tt> parameters, for example: | |
<pre class="prettyprint"> | |
public class MyPage extends BorderPage { | |
public MyPage() { | |
Menu rootMenu = new MenuFactory().getRootMenu(); | |
final String contextPath = getContext().getRequest().getContextPath(); | |
Menu menu = new Menu() { | |
@Override | |
protected void renderMenuHref(HtmlStringBuffer buffer) { | |
buffer.appendAttribute("href", contextPath + "/my-page.htm?customer=" + getCustomerId()); | |
} | |
}); | |
menu.setName("customer"); | |
menu.setLabel("Customer Lookup"); | |
// Guard against adding child menu more than once | |
if (!rootMenu.contains(menu)) { | |
rootMenu.add(menu); | |
} | |
} | |
} </pre> | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the buffer to render the href attribute to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="loadRootMenu(org.apache.click.extras.security.AccessController)"><!-- --></A><H3> | |
loadRootMenu</H3> | |
<PRE> | |
<FONT SIZE="-1"><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang">@Deprecated</A> | |
</FONT>protected static <A HREF="../../../../../org/apache/click/extras/control/Menu.html" title="class in org.apache.click.extras.control">Menu</A> <B>loadRootMenu</B>(<A HREF="../../../../../org/apache/click/extras/security/AccessController.html" title="interface in org.apache.click.extras.security">AccessController</A> accessController)</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html#loadFromMenuXml(java.lang.String, java.lang.String, org.apache.click.extras.security.AccessController, java.lang.Class)"><CODE>MenuFactory.loadFromMenuXml(java.lang.String, java.lang.String, org.apache.click.extras.security.AccessController, java.lang.Class)</CODE></A> | |
instead</I> | |
<P> | |
<DD>Return a copy of the Applications root Menu as defined in the | |
configuration file "<tt>/WEB-INF/menu.xml</tt>", with the Control | |
name <tt>"rootMenu"</tt>. | |
<p/> | |
The returned root menu is always selected. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>accessController</CODE> - the menu access controller | |
<DT><B>Returns:</B><DD>a copy of the application's root Menu</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/click/extras/control/LongField.html" title="class in org.apache.click.extras.control"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/click/extras/control/MenuFactory.html" title="class in org.apache.click.extras.control"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/click/extras/control/Menu.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="Menu.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
<style type='text/css'>.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;}.typ{color:#000;}.lit{color:#066;}.pun{color:#660;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}.dec{color:#606;}pre.prettyprint{padding:1em;border:1px solid #888;overflow:auto;}@media print{.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;font-style:italic;}.typ{color:#000;font-weight:bold;}.lit{color:#044;}.pun{color:#440;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}}</style><script type='text/javascript'>var PR_keywords={};(function(){var CPP_KEYWORDS='abstract bool break case catch char class const '+'const_cast continue default delete deprecated dllexport dllimport do '+'double dynamic_cast else enum explicit extern false float for friend '+'goto if inline int long mutable naked namespace new noinline noreturn '+'nothrow novtable operator private property protected public register '+'reinterpret_cast return selectany short signed sizeof static '+'static_cast struct switch template this thread throw true try typedef '+'typeid typename union unsigned using declaration, directive uuid '+'virtual void volatile while typeof';var CSHARP_KEYWORDS='as base by byte checked decimal delegate descending '+'event finally fixed foreach from group implicit in interface internal '+'into is lock null object override orderby params readonly ref sbyte '+'sealed stackalloc string select uint ulong unchecked unsafe ushort var';var JAVA_KEYWORDS='package synchronized boolean implements import throws '+'instanceof transient extends final strictfp native super';var JSCRIPT_KEYWORDS='debugger export function with NaN Infinity';var PERL_KEYWORDS='require sub unless until use elsif BEGIN END';var PYTHON_KEYWORDS='and assert def del elif except exec global lambda '+'not or pass print raise yield False True None';var RUBY_KEYWORDS='then end begin rescue ensure module when undef next '+'redo retry alias defined';var SH_KEYWORDS='done fi';var KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JAVA_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS,PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS];for(var k=0;k<KEYWORDS.length;k++){var kw=KEYWORDS[k].split(' ');for(var i=0;i<kw.length;i++){if(kw[i]){PR_keywords[kw[i]]=true;}}}}).call(this);var PR_STRING='str';var PR_KEYWORD='kwd';var PR_COMMENT='com';var PR_TYPE='typ';var PR_LITERAL='lit';var PR_PUNCTUATION='pun';var PR_PLAIN='pln';var PR_TAG='tag';var PR_DECLARATION='dec';var PR_SOURCE='src';var PR_ATTRIB_NAME='atn';var PR_ATTRIB_VALUE='atv';var PR_TAB_WIDTH=8;function PR_isWordChar(ch){return(ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z');}function PR_spliceArrayInto(inserted,container,containerPosition,countReplaced){inserted.unshift(containerPosition,countReplaced||0);try{container.splice.apply(container,inserted);}finally{inserted.splice(0,2);}}var REGEXP_PRECEDER_PATTERN=(function(){var preceders=['!','!=','!==','#','%','%=','&','&&','&&=','&=','(','*','*=','+=',',','-=','->','/','/=',':','::',';','<','<<','<<=','<=','=','==','===','>','>=','>>','>>=','>>>','>>>=','?','@','[','^','^=','^^','^^=','{','|','|=','||','||=','~','break','case','continue','delete','do','else','finally','instanceof','return','throw','try','typeof'];var pattern='(?:'+'(?:(?:^|[^0-9\.])\\.{1,3})|'+'(?:(?:^|[^\\+])\\+)|'+'(?:(?:^|[^\\-])-)';for(var i=0;i<preceders.length;++i){var preceder=preceders[i];if(PR_isWordChar(preceder.charAt(0))){pattern+='|\\b'+preceder;}else{pattern+='|'+preceder.replace(/([^=<>:&])/g,'\\$1');}}pattern+='|^)\\s*$';return new RegExp(pattern);})();var pr_amp=/&/g;var pr_lt=/</g;var pr_gt=/>/g;var pr_quot=/"/g;function PR_attribToHtml(str){return str.replace(pr_amp,'&').replace(pr_lt,'<').replace(pr_gt,'>').replace(pr_quot,'"');}function PR_textToHtml(str){return str.replace(pr_amp,'&').replace(pr_lt,'<').replace(pr_gt,'>');}var pr_ltEnt=/</g;var pr_gtEnt=/>/g;var pr_aposEnt=/'/g;var pr_quotEnt=/"/g;var pr_ampEnt=/&/g;function PR_htmlToText(html){var pos=html.indexOf('&');if(pos<0){return html;}for(--pos;(pos=html.indexOf('&#',pos+1))>=0;){var end=html.indexOf(';',pos);if(end>=0){var num=html.substring(pos+3,end);var radix=10;if(num&&num.charAt(0)=='x'){num=num.substring(1);radix=16;}var codePoint=parseInt(num,radix);if(!isNaN(codePoint)){html=(html.substring(0,pos)+String.fromCharCode(codePoint)+html.substring(end+1));}}}return html.replace(pr_ltEnt,'<').replace(pr_gtEnt,'>').replace(pr_aposEnt,"'").replace(pr_quotEnt,'"').replace(pr_ampEnt,'&');}function PR_isRawContent(node){return'XMP'==node.tagName;}var PR_innerHtmlWorks=null;function PR_getInnerHtml(node){if(null===PR_innerHtmlWorks){var testNode=document.createElement('PRE');testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));PR_innerHtmlWorks=!/</.test(testNode.innerHTML);}if(PR_innerHtmlWorks){var content=node.innerHTML;if(PR_isRawContent(node)){content=PR_textToHtml(content);}return content;}var out=[];for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}return out.join('');}function PR_normalizedHtml(node,out){switch(node.nodeType){case 1:var name=node.tagName.toLowerCase();out.push('\074',name);for(var i=0;i<node.attributes.length;++i){var attr=node.attributes[i];if(!attr.specified){continue;}out.push(' ');PR_normalizedHtml(attr,out);}out.push('>');for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}if(node.firstChild||!/^(?:br|link|img)$/.test(name)){out.push('<\/',name,'>');}break;case 2:out.push(node.name.toLowerCase(),'="',PR_attribToHtml(node.value),'"');break;case 3:case 4:out.push(PR_textToHtml(node.nodeValue));break;}}function PR_tabExpander(tabWidth){var SPACES=' ';var charInLine=0;return function(plainText){var out=null;var pos=0;for(var i=0,n=plainText.length;i<n;++i){var ch=plainText.charAt(i);switch(ch){case'\t':if(!out){out=[];}out.push(plainText.substring(pos,i));var nSpaces=tabWidth-(charInLine%tabWidth);charInLine+=nSpaces;for(;nSpaces>=0;nSpaces-=SPACES.length){out.push(SPACES.substring(0,nSpaces));}pos=i+1;break;case'\n':charInLine=0;break;default:++charInLine;}}if(!out){return plainText;}out.push(plainText.substring(pos));return out.join('');};}var pr_chunkPattern=/(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g;var pr_commentPrefix=/^<!--/;var pr_cdataPrefix=/^<\[CDATA\[/;var pr_brPrefix=/^<br\b/i;function PR_extractTags(s){var matches=s.match(pr_chunkPattern);var sourceBuf=[];var sourceBufLen=0;var extractedTags=[];if(matches){for(var i=0,n=matches.length;i<n;++i){var match=matches[i];if(match.length>1&&match.charAt(0)==='<'){if(pr_commentPrefix.test(match)){continue;}if(pr_cdataPrefix.test(match)){sourceBuf.push(match.substring(9,match.length-3));sourceBufLen+=match.length-12;}else if(pr_brPrefix.test(match)){sourceBuf.push('\n');sourceBufLen+=1;}else{extractedTags.push(sourceBufLen,match);}}else{var literalText=PR_htmlToText(match);sourceBuf.push(literalText);sourceBufLen+=literalText.length;}}}return{source:sourceBuf.join(''),tags:extractedTags};}function PR_createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);for(var i=allPatterns.length;--i>=0;){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts;}}}})();var nPatterns=fallthroughStylePatterns.length;return function(sourceCode,opt_basePos){opt_basePos=opt_basePos||0;var decorations=[opt_basePos,PR_PLAIN];var lastToken='';var pos=0;var tail=sourceCode;while(tail.length){var style;var token=null;var patternParts=shortcuts[tail.charAt(0)];if(patternParts){var match=tail.match(patternParts[1]);token=match[0];style=patternParts[0];}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];var contextPattern=patternParts[2];if(contextPattern&&!contextPattern.test(lastToken)){continue;}var match=tail.match(patternParts[1]);if(match){token=match[0];style=patternParts[0];break;}}if(!token){style=PR_PLAIN;token=tail.substring(0,1);}}decorations.push(opt_basePos+pos,style);pos+=token.length;tail=tail.substring(token.length);if(style!==PR_COMMENT&&/\S/.test(token)){lastToken=token;}}return decorations;};}var PR_C_STYLE_STRING_AND_COMMENT_LEXER=PR_createSimpleLexer([[PR_STRING,/^\'(?:[^\\\']|\\[\s\S])*(?:\'|$)/,null,"'"],[PR_STRING,/^"(?:[^\\"]|\\[\s\S])*(?:"|$)/,null,'"'],[PR_STRING,/^\`(?:[^\\\`]|\\[\s\S])*(?:\`|$)/,null,'`']],[[PR_PLAIN,/^(?:[^\'"\`\/\#]+)/,null,' \r\n'],[PR_COMMENT,/^#[^\r\n]*/,null,'#'],[PR_COMMENT,/^\/\/[^\r\n]*/,null],[PR_STRING,/^\/(?:[^\\\*\/]|\\[\s\S])+(?:\/|$)/,REGEXP_PRECEDER_PATTERN],[PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null]]);function PR_splitStringAndCommentTokens(sourceCode){return PR_C_STYLE_STRING_AND_COMMENT_LEXER(sourceCode);}var PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER=PR_createSimpleLexer([],[[PR_PLAIN,/^\s+/,null,' \r\n'],[PR_PLAIN,/^[a-z_$@][a-z_$@0-9]*/i,null],[PR_LITERAL,/^0x[a-f0-9]+[a-z]/i,null],[PR_LITERAL,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?[a-z]*/i,null,'123456789'],[PR_PUNCTUATION,/^[^\s\w\.$@]+/,null]]);function PR_splitNonStringNonCommentTokens(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_PLAIN){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecs=PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER(chunk,start);for(var j=0,m=subDecs.length;j<m;j+=2){var subStyle=subDecs[j+1];if(subStyle===PR_PLAIN){var subStart=subDecs[j];var subEnd=j+2<m?subDecs[j+2]:chunk.length;var token=source.substring(subStart,subEnd);if(token=='.'){subDecs[j+1]=PR_PUNCTUATION;}else if(token in PR_keywords){subDecs[j+1]=PR_KEYWORD;}else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)){subDecs[j+1]=token.charAt(0)=='@'?PR_LITERAL:PR_TYPE;}}}PR_spliceArrayInto(subDecs,decorations,i,2);i+=subDecs.length-2;}}return decorations;}var PR_MARKUP_LEXER=PR_createSimpleLexer([],[[PR_PLAIN,/^[^<]+/,null],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/,null],[PR_COMMENT,/^<!--[\s\S]*?(?:-->|$)/,null],[PR_SOURCE,/^<\?[\s\S]*?(?:\?>|$)/,null],[PR_SOURCE,/^<%[\s\S]*?(?:%>|$)/,null],[PR_SOURCE,/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],[PR_TAG,/^<\/?\w[^<>]*>/,null]]);var PR_SOURCE_CHUNK_PARTS=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function PR_tokenizeMarkup(source){var decorations=PR_MARKUP_LEXER(source);for(var i=0;i<decorations.length;i+=2){if(decorations[i+1]===PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var sourceChunk=source.substring(start,end);var match=(sourceChunk.match(PR_SOURCE_CHUNK_PARTS));if(match){decorations.splice(i,2,start,PR_TAG,start+match[1].length,PR_SOURCE,start+match[1].length+(match[2]||'').length,PR_TAG);}}}return decorations;}var PR_TAG_LEXER=PR_createSimpleLexer([[PR_ATTRIB_VALUE,/^\'[^\']*(?:\'|$)/,null,"'"],[PR_ATTRIB_VALUE,/^"[^"]*(?:"|$)/,null,'"'],[PR_PUNCTUATION,/^[<>\/=]+/,null,'<>/=']],[[PR_TAG,/^[\w-]+/,/^</],[PR_ATTRIB_VALUE,/^[\w-]+/,/^=/],[PR_ATTRIB_NAME,/^[\w-]+/,null],[PR_PLAIN,/^\s+/,null,' \r\n']]);function PR_splitTagAttributes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_TAG){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecorations=PR_TAG_LEXER(chunk,start);PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceNodes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style==PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var subDecorations=PR_decorateSource(source.substring(start,end));for(var j=0,m=subDecorations.length;j<m;j+=2){subDecorations[j]+=start;}PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceAttributes(source,decorations){var nextValueIsSource=false;for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_ATTRIB_NAME){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;nextValueIsSource=/^on|^style$/i.test(source.substring(start,end));}else if(style==PR_ATTRIB_VALUE){if(nextValueIsSource){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var attribValue=source.substring(start,end);var attribLen=attribValue.length;var quoted=(attribLen>=2&&/^["\']/.test(attribValue)&&attribValue.charAt(0)===attribValue.charAt(attribLen-1));var attribSource;var attribSourceStart;var attribSourceEnd;if(quoted){attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue;}else{attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue.substring(1,attribValue.length-1);}var attribSourceDecorations=PR_decorateSource(attribSource);for(var j=0,m=attribSourceDecorations.length;j<m;j+=2){attribSourceDecorations[j]+=attribSourceStart;}if(quoted){attribSourceDecorations.push(attribSourceEnd,PR_ATTRIB_VALUE);PR_spliceArrayInto(attribSourceDecorations,decorations,i+2,0);}else{PR_spliceArrayInto(attribSourceDecorations,decorations,i,2);}}nextValueIsSource=false;}}return decorations;}function PR_decorateSource(sourceCode){var decorations=PR_splitStringAndCommentTokens(sourceCode);decorations=PR_splitNonStringNonCommentTokens(sourceCode,decorations);return decorations;}function PR_decorateMarkup(sourceCode){var decorations=PR_tokenizeMarkup(sourceCode);decorations=PR_splitTagAttributes(sourceCode,decorations);decorations=PR_splitSourceNodes(sourceCode,decorations);decorations=PR_splitSourceAttributes(sourceCode,decorations);return decorations;}function PR_recombineTagsAndDecorations(sourceText,extractedTags,decorations){var html=[];var outputIdx=0;var openDecoration=null;var currentDecoration=null;var tagPos=0;var decPos=0;var tabExpander=PR_tabExpander(PR_TAB_WIDTH);function emitTextUpTo(sourceIdx){if(sourceIdx>outputIdx){if(openDecoration&&openDecoration!==currentDecoration){html.push('</span>');openDecoration=null;}if(!openDecoration&¤tDecoration){openDecoration=currentDecoration;html.push('<span class="',openDecoration,'">');}var htmlChunk=PR_textToHtml(tabExpander(sourceText.substring(outputIdx,sourceIdx))).replace(/(\r\n?|\n| ) /g,'$1 ').replace(/\r\n?|\n/g,' <br>');html.push(htmlChunk);outputIdx=sourceIdx;}}while(true){var outputTag;if(tagPos<extractedTags.length){if(decPos<decorations.length){outputTag=extractedTags[tagPos]<=decorations[decPos];}else{outputTag=true;}}else{outputTag=false;}if(outputTag){emitTextUpTo(extractedTags[tagPos]);if(openDecoration){html.push('</span>');openDecoration=null;}html.push(extractedTags[tagPos+1]);tagPos+=2;}else if(decPos<decorations.length){emitTextUpTo(decorations[decPos]);currentDecoration=decorations[decPos+1];decPos+=2;}else{break;}}emitTextUpTo(sourceText.length);if(openDecoration){html.push('</span>');}return html.join('');}function prettyPrintOne(sourceCodeHtml){try{var sourceAndExtractedTags=PR_extractTags(sourceCodeHtml);var source=sourceAndExtractedTags.source;var extractedTags=sourceAndExtractedTags.tags;var isMarkup=/^\s*</.test(source)&&/>\s*$/.test(source);var decorations=isMarkup?PR_decorateMarkup(source):PR_decorateSource(source);return PR_recombineTagsAndDecorations(source,extractedTags,decorations);}catch(e){if('console'in window){console.log(e);console.trace();}return sourceCodeHtml;}}var PR_SHOULD_USE_CONTINUATION=true;function prettyPrint(opt_whenDone){var codeSegments=[document.getElementsByTagName('pre'),document.getElementsByTagName('code'),document.getElementsByTagName('xmp')];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0;j<codeSegments[i].length;++j){elements.push(codeSegments[i][j]);}}codeSegments=null;var k=0;function doWork(){var endTime=(PR_SHOULD_USE_CONTINUATION?new Date().getTime()+250:Infinity);for(;k<elements.length&&new Date().getTime()<endTime;k++){var cs=elements[k];if(cs.className&&cs.className.indexOf('prettyprint')>=0){var nested=false;for(var p=cs.parentNode;p!=null;p=p.parentNode){if((p.tagName=='pre'||p.tagName=='code'||p.tagName=='xmp')&&p.className&&p.className.indexOf('prettyprint')>=0){nested=true;break;}}if(!nested){var content=PR_getInnerHtml(cs);content=content.replace(/(?:\r\n?|\n)$/,'');var newContent=prettyPrintOne(content);if(!PR_isRawContent(cs)){cs.innerHTML=newContent;}else{var pre=document.createElement('PRE');for(var i=0;i<cs.attributes.length;++i){var a=cs.attributes[i];if(a.specified){pre.setAttribute(a.name,a.value);}}pre.innerHTML=newContent;cs.parentNode.replaceChild(pre,cs);}}}}if(k<elements.length){setTimeout(doWork,250);}else if(opt_whenDone){opt_whenDone();}}doWork();}</script><script type='text/javascript'>prettyPrint();</script></BODY> | |
</HTML> |