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

[jira] Resolved: (BEEHIVE-41) Cannot use an interface as the form bean for an action

     [ http://nagoya.apache.org/jira/browse/BEEHIVE-41?page=history ]
     
Rich Feit resolved BEEHIVE-41:
------------------------------

     Assign To: Steve Tocco  (was: Rich Feit)
    Resolution: Fixed

Fixed with svn revision 57113.  Steve/Julie, let me know if you need more info on this.

> Cannot use an interface as the form bean for an action
> ------------------------------------------------------
>
>          Key: BEEHIVE-41
>          URL: http://nagoya.apache.org/jira/browse/BEEHIVE-41
>      Project: Beehive
>         Type: Improvement
>   Components: NetUI
>     Versions: V1Alpha
>     Reporter: Rich Feit
>     Assignee: Steve Tocco
>      Fix For: V1Beta

>
> This deals with returning data from nested page flows, in the case where multiple nested page flows may return to the same calling page flow.
> Consider the scenario where you have a generic calling page flow that can forward to any number of nested page flows, and where each of the nested page flows conforms to an 'interface' of returnActions.  When the nested page flow returns, you may want to specify an interface type or base class type in the action method on the calling page flow, so the nested page flow can return an implementation/extension of the type.  Currently, the exact types of the returned bean and the handler action's bean must match.
> Here's an example of what I'm talking about:
> generic interface for returning data:
> -------------------------------------
> public interface DataReturn
> {
>     ...
> }
> calling page flow:
> ------------------
> @Jpf.Controller
> public class CallingController extends PageFlowController
> {
>     @Jpf.Action
>     public Forward goNested()
>     {
>         URI uri = lookupNestedPageFlowURI();   // user code to determine the nested page flow URI dynamically
>         Object inputBean = ...;
>         return new Forward( uri, inputBean );
>     }
>     @Jpf.Action( ... )
>     public Forward nestedDone( DataReturn dataReturn )
>     {
>         ...
>     }
>     ...
> }
> a nested page flow:
> -------------------
> @Jpf.Controller
> public class Nested extends PageFlowController
> {
>     private static class MyDataReturn implements DataReturn
>     {
>         ...
>     }
>     @Jpf.Action(
>         forwards={
>             @Jpf.Forward(name="exit", returnAction="nestedDone")
>         }
>     )
>     public Forward done()
>     {
>         return new Forward( "exit", new MyDataReturn( ... ) );
>     }
> }

-- 
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