You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by pickerel <pi...@gmail.com> on 2005/11/04 04:00:24 UTC
unintelligent TemplateParser
i put some java script into the .html template,
<select name="">
<script>
<![CDATA[
for (var i = 1; i <= 31; i++)
{
document.write("<option>" + i + "</option>");
}
]]>
</script>
</select>
but got the error:
org.apache.tapestry.parse.TemplateParseException
Closing tag </option> on line 24 is improperly nested with tag <html>
on line 1.
location: context:/WEB-INF/pages/admin/stat/order.html, line 24
19 <select name="">
20 <script>
21 <![CDATA[
22 for (var i = 1; i <= 31; i++)
23 {
24 document.write("<option>" + i + "</option>");
25 }
26 ]]>
27 </script>
28 </select> -
29 <select name="">
Stack Trace:
* org.apache.tapestry.parse.TemplateParser.templateParseProblem
(TemplateParser.java:391)
* org.apache.tapestry.parse.TemplateParser.closeTag
(TemplateParser.java:1191)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: unintelligent TemplateParser
Posted by Chris Burnley <ch...@gmail.com>.
perhaps there is a problem with the parser, but why don't you do it in a
proper tapesty "for" component.
On 11/4/05, pickerel <pi...@gmail.com> wrote:
>
> i put some java script into the .html template,
> <select name="">
> <script>
> <![CDATA[
> for (var i = 1; i <= 31; i++)
> {
> document.write("<option>" + i + "</option>");
> }
> ]]>
> </script>
> </select>
>
> but got the error:
>
> org.apache.tapestry.parse.TemplateParseException
> Closing tag </option> on line 24 is improperly nested with tag <html>
> on line 1.
> location: context:/WEB-INF/pages/admin/stat/order.html, line 24
> 19 <select name="">
> 20 <script>
> 21 <![CDATA[
> 22 for (var i = 1; i <= 31; i++)
> 23 {
> 24 document.write("<option>" + i + "</option>");
> 25 }
> 26 ]]>
> 27 </script>
> 28 </select> -
> 29 <select name="">
> Stack Trace:
>
> * org.apache.tapestry.parse.TemplateParser.templateParseProblem
> (TemplateParser.java:391)
> * org.apache.tapestry.parse.TemplateParser.closeTag
> (TemplateParser.java:1191)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>