Is this a bug in current version of beehive?
-------------- Original message -------------- 
From: Eric Charles | U-Mangate <[EMAIL PROTECTED]> 

> Hi 
> 
> This is how I implemented a workaround: 
> 
> Base abstract Controller: 
> (...snip...) 
> @Jpf.Controller( 
> simpleActions = { @Jpf.SimpleAction(name = "index", path = 
> "begin.do") }) 
> public abstract class AOSBaseController extends PageFlowController { 
> 
> //--------------------------------------------------------LifCycle 
> Abstract 
> 
> protected abstract AOSSharedFlow getAosSharedFlow(); 
> 
> //--------------------------------------------------------LifCycle 
> Concrete 
> 
> protected void onCreate() { 
> (...snip...); 
> } 
> 
> protected void beforeAction() throws Exception { 
> logger.debug("PageFlow invoked with action 
> name="+this.getCurrentActionName()); 
> super.beforeAction(); 
> } 
> (...snip...) 
> 
> 
> Concrete Controller 
> 
> @Jpf.Controller( 
> simpleActions = [EMAIL PROTECTED](name = "index", path = 
> "begin.do") }, 
> sharedFlowRefs = [EMAIL PROTECTED](name = "aosSharedFlow", 
> type = aos.shared.AOSSharedFlow.class)}) 
> public class ConcreteController extends AOSBaseController { 
> 
> 
> //-----------------------------------------------------------------Controls 
> 
> @Jpf.SharedFlowField(name = "aosSharedFlow") 
> private AOSSharedFlow _aosSharedFlow = null; 
> 
> 
> //---------------------------------------------------------------Life Cycle 
> 
> protected void onCreate() { 
> super.onCreate(); 
> } 
> 
> protected void beforeAction() throws Exception { 
> super.beforeAction(); 
> _aosSharedFlow.ensureLogin(); 
> } 
> 
> protected AOSSharedFlow getAosSharedFlow() { 
> return _aosSharedFlow; 
> } 
> 
> 
> Hope this helps, 
> 
> Eric 
> 
> 
> 
> Srinivas Surapaneni wrote: 
> > I had a shared flow called SharedFlowController 
> > 
> > 
> > 
> > I had a BaseController which has references to the SharedFlowController. I 
> > declared a pageflow level variable for the shared reference 
> > 
> > 
> > 
> > I had a DerivedController which extends the BaseController 
> > 
> > 
> > 
> > When I tried to a access the shared flow reference it is always null. It is 
> > working when I explicitly declared a shared flow variable in the Derived 
> > Controller also 
> > 
> > 
> > 
> > 
> > 
> > Is there any problem with the way I am using it? 
> > 
> > 
> > 
> > Thank You 
> > 
> > Srinivas Surapaneni 
> > 
> > 
> > 
> 

Reply via email to