Re: Content Scoping
Lateef Jackson <[email protected]> 09 Jul 2003 13:19:55 -0400
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2003-07-09 at 12:18, 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..
>
We use context to pass object from one action to another so we would prefer a configurable option rather than something that is forced. If there is a better mechanism we would use that instead of the context.
Are actions tend to be small though because most of the work is in JBoss. So I could see if you had larger more complex actions you would need scoping. On the other hand if we where forced to scope we might have less of a ratnest and do more in JP and less in JBoss?
Well those are my 2 cents.
Lateef
Lateef Jackson <[email protected]>
-------------------------------------------------------
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