File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes keeping a button in pressed state Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "keeping a button in pressed state" Watch "keeping a button in pressed state" New topic
Author

keeping a button in pressed state

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

I have a set of button on my page in where when a button is clicked, I want it to stay clicked until I click on another button, how can I do that? use CSS? or there's a component in JSF in one of its open source implementations?

Thanks,


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
What is it that you want to do?
Do you want the user to not click on the same button again before another button click? If so, making it disabled would be a easier option.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

This is what Radio Buttons do.

HTML button controls are momentary-contact devices. If you wanted a click-on/click off behavior, you'd have to muck around with CSS. If you want a radio button behavior, it's easier to use a selectOneRadio tag collection. If you have a button dependency (that is, 2 or more buttons that aren't mutually exclusive like radio buttons are), you have to go back to the CSS tricks. Or use the disabled attribute. Which is often the best way to do that.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: keeping a button in pressed state
 
Similar Threads
Help
Adding cells to Table one at a Time
question about object casting
JBoss Jax-ws Timeout Configuration
event handle--help urgently needed