Re: XMLC and Struts

David Corbin <[email protected]> Mon, 22 Sep 2003 10:14:20 -0400
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
On Monday 22 September 2003 08:23, David Li wrote:
> A while ago, someone posted using Struts and XMLC. I'd like to learn
> more about it. Thanks.
>

I know I've mentioned it.  What we've done, is to create a PresentationObject 
(sound familiar), which is responsible for doing all the XMLC stuff, and then 
producing the HTML (and headers, etc.) 

For each page, we generally have one class derrived from a PO.  If there are 
many similar pages, we might have an intermediate class the provides common 
handling of common page portsion.

In the action construct and call this object, which generates the output.  We 
return null from the action.

Then, of course, we built a family of objects for common manipulations. 
(Forms, Tables, RepeatingBlock, Include, Tree) etc. the PO-derived class can 
call.

One "tangent team", opted for a strategy where they wrote actions that did 
NOTHING but present a page based on what was in the request.  This made it 
more viable to switch to JSP (and back).  I didn't like that, because you 
give up type-safety (to a degrree) when you stuff everything into the 
request.

Questions?

David