Modified: incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/action/WorkflowActionBean.java URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/action/WorkflowActionBean.java?rev=682139&r1=682138&r2=682139&view=diff ============================================================================== --- incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/action/WorkflowActionBean.java (original) +++ incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/action/WorkflowActionBean.java Sun Aug 3 05:12:47 2008 @@ -1,9 +1,25 @@ package com.ecyrd.jspwiki.action; -import net.sourceforge.stripes.action.UrlBinding; +import com.ecyrd.jspwiki.auth.permissions.PagePermission; [EMAIL PROTECTED]("workflow") [EMAIL PROTECTED]("/Workflow.action") +import net.sourceforge.stripes.action.*; + [EMAIL PROTECTED]( "/Workflow.jsp" ) public class WorkflowActionBean extends AbstractActionBean { + /** + * Default handler that simply forwards the user back to the view page. + * Every ActionBean needs a default handler to function properly, so we use + * this (very simple) one. + * + * @return a forward resolution back to the view page + */ + @DefaultHandler + @HandlesEvent( "view" ) + @HandlerPermission( permissionClass = PagePermission.class, target = "${page.name}", actions = PagePermission.VIEW_ACTION ) + @WikiRequestContext( "workflow" ) + public Resolution view() + { + return new ForwardResolution( ViewActionBean.class ); + } }
