dev@jsftemplating.java.net

Re: descriptorDisplay

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Fri, 03 Nov 2006 12:17:53 -0800

Hi Senthil,

Some of the text output components support this for you automatically.
Attached is a .jsf file that demonstrates 10 different use-cases and the
results. The bottom line is that you probably want to use:

<sun:staticText text="$attribute{descriptor}" escape="$boolean{true}" />

Ken

Senthil Chidambaram wrote:
> Mike,
> Thanks, this is exactly what I'm looking for, but my question is if I use
> "<pre>
> <sun:staticText id="descriptor" text="$attribute{descriptor}"/>
> "</pre>
>
> should work, right? It's not.
>
> thx
> Senthil
> Mike Wright wrote:
>
>> Hi Senthil,
>>
>> Priti implemented our descriptor support to display jbi.xml
>> metadata as html. I asked her to escape the angle brackets. You
>> can look at admin-gui/admin-jsf:
>>
>> > src/docroot/jbi/showMetadata.jsf
>> > src/java/com/sun/jbi/jsf/beans/ShowBean.java
>> (queryDeploymentOrInstallationDescriptor method)
>> > src/java/com/sun/jbi/jsf/util/FormattingUtilties.java
>> (xmlStringToHtml method)
>>
>> Regards,
>> Mike
>> ---
>> Senthil Chidambaram wrote:
>>
>>> Ken,
>>> I'm trying to display the descriptors on the browser. I've created a
>>> jsf file with just
>>> <sun:staticText id="descriptor" text="$attribute{descriptor}"/>,
>>>
>>> the problem I'm facing is, when the descriptors are displayed <>
>>> tags in the xml file are being parsed, and not getting displayed on
>>> the browser. I don't want any code to do any parsing, or
>>> interpreting the String, my handler code sends, any ideas?
>>>
>>> thx
>>> Senthil
>>
>>
>

Test "); /> "

With a literal value...

" ": Test "
' ': Test "
"
"
"

"

With a ValueBinding \#{} value...

" ": #{testString} "
' ': #{testString} "
"
"