You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by Carlin Rogers <ca...@gmail.com> on 2006/07/14 01:03:19 UTC

Page flow inheritance and controls

I have another question related to a JIRA bug about page flow inheritance
and controls, BEEHIVE-1060. Is there a reason why we specifically do not
have the JavaControlUtils class initialize a private control field inherited
from a super class in the page flow inheritance hierarchy?

For example, a base class page flow contains a control that is private but
has some public or protected methods that access or use the control. The
derived page flow does not have a control or direct access to the control
but may want to call/use the inherited methods that access the control.
Currently we do not initialize the inherited private control so a call in
the derived class to the inherited method would fail with an NPE. I think
that JavaControlUtils.getAccessibleControlFieldAnnotations() should also
check for the private control field(s) of a super class, set it to be
accessible and then do the control intialization. Seem right?

Kind regards,
Carlin

Re: Page flow inheritance and controls

Posted by Carlin Rogers <ca...@gmail.com>.
OK, thanks Rich! I appreciate the help and just wanted to make sure I wasn't
missing something.

Carlin

On 7/18/06, Rich Feit <ri...@gmail.com> wrote:
>
> Same reason -- brain glitch on my part.  Sorry about that.  Your
> analysis seems correct to me.
>
> Rich
>
> Carlin Rogers wrote:
> > I have another question related to a JIRA bug about page flow
> inheritance
> > and controls, BEEHIVE-1060. Is there a reason why we specifically do not
> > have the JavaControlUtils class initialize a private control field
> > inherited
> > from a super class in the page flow inheritance hierarchy?
> >
> > For example, a base class page flow contains a control that is private
> > but
> > has some public or protected methods that access or use the control. The
> > derived page flow does not have a control or direct access to the
> control
> > but may want to call/use the inherited methods that access the control.
> > Currently we do not initialize the inherited private control so a call
> in
> > the derived class to the inherited method would fail with an NPE. I
> think
> > that JavaControlUtils.getAccessibleControlFieldAnnotations() should also
> > check for the private control field(s) of a super class, set it to be
> > accessible and then do the control intialization. Seem right?
> >
> > Kind regards,
> > Carlin
> >
>

Re: Page flow inheritance and controls

Posted by Rich Feit <ri...@gmail.com>.
Same reason -- brain glitch on my part.  Sorry about that.  Your 
analysis seems correct to me.

Rich

Carlin Rogers wrote:
> I have another question related to a JIRA bug about page flow inheritance
> and controls, BEEHIVE-1060. Is there a reason why we specifically do not
> have the JavaControlUtils class initialize a private control field 
> inherited
> from a super class in the page flow inheritance hierarchy?
>
> For example, a base class page flow contains a control that is private 
> but
> has some public or protected methods that access or use the control. The
> derived page flow does not have a control or direct access to the control
> but may want to call/use the inherited methods that access the control.
> Currently we do not initialize the inherited private control so a call in
> the derived class to the inherited method would fail with an NPE. I think
> that JavaControlUtils.getAccessibleControlFieldAnnotations() should also
> check for the private control field(s) of a super class, set it to be
> accessible and then do the control intialization. Seem right?
>
> Kind regards,
> Carlin
>