aspose file tools*
The moose likes JSF and the fly likes Disabling copy and paste option in h:inputText and h:inputSecret  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Disabling copy and paste option in h:inputText and h:inputSecret  " Watch "Disabling copy and paste option in h:inputText and h:inputSecret  " New topic
Author

Disabling copy and paste option in h:inputText and h:inputSecret

Kumar Gaurav
Ranch Hand

Joined: Apr 08, 2008
Posts: 108
Hi,

I want to disable copy and paste functinality in the textbox for user name and password in login page which have been constructed using
h:inputText and h:inputSecret respectively.

Any input on same will be highly appreciable.


Regards,
Gaurav
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Don't. I use a password vault app to transfer in user IDs and passwords via the clipboard. Without clipboard paste, I'd have to display the password and enter it manually, which is less secure than pasting.

It would be rude to say the least to disable this function. I realize that people can do unsafe things using copy/paste - like mistyping a password and pasting the mistyped password in twice on a password check, but there are limits to how much obligation there is to protect them from their own stupidity.

Note that the copy function cannot copy a password OUT of a secret input control, only into one. That's true of all known browsers and if you find one that behaves otherwise, consider it to be unsafe.


Customer surveys are for companies who didn't pay proper attention to begin with.
Kumar Gaurav
Ranch Hand

Joined: Apr 08, 2008
Posts: 108
Hi Tim,

Will you elaborate some more. As i m not able to understand it fully.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Elaborate more about what?
Kumar Gaurav
Ranch Hand

Joined: Apr 08, 2008
Posts: 108
Your answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disabling copy and paste option in h:inputText and h:inputSecret
 
Similar Threads
regarding jq+ code
h:inputText redisplay
javax.servlet.jsp.JspException: Not nested in a tag of proper type.
Why can't JSF calls method with parameter?
Doubt in EL [] operator