org.davesag.generica.controller
Class GenericContentSelector
java.lang.Object
org.davesag.generica.controller.AbstractController
org.davesag.generica.controller.AbstractActionController
org.davesag.generica.controller.AbstractHibernateController
org.davesag.generica.controller.GenericContentSelector
- All Implemented Interfaces:
- ActionController, Controller, Presenter
- public class GenericContentSelector
- extends AbstractHibernateController
- implements Presenter
This controller manages presentation of SiteCopy for your application. You must
provide the appropriate section name as a presentation-param in the action
definition's parameter in struts-config.xml file.
eg:
<action
path="/out/about"
type="org.davesag.generica.servlet.action.ForwardAction"
parameter="presentation-controller=com.myapp.controller.GenericContentSelector;
presentation-param=section:about">
<forward name="page" path="about.page"/>
</action>
- Since:
- Generica 1.0
- Version:
- CVS Revision $Id: GenericContentSelector.java,v 1.7 2004/04/06 15:40:40 davesag Exp $
- Author:
- Dave Sag
http://www.davesag.com
- See Also:
SiteCopyPeer.loadLatest(net.sf.hibernate.Session, java.lang.String, java.util.Locale)
|
Method Summary |
void |
prepare(Map params)
Loads the appropriate piece of SiteCopy into the request
based on the current Locale and the last modified date of
the copy. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericContentSelector
public GenericContentSelector()
prepare
public void prepare(Map params)
throws Exception
- Loads the appropriate piece of
SiteCopy into the request
based on the current Locale and the last modified date of
the copy. If there is no matching SiteCopy then loads
null
- Specified by:
prepare in interface Presenter
- Parameters:
params - expecting param called 'section' with some valid value.
- Throws:
Exception - if anything goes wrong.- See Also:
SiteCopyPeer
Dave Sag Generica API version 0.5.9 - (prerelease) Copyright © 2003 - 2004 Dave Sag.