[
https://issues.apache.org/jira/browse/SLING-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550051
]
Bertrand Delacretaz commented on SLING-114:
-------------------------------------------
Revision 602834 has been reverted in sling/scripting/javascript, as it breaks
the sync in line numbers between the template and generated source code.
The special <script> tag handling for ECT still basically works, but can be
broken by constructs like
<% for(i=0; i< 10; i++) {
} %><script>more scripting</script><% for(i=0; i< 10; i++) {
} %>
The SlingResourceTypeRenderingTest.testEctHtmlScriptTagB test shows the
problem, I'll leave it disabled until this is fixed.
I'm planning to make the "put each out.write on its own line" feature an option
in the EspReader (using overridable pre- and postfix Strings for these
out.write statements) , and activate it iwhen the reader is used in the
EctScriptEngine.
> ECT - Ecmascript Client Templates
> ---------------------------------
>
> Key: SLING-114
> URL: https://issues.apache.org/jira/browse/SLING-114
> Project: Sling
> Issue Type: Improvement
> Components: microsling
> Reporter: Bertrand Delacretaz
> Attachments: SLING-114.patch, SLING-114.patch
>
>
> To complete the javascript scripting features for microsling, I'd like to
> implement a client-side version of the ESP templates.
> A template such as
> <p class="<%= item.color %>"><%= item.text %></p>
> Will be processed server-side to generate javascript client code such as
> document.write("<p class=");
> document.write(item.color);
> document.write("\">");
> document.write(item.text);
> document.write("</p>\n");
> which executes on the client to render the content.
> Combined with a richer XHTML default rendering of data than what we have now,
> this creates interesting possibilities for ajaxish apps based on
> microsling/microjax (SLING-92).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.