File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes command button validations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "command button validations" Watch "command button validations" New topic

command button validations

charishma gottumukkula

Joined: Nov 06, 2006
Posts: 20
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

Joined: Jan 13, 2005
Posts: 20
Just write an action method:

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

I agree. Here's the link:
subject: command button validations
It's not a secret anymore!