chetan
chetan

Reputation: 3255

Unicode display problem in JSF tag

I have following line of code for jsp tag

<input name="UnicodeVirtualKey" class="btn" type="button" value="&#x0A85;" onclick="insert('&#x0A85;')" />

and for JSF

<h:commandButton value="&#x0A86" onclick="insert('&#x0A86')" ></h:commandButton>

But it will display same i.e &#x0A86 not its unicode.

shall anybody tell me what is the problem

Upvotes: 1

Views: 2688

Answers (2)

Stephen C
Stephen C

Reputation: 718886

In the JSF case, you are missing a semicolon in the value attribute. Is that the problem?


Actually, given your edit to the question, I think the missing semicolon probably is the problem!!

  • The character sequence &0xABCD; is an XML / HTML character reference for the Unicode codepoint ABCD.

  • The character sequence &0xABCD (missing semicolon!) is just a sequence of characters that stand for themselves.

(If it is not the issue, why did you edit the question to remove the semicolon??)

Upvotes: 2

Shervin Asgari
Shervin Asgari

Reputation: 24499

Try using <f:verbatim> or <h:outputText value="&#x0A85;"/> Does it print out its unicode? If yes, then you need to figure out how to use it like that. In facelets/seam, you can use EL expression in javascript

Upvotes: 0

Related Questions