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?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
vivek
  • 53
  • 1
  • 2
  • 6

4 Answers4

6
<h:commandButton value="&#60;&#60;" />
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
jmj
  • 237,923
  • 42
  • 401
  • 438
  • @vivek, try again, updated the answer. – Vladimir Ivanov Feb 03 '11 at 08:11
  • The value of attribute "value" associated with an element type "a4j:commandButton" must not contain the '<' character. This type error found – vivek Feb 03 '11 at 08:52
  • check update. I tested locally, its working – jmj Feb 03 '11 at 09:46
  • or choose any represent that java understands from [here](http://www.fileformat.info/info/unicode/char/3c/index.htm) – jmj Feb 03 '11 at 09: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 '11 at 04:22
0
<a4j:commandButton value="&lt;&lt;"></a4j:commandButton>
sayYeah
  • 166
  • 1
  • 5
0
<h:commandButton value="&lt;&lt;"  action="#{myBean.action}" />
Oscar Castiblanco
  • 1,626
  • 14
  • 31
-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.

vusan
  • 5,221
  • 4
  • 46
  • 81
Narayan Subedi
  • 1,343
  • 2
  • 20
  • 46