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 <ri...@gmail.com> on 2005/06/23 19:12:31 UTC

inheriting pages in page flows

Hi all,

I'd like some design feedback here.  
http://issues.apache.org/jira/browse/BEEHIVE-400 deals with a much-asked 
question: if you have a page flow that inherits from another page flow, 
how can you also inherit pages from the base page flow?  Currently, 
there's no good way to do it, which is an obvious hole.  My thought is 
to do something really simple (from the user's point of view :) ), like 
have a class-level annotation attribute:

    inheritLocalPaths=true

This would cause local paths in *inherited* actions to be used in the 
context of the current page flow.  I think this might be sufficient, and 
even if it turns out it's not, it seems like a good start.  Any 
thoughts/comments on this?

Thanks,
Rich

Re: inheriting pages in page flows

Posted by Rich Feit <ri...@gmail.com>.
Good questions -- I meant that we'd keep track of @Jpf.Forwards and 
@Jpf.SimpleActions that come from a base class (by inheriting an action, 
or just by inheriting elements of an inherited @Jpf.Controller).  If you 
hit one of those @Jpf.Forwards or @Jpf.SimpleActions, we'd access a 
local path as relative to the base class page flow, but we'd ensure that 
you stay in the context of the current page flow.

If you override the inherited action, you wouldn't be inheriting its 
forwards at all, so you'd only have the ones you defined on the 
inherited action.

Does that answer the questions (and does that sound like a good way for 
this to work)?

Daryl Olander wrote:

>By "local paths in *inherited* actions" do you mean if you inherit and
>action, then the local path of the class the action was defined in is
>used?
>
>What happens if you override the inherited action?  Do you end up with
>two sets of forwards, the inherited forward and any newly declared
>forwards?
>
>On 6/23/05, Rich Feit <ri...@gmail.com> wrote:
>  
>
>>Hi all,
>>
>>I'd like some design feedback here.
>>http://issues.apache.org/jira/browse/BEEHIVE-400 deals with a much-asked
>>question: if you have a page flow that inherits from another page flow,
>>how can you also inherit pages from the base page flow?  Currently,
>>there's no good way to do it, which is an obvious hole.  My thought is
>>to do something really simple (from the user's point of view :) ), like
>>have a class-level annotation attribute:
>>
>>   inheritLocalPaths=true
>>
>>This would cause local paths in *inherited* actions to be used in the
>>context of the current page flow.  I think this might be sufficient, and
>>even if it turns out it's not, it seems like a good start.  Any
>>thoughts/comments on this?
>>
>>Thanks,
>>Rich
>>
>>    
>>
>
>  
>

Re: inheriting pages in page flows

Posted by Daryl Olander <do...@gmail.com>.
By "local paths in *inherited* actions" do you mean if you inherit and
action, then the local path of the class the action was defined in is
used?

What happens if you override the inherited action?  Do you end up with
two sets of forwards, the inherited forward and any newly declared
forwards?

On 6/23/05, Rich Feit <ri...@gmail.com> wrote:
> Hi all,
> 
> I'd like some design feedback here.
> http://issues.apache.org/jira/browse/BEEHIVE-400 deals with a much-asked
> question: if you have a page flow that inherits from another page flow,
> how can you also inherit pages from the base page flow?  Currently,
> there's no good way to do it, which is an obvious hole.  My thought is
> to do something really simple (from the user's point of view :) ), like
> have a class-level annotation attribute:
> 
>    inheritLocalPaths=true
> 
> This would cause local paths in *inherited* actions to be used in the
> context of the current page flow.  I think this might be sufficient, and
> even if it turns out it's not, it seems like a good start.  Any
> thoughts/comments on this?
> 
> Thanks,
> Rich
>