I've investigated this issue and realized that the problem isn't receiving the unfiltered character, but writing it to the client. Here's the situation: my component receives a string parameter that is simply passed to a javascript object. This parameter is a css selector rule as supported by the prototype library:

http://www.prototypejs.org/api/element/getelementsbyselector
http://www.prototypejs.org/api/utility/dollar-dollar

The javascript object uses this rule to locate the set of elements upon which it should operate, allowing greater control of how a user structures their template markup. So in my case I want to select all of the immediate child divs, I can use the rule '> div'. The problem is that when the final markup sent to the browser, this string is filtered as '>' - this breaks my rule. After some digging and *some real time discussion with other developers (fanf) in the IRC channel (#tapestry irc.freenode.net)*, I realized the problem is a bit deep.

To add my scripts my component employs the PageRenderSupport environmental. Longer explanation made short, this ends up in my script code (added by addScript()) being added to the document using Element#text. This method does the filtering, and there's nothing I can do about it.

The only option I think I have is to contribute by own implementation of PageRenderSupport. However since I can't just extend PageRenderSupportImpl and delegate to it (its an internal service), this seems to leave me stranded with the task of reimplementing it from scratch.

Obviously I don't want to do that, so I'm asking for some input from those with a deeper knowledge. How can this be done better? Does it makes sense to use Element#text instead of Element#raw in DocumentHeadBuilderImpl#updateDocument, since where writing script code and not markup?

sincerely,
chris

Chris Lewis wrote:
My component takes a parameter with a default binding prefix of 'literal'. This parameter needs to be able to receive strings with characters like '>', but apparently the literal prefix causes them to be converted to entities. How can I pass unfiltered characters to my component as a parameter?

Thanks,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to