2

I tried to create a command button with value <<.

<h:commandButton value="<<" />

However, it threw the following exception:

javax.faces.view.facelets.FaceletException: Error Parsing /test.xhtml: Error Traced[line: 42] The value of attribute "value" associated with an element type "h:commandButton" must not contain the '<' character.

How do I create such a button?

1
  • jsf version, facelets or jsp, what are the facelets configurations?
    – Bozho
    Feb 3, 2011 at 9:38

4 Answers 4

6
<h:commandButton value="&#60;&#60;" />
5
  • @vivek, try again, updated the answer. Feb 3, 2011 at 8:11
  • The value of attribute "value" associated with an element type "a4j:commandButton" must not contain the '<' character. This type error found
    – vivek
    Feb 3, 2011 at 8:52
  • check update. I tested locally, its working Feb 3, 2011 at 9:46
  • or choose any represent that java understands from here Feb 3, 2011 at 9:47
  • @Jigar Joshi,Vivek This will work if the view is XML; these entities aren't interpreted in standard JSP syntax (at least, not in Glassfish)
    – Maddy
    Jul 14, 2011 at 4:22
0
<a4j:commandButton value="&lt;&lt;"></a4j:commandButton>
0
0
<h:commandButton value="&lt;&lt;"  action="#{myBean.action}" />
-1

JSF provides default button compponent called h:commandButton value="<<" action="#{buttonController.action}"/>".

Here in action buttonController is the managed bean name and action is the method to call after clicking this button.

3
  • 1
    Why are you repeating an already given answer? If you agree an answer, just upvote it. This is a Q&A site, not an old fashioned discussion forum or something primitive.
    – BalusC
    Dec 6, 2012 at 11:20
  • @BalusC, thanx for the suggestion... I will consider this... Dec 6, 2012 at 11:32
  • @PrabhatSubedi from now...
    – vusan
    Dec 10, 2012 at 6:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.