[ 
http://issues.apache.org/jira/browse/BEEHIVE-846?page=comments#action_12315668 
] 

Xibin Zeng commented on BEEHIVE-846:
------------------------------------

Could we pass the action paths in the flowControllerRegisterered() event?

In other words, could we change the signature from 

flowControllerRegistered( String modulePath, String controllerClassName )

to 

flowControllerRegistered( String modulePath, String controllerClassName, 
String[] actions )

I think a slight modification to AutoRegisterActionServlet could achieve this:

        //
        // If this is a FlowController module, make a callback to the event 
reporter.
        //
        ControllerConfig cc = ac.getControllerConfig();
        if ( cc instanceof PageFlowControllerConfig )
        {
            PageFlowControllerConfig pfcc = ( PageFlowControllerConfig ) cc;
            PageFlowEventReporter er = 
AdapterManager.getServletContainerAdapter( getServletContext() 
).getEventReporter();

            LinkedList<String> actions = new LinkedList<String>();
            ActionConfig accs[] = ac.findActionConfigs();
            for (ActionConfig acc : accs)
            {
                actions.add(acc.getPath());
            }
            er.flowControllerRegistered( modulePath, pfcc.getControllerClass(), 
actions.toArray(new String[actions.size()]) );
        }

> add a "PageFlow registered" event to the EventReporter
> ------------------------------------------------------
>
>          Key: BEEHIVE-846
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-846
>      Project: Beehive
>         Type: Improvement
>   Components: NetUI
>     Versions: TBD
>  Environment: all
>     Reporter: David Read
>     Assignee: David Read
>     Priority: Minor
>      Fix For: V1

>
> Currently the set of PageFlows in a webapp aren't know until they are 
> invoked.  If you want to do things like integrate monitoring via JMX, you 
> need a lazy instantiation model.  If there were an event generated when a 
> PageFlow was registered, you'd have a hook to know that something "new" was 
> now part of the webapp.  

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

Reply via email to