On Oct 23, 2009, at 10:10 AM, Christian Stone wrote:
On Oct 23, 2009, at 12:01 PM, Brian Pontarelli wrote:
I've done some work with it and it looks to be completely
pluggable. I do this same thing in JCatapult with other libraries.
Essentially, I define a workflow chain in a configuration file that
is the "default" and it contains items that might not exists on the
classpath. If a specific workflow isn't there, I just de-activate
it. This is essentially how Struts2 would want to "determine" if
SiteMesh 3 is in the classpath. If it is, it would wire things up.
If not, it would de-activate that part of the filter-chain.
In terms of SiteMesh 3 being capable of being called
programmatically, last time I looked this was one of the primary
goals. The API was well defined and it allowed SiteMesh to be
invoked from nearly any code. I recall some discussion of allowing
it to be used outside of a servlet container as well. I'll have to
circle back and see if that is possible. I was also planning on
incorporating SiteMesh into the JCatapult email library so that
emails could also be decorated.
Once I get that stuff going, I'll let you know. I also will try and
work with the SiteMesh developers on ensuring the integration is as
generic and simple as possible.
-bp
This sounds great! I was just reviewing the alpha SiteMesh3 and
while it is far from complete it still seems to be tied to the same
filter/dispatcher architecture. Perhaps if SiteMesh allowed for
configurable renderers... now that would be great!
Check out all the offline and builder stuff in there. You can build a
Context yourself or use the offline or webapp Contexts. Plus,
everything passed to the Context's constructors are interfaces. There
are a number of implementations of these interfaces that you can use
or you can provide your own implementations.
In SiteMesh 3 the decorators are just HTML. This means that I can use
this process to handle everything:
1. Render the result FTL into HTML
2. Render the decorator FTL into HTML
3. Pass the result and decorator HTML to SiteMesh 3
4. SiteMesh spits out the final HTML
5. Push final HTML to client
Should be very straight-forward in fact.
-bp
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org