On Mon, 2006-01-02 at 00:00 +0100, Jürgen Avian wrote:
> Hi!
>
> A friend of mine told me to address this issue to Simon Kitching:
>
> I've added some javascript code to my jspx source file like this:
>
> ...
> <t:div id="tabbody" forceId="true" forceIdIndex="true">
> <script type="text/javascript">
> <!--
> function testHello ()
> {
> alert ("Hello");
> }
> //-->
> </script>
> <table styleClass="outerTable" style="height:417;" width="720 px">
> <tr>
> ....
>
> This script is not displayed in the generated html-file. All you see is:
> ... <script type="text/javascript"><!--
>
> //--></script><table .....
>
> Am I wrong if I suppose the script-code to be showed in the html-file?
> The html-page is generated out of several jspx files which are
> combined together via tiles.
> Do I have to use some special tags or is there a problem with the htmlparser?
I doubt the problem is with the ReducedHtmlParser class. If that class
was getting confused by the input, then it could potentially hang, or
might report back incorrect offsets to its caller, resulting in
script/stylesheet/etc references inserted by Tomahawk components being
inserted into wrong locations in the generated page. However I can't
imagine any scenario where the ReducedHtmlParser would cause output to
be *lost*; it just reports back offset values to its caller.
There is a known JSF1.1/Tiles issue where your output will typically be
output *after* all JSF-generated content in the same file, so I would
expect to see a <div></div> output by the t:div JSF tag, with the script
output *later* in the page. However it should still be there. The reason
for this is described on the wiki, and the usual fix is to wrap all
non-JSF output in an <f:verbatim> tag.
If your script code is really not appearing *at all* then you have some
other problem, and I'm not sure what that would be.
By the way, this sort of question should be sent to the user list, not
the development list.
Regards,
Simon