net.sf.oness.common.webapp.controller.tiles
Class SwitchLayoutController
java.lang.Object
org.apache.struts.tiles.ControllerSupport
net.sf.oness.common.webapp.controller.tiles.SwitchLayoutController
- All Implemented Interfaces:
- org.apache.struts.tiles.Controller
- public class SwitchLayoutController
- extends org.apache.struts.tiles.ControllerSupport
- implements org.apache.struts.tiles.Controller
Tiles controller that checks user-agent header in request and overrides tiles
definition attributes.
There is a rule Map in which the key is a string and value is a definition
name. If key is contained in user-agent header then all the attributes of the
tiles definition are overridden with those of the definition specified as map
value and the ones that do not exist are added.
e.g. map contains an entry with "PalmSource" as key and
".layout.palmSourceLayout" as value.
When a browser with "PalmSource" in
its user-agent header asks for a page, the definition taken from tiles-defs
file will have its attributes plus those from ".layout.palmSourceLayout"
definition, overriding the ones that already exist.
- Version:
- $Revision: 1.1 $
- Author:
- Carlos Sanchez
Method Summary |
void |
execute(org.apache.struts.tiles.ComponentContext tileContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext)
|
Methods inherited from class org.apache.struts.tiles.ControllerSupport |
perform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.struts.tiles.Controller |
perform |
SwitchLayoutController
public SwitchLayoutController()
execute
public void execute(org.apache.struts.tiles.ComponentContext tileContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext)
throws java.lang.Exception
- Specified by:
execute
in interface org.apache.struts.tiles.Controller
- Throws:
java.lang.Exception
- See Also:
Controller.execute(org.apache.struts.tiles.ComponentContext,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse,
javax.servlet.ServletContext)
Copyright © 2003-2005 ONess Project. All Rights Reserved.