• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling link double clicks

 
Martin Dubuc
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having some issues in my app with regards to users double clicking command links. I have been able to solve the double clicking issue on submit buttons by adding JavaScript code to disable the button when the user clicks on the button, but I have not been successful finding a similar mechanism for command links. I would like to know if someone has found a solution to this problem.

Martin
 
Gabriel Claramunt
Ranch Hand
Posts: 375
Monad Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really need it? I mean, usually you want to prevent the duplicate click because you want to prevent an action to be executed twice. But a link usually is a navigation not an action.
If you need to prevent multiple clicks on a link, probably you're changing the "semantics" of the link and I think would confuse the users.

But don't listen too much, I'm lazy and I'm always came up with explanations to not do stuff

If you insist, probably you can use javascript to clean the href value.
 
Martin Dubuc
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what is happening inside JSF controller, but when a user double-clicks on a link, on Tomcat, something is happening to the SSL connection which requires the user to provide its certificate once again (and a warning gets logged in catalina.out). This is an annoyance more than anything because the app will re-render the page, but I wanted to see what could be done to avoid the re-rendering and the browser prompting the user for a certificate. I have tried to play with the disabled property of the link, but it didn't really work. However, playing with the href allowed me to resolve my issue. Thanks!

Martin
 
Gabriel Claramunt
Ranch Hand
Posts: 375
Monad Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting.
In this particular case, we have a nice JavaScript kludge .
If you have time, I suggest you to find the root cause, if it happens to every link, you'll be forced to remember to put the code in every one of it. If it only happens to one particular link, maybe is something with how the URL is constructed (BTW, take a look at the HTML source of the problematic link, compare with others that work correctly, put the plain link on a empty html and click on it, it will give you a hint of what is happening).
Maybe is a particular issue of your environment configuration (did you try to google for Catalina + JSF + SSL ?). I used JSF and SSL sucessfuly without much problems (the main issue was a empty frame I had, it gives a huge security warning in IE... ). Hope it helps to identify the problem...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!