jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r682139 [6/6] - in /incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki: ./ action/
Date Sun, 03 Aug 2008 12:12:49 GMT
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;
 
-@WikiRequestContext("workflow")
-@UrlBinding("/Workflow.action")
+import net.sourceforge.stripes.action.*;
+
+@UrlBinding( "/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 );
+    }
 }



Mime
View raw message