Paragraph renderer should be able to interact with JEE request and response 
objects
-----------------------------------------------------------------------------------

                 Key: MAGNOLIA-1977
                 URL: http://jira.magnolia.info/browse/MAGNOLIA-1977
             Project: Magnolia
          Issue Type: Improvement
          Components: templating
    Affects Versions: 3.5.2
         Environment: Windows 2003 SP2, Tomcat 6.0.14, JDK 1.5.11
            Reporter: Keith Childers
         Assigned To: Philipp Bracher
         Attachments: info.magnolia.zip

In attempting to integrate custom applications developed in ColdFusion and PHP 
into our magnolia 3.5 setup, we created paragraph templates of a custom "cfm" 
and "php", each written in its respective scripting language. These templates 
and their dialogs wrapped the ability to embed an application of the same type 
as a paragraph within the magnolia-rendered layout. This is nice because it 
allows us to place multple applications written in different languages in the 
same page. It is also nice that any code error encountered in a paragraph 
template doesn't halt execution of the rest of the page, and in fact displays 
the stack trace of that error as content for troubleshooting purposes and 
allows us to try-catch errors within the application rather than having to deal 
with exception handling at the page level.

However, a problem arises when your applications need to be able to access the 
request object from the main JEE page request and write things into that object 
for processing later on in the request, or to be able to write to the response 
object for header insertion, for instance if the application were going to 
stream bits with a custom mime header to serve a file from binary storage, or 
to insert a redirection header. 

Currently, it seems that the pluggable templating mechanism doesn't allow the 
paragraph templates to have write access to the request or response at the page 
level. I also haven't figured out how to get read access to the page request 
object from a paragraph without explicitly passing a reference to it into the 
include.

One of our developers customized several classes in the info.magnolia.context 
package to be able to override this behavior at a paragraph instance level by 
setting a custom property (isApplication) on the paragraph node in the JCR. He 
also changed JSPParagraphRenderer class in the templating module to work with 
these customizations. It seems the work he did no longer works in 3.5 and we'd 
love to see the functionality he developed added as some sort of optional 
switch (whether at a root config or node property level, doesn't matter) in the 
core application.

I have attached source for the changes he made.

Thanks for your consideration!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to