RE: RE: Transforms and how they are implemented
"Schnitzer, Jeff" <[email protected]>
| Newsgroups | gmane.comp.web.maverick.general |
|---|---|
| Message-ID | <[email protected]> |
> From: [email protected] [mailto:[email protected]] > > I am wondering if there could be a different type of wrapper for content, > instead of transforms, so that it could just act the same as jsp includes. > > Like same idea as the friendbook type transform, but stream everything > out. > > Ex: > <view name="success" path="edit.jsp"> > <include path="trimInside.jsp"/> > </view> > > Then it would treat that trim like an include instead of a transform? You can already do this quite easily like this: <view name="success" path="trimInside.jsp"> <param name="body" value="edit.jsp"/> </view> This way you have a trimInside.jsp that looks something like this: <html> <body> ...blah header blah... ...blah navbar blah... <jsp:include page="<%= request.getAttribute("body") %>" flush="true"/> </body> </html> This will work just fine and eliminate the buffering overhead. However, it puts some serious limitations on how the "body" can interact with the "trim" because now the trim is being executed _before_ the body. One of the nice things about having the body execute first is that it can set up parameters in the request attributes that affect behavior of trim execution, such as specifying a title for the page. This is hard to do with the include-based operation above. Of course to get really complicated, I'd be surprised if struts-tiles didn't work with Maverick. BTW, this is one area in which XSL *really* shines, at least as far as flexibility is concerned. Performance might be an issue depending on the operations, unfortunately :-( Jeff Schnitzer [email protected] ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php [INVALID FOOTER]