• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

command button validations

 
charishma gottumukkula
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a small user interface where i got to validate the command buttons.For ex i have a commed button called start or stop,If nothing is selected and the command button is clicked i should get a message called "none of the items are selected"

Can anyone please help me with the sample code
 
John Blanco
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just write an action method:

<h:commandButton value="Submit" action="#{myBackingBean.submit}" />

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic