myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (TOMAHAWK-1327) A proposed solution to separate javascript code from java code in Renderers
Date Fri, 12 Sep 2008 22:43:44 GMT


Leonardo Uribe commented on TOMAHAWK-1327:

Taking the problem from other point of view, maybe we are using a bomb to open a can. There
is a code used on error handling (javax.faces.webapp._ErrorPageWriter) that takes a template,
separate into tokens and join it. Other idea could be jdbc way to create prepared statements.

A custom template solution for jsf components sound better. I'll try one to see what happens.

> A proposed solution to separate javascript code from java code in Renderers
> ---------------------------------------------------------------------------
>                 Key: TOMAHAWK-1327
>                 URL:
>             Project: MyFaces Tomahawk
>          Issue Type: New Feature
>            Reporter: Paul Rivera
>            Priority: Minor
>         Attachments: freemarker_impl.rar
> In our current implementation of component renderers, javascript code is generated using
ResponseWriter methods inside the renderer. Although, when the embedded javascript code gets
too lengthy, the renderer code can become hard to read and debug.
> The proposition is to provide developers with a tool that separates javascript code from
the renderer code and move it into template files. This solution is similar to how TemplateRenderer
handles HTML content.
> Attached above is the JavascriptTemplateEncoder implementation that uses FreeMarker.
 More information about JavascriptTemplateEncoder and its performance in the PDF files inside
the zip.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message