You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by thermus <ms...@gmail.com> on 2008/12/03 01:11:31 UTC

Include HTML in Grid Cell

Is there a way to get HTML content to appear in a Grid cell?  Thinking I
could easily include multi-line text in a cell, I tried setting a bean
property to text with <br> tags.  However, when it renders the tags are
replaced by '& lt;' and '& gt;'.

The problem, I think, is that AbstractPropertyOutput.renderPropertyValue
uses 'write' which converts XML control characters to their "safe" XML
entity equivalents according to
http://tapestry.formos.com/nightly/tapestry5/guide/dom.html.  writeRaw seems
like it would do it, but it's buried pretty deep.  Is there another way of
allowing HTML to appear in a cell?
-- 
View this message in context: http://www.nabble.com/Include-HTML-in-Grid-Cell-tp20804000p20804000.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Include HTML in Grid Cell

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 02 Dec 2008 21:11:31 -0300, thermus <ms...@gmail.com> escreveu:

> Is there a way to get HTML content to appear in a Grid cell?

Yes. :) Suppose your text property is named "text":

<table t:type="Grid" t:row="object" ...>

	<t:parameter name="textCell">
		<div t:type="OutputRaw" t:value="object.text"/>
	</t:parameter>
	
</table>

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org