|
Hey Emily, If your Button causes your application to fail in some way, you could catch that kind of bad user interaction by identifying the clicked button via the component id (which is unique for each component on your page). This is kind of a "dirty" solution, but if the application switches to a different state, the triggered action should be "locked", so it can't be accessed again, unless it won't cause any damage. You would do this by giving the commandButton an ID, setting an f:param inside the button and getting this parameter (if you have a dynamic model and need to know which button has been clicked) back in the application via an ActionEvent, which is a parameter for an actionListener method. I had to do this for a system that locks datasets and prevents other users from editing. A user should only be able to edit one record at a time. If the user acts quickly and clicks several buttons on the page, that would open many open records. So what I did, is catch the ID and the param, unlock the records he clicked before and open only the last one for editing. If your problem is similar in some way, this might be a solution. A dirty one, I admit, but it works. Andreas Emily Gu wrote:
|
Re: how do I prevent nervous users starting actions more than once???
Andreas Zeller - zit-systems Sat, 25 Mar 2006 18:35:12 -0800
- Re: how do I prevent nervous users starting a... Emily Gu
- Re: how do I prevent nervous users start... Andreas Zeller - zit-systems
- Re: how do I prevent nervous users s... Emily Gu
- Re: how do I prevent nervous use... Andreas Zeller - zit-systems
- Re: how do I prevent nervous... Emily Gu

