org.loom.tags.menu
Class MenuTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by org.loom.tags.AbstractTag
          extended by org.loom.tags.AbstractDecoratedTag
              extended by org.loom.tags.menu.MenuTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag, LoomTag, MenuItemTagCollection
Direct Known Subclasses:
LocaleMenuTag

@Tag(dynamicAttributes=true,
     bodyContent=SCRIPTLESS,
     example="<l:menu id=\"menu\">\n\t<l:menuItem action=\"Mortgages\" event=\"listAll\"/>\n\t<l:menuItem action=\"Leasing\" event=\"listAll\" aliases=\"create, edit, save\"/>\n\t<l:menuItem href=\"/support/listAllActions.jsp\" label=\"ListAll\"/>\n\t<l:menuItem action=\"Mail\" event=\"showFolder\" param-folderName=\"INBOX\"/>\n</l:menu>")
public class MenuTag
extends AbstractDecoratedTag
implements MenuItemTagCollection

Menus are configured inline in the JSP page.

Performance can be improved by caching menu contents at the server using l:cache


Field Summary
 
Fields inherited from class org.loom.tags.AbstractDecoratedTag
decorator
 
Fields inherited from class org.loom.tags.AbstractTag
expressionLanguageProxy, loomServletRequestFactory, out, repository, request, response
 
Constructor Summary
MenuTag()
           
 
Method Summary
 void addChild(MenuItemData item)
          Add a MenuItemData as child of this node
 void doTagImpl()
          Neither this or MenuItemTag perform any rendering, the whole work is done by the Decorator.
 java.lang.String getCssClass()
           
 java.lang.String getId()
           
 java.lang.String getItemSeparator()
           
 AbstractMenuData getMenu()
           
 void setCache(java.lang.String cache)
          Deprecated. since Loom 2.0 this attribute will be ignored (see #LOOM-231). Instead, use l:cached
 void setCssClass(java.lang.String cls)
          HTML attribute
 void setId(java.lang.String id)
           
 void setItemSeparator(java.lang.String itemSeparator)
           
protected  void setMenu(AbstractMenuData menu)
           
 
Methods inherited from class org.loom.tags.AbstractDecoratedTag
doTag, getDecorator, getDecoratorInstance, renderTag, setDecorator
 
Methods inherited from class org.loom.tags.AbstractTag
createWriterWrapper, doBody, doBufferedBody, endTag, evaluateExpression, getActionProperty, getAncestorWithClass, getBufferedBody, getExtendedAttributes, getMessagesRepository, getPageContext, getRequest, getResponse, getScopedAttribute, getWriter, initTag, printParentAttributes, removeScopedAttribute, setDynamicAttribute, setExtendedAttribute, setJspContext, setRequest, setResponse, setScopedAttribute, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuTag

public MenuTag()
Method Detail

doTagImpl

public void doTagImpl()
               throws java.io.IOException,
                      javax.servlet.jsp.JspException
Neither this or MenuItemTag perform any rendering, the whole work is done by the Decorator. These tags only assemble a structure of MenuItemData.

Specified by:
doTagImpl in class AbstractTag
Throws:
java.io.IOException
javax.servlet.jsp.JspException

setCache

@Attribute
public void setCache(java.lang.String cache)
Deprecated. since Loom 2.0 this attribute will be ignored (see #LOOM-231). Instead, use l:cached


addChild

public void addChild(MenuItemData item)
Description copied from interface: MenuItemTagCollection
Add a MenuItemData as child of this node

Specified by:
addChild in interface MenuItemTagCollection

getMenu

public AbstractMenuData getMenu()

setId

public void setId(java.lang.String id)

setCssClass

@Attribute(name="class")
public void setCssClass(java.lang.String cls)
HTML attribute


getItemSeparator

public java.lang.String getItemSeparator()

setItemSeparator

public void setItemSeparator(java.lang.String itemSeparator)

setMenu

protected void setMenu(AbstractMenuData menu)

getId

public java.lang.String getId()

getCssClass

public java.lang.String getCssClass()