Re: Content Scoping
Anthony Eden <[email protected]> Fri, 11 Jul 2003 10:42:48 -0400
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
I can go either way on this. If enough people are interested in scoping
then perhaps I can put it in as an option. The main benefit from
scoping I believe would be in cases where you have content actions
produced by two different authors which may not know what the other is
doing. In this case it would be nice to have a safety mechanism so that
the author of one content action wouldn't mess with the context values
for the other content.
Perhaps the easiest thing to do would be to allow a content-local
context and have content lookups occur there first and then if the
object is not found look in the global context?
Sincerely,
Anthony Eden
Andy Zeneski wrote:
> Thought I would throw out a quick idea and see what other JP users think. I
> was thinking it might be nice to introduce a little scoping when it comes to
> content actions.
>
> Currently in JP:
> Page actions run first
> Template actions run when merge is called
> Content actions run for each included content
>
> If content1 sets some values in the JP context they are currently available
> to content1 and everything which follows.
> If content1 overrode some value defined in a page action, it is no longer
> available.
>
> I am proposing content actions be limited in scope to just the included
> content.
>
> page action:
> context.put("foo", bar");
>
> include content1
> content1 action:
> context.put("foo", "nobar");
> foo = nobar for content1
>
> include content2
> no action for content2
> foo = bar for content2
>
> I'd like to hear thoughts on this..
>
> -Andy
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps
> _______________________________________________
> Jpublish-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jpublish-developer
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1