You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Steve Hanson (JIRA)" <be...@incubator.apache.org> on 2004/11/11 20:33:24 UTC

[jira] Resolved: (BEEHIVE-80) Page Flow Overview - simple actions versus complex actions

     [ http://nagoya.apache.org/jira/browse/BEEHIVE-80?page=history ]
     
Steve Hanson resolved BEEHIVE-80:
---------------------------------

      Assign To:     (was: Steve Hanson)
     Resolution: Fixed
    Fix Version: V1Alpha

I added the following paragraph to the doc:

"
The code above can be made even cleaner by defining "simple actions" at the class-level. Using the @Jpf.SimpleAction annotation at the class-level you can remove the controller methods and their annotations altogether. The code above can be replaced with the class-level annotations shown below:

    @Jpf.Controller(
        simpleActions={
            @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
            @Jpf.SimpleAction(name="login", path="login.jsp")
        }
    )
public class Controller 
    extends PageFlowController
{
}

"

> Page Flow Overview - simple actions versus complex actions
> ----------------------------------------------------------
>
>          Key: BEEHIVE-80
>          URL: http://nagoya.apache.org/jira/browse/BEEHIVE-80
>      Project: Beehive
>         Type: Improvement
>   Components: Documentation
>     Versions: V1Alpha
>     Reporter: Rich Feit
>      Fix For: V1Alpha

>
> Using "simple actions" could reduce the size of the page flow being discussed, and it might make a clearer case for the method-based actions that come in the section entitled Conditional Forwards.  Basically, you could replace code like this:
>     @Jpf.Action(
>         forwards = {
>             @Jpf.Forward( name="success", path="signup.jsp" );
>         }
>     )
>     public Forward signUp()
>     {
>         return new Forward( "success" );
>     }
>     @Jpf.Action(
>         forwards = {
>             @Jpf.Forward( name="success", path="login.jsp" );
>         }
>     )
>     public Forward login()
>     {
>         return new Forward( "success" );
>     }
> ...with this, at the class level:
>     @Jpf.Controller(
>         simpleActions={
>             @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
>             @Jpf.SimpleAction(name="login", path="login.jsp")
>         }
>     )
> It's just a nice (new) feature that can reduce the size/complexity of a page flow class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira