[ http://issues.apache.org/jira/browse/BEEHIVE-41?page=all ] Julie Zhuo closed BEEHIVE-41: -----------------------------
Verified fixed at rev170022. > Cannot use an interface as the form bean for an action > ------------------------------------------------------ > > Key: BEEHIVE-41 > URL: http://issues.apache.org/jira/browse/BEEHIVE-41 > Project: Beehive > Type: Improvement > Components: NetUI > Versions: V1Alpha > Reporter: Rich Feit > Assignee: Julie Zhuo > 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://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira