net.sf.navigator.menu
Class MenuLoader

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by net.sf.navigator.menu.MenuLoader
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public class MenuLoader
extends org.springframework.web.context.support.WebApplicationObjectSupport

This loader is available for those that use the Spring Framework. To use it, simply configure it as follows in your applicationContext.xml file.

 <bean id="menu" class="net.sf.navigator.menu.MenuLoader">
  <property name="menuConfig">
      <value>/WEB-INF/menu-config.xml</value>
   </property>
 </bean>
 

The menuConfig property is an optional attribute. It is set to /WEB-INF/menu-config.xml by default.

Author:
Matt Raible

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
MenuLoader()
           
 
Method Summary
protected  void initApplicationContext()
          Initialization of the Menu Repository.
 void setMenuConfig(String menuConfig)
          Set the Menu configuration file
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuLoader

public MenuLoader()
Method Detail

setMenuConfig

public void setMenuConfig(String menuConfig)
Set the Menu configuration file

Parameters:
menuConfig - the file containing the Menus/Items

initApplicationContext

protected void initApplicationContext()
                               throws org.springframework.context.ApplicationContextException
Initialization of the Menu Repository.

Overrides:
initApplicationContext in class org.springframework.context.support.ApplicationObjectSupport
Throws:
org.springframework.context.ApplicationContextException - if an error occurs


Copyright © 2003-2007 SourceForge. All Rights Reserved.