Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Dipanwita_Das
Posts: 75
Registered: ‎07-22-2010
My Device: Not Specified
Accepted Solution

How to unmask password field

How can I unmask passwordField?

please help

thank you

Developer
BB-Dude
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: How to unmask password field

Why use a password field if you want to unmask it?

 

You can get the value and display it in another field/dialog/popupscreen.

New Developer
_Jon
Posts: 18
Registered: ‎07-17-2009
My Device: Not Specified

Re: How to unmask password field

I am looking for this solution as well.

I want to add a checkbox to "show password" while typing on older devices.

 

I'll post an update here if I find a solution.

Developer
juanmab
Posts: 94
Registered: ‎07-08-2011
My Device: Many

Re: How to unmask password field

This is just an idea.

You have to have 2 fields

One Password and a common one.

When the checkbook is selected you will have to remove the passwordfield from the manager and add the other one and also take the text value and assign it to the other field.

 


Feel free to press the like button on the right side to thank the user that helped you.
Please mark posts as solved if you found a solution.

Juanma 

@juanmab

Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various

Re: How to unmask password field

A very sound advice by juanmab. A couple of small additions:

 

1) You don't have to remove and insert - there is replace for that

2) You might want to save and restore cursor position as a customer service effort.

 

Good luck!

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Developer
juanmab
Posts: 94
Registered: ‎07-08-2011
My Device: Many

Re: How to unmask password field

Thanks arkadyz.

I'm Still learning, guess I'll have to take your additions too.


Feel free to press the like button on the right side to thank the user that helped you.
Please mark posts as solved if you found a solution.

Juanma 

@juanmab

New Developer
_Jon
Posts: 18
Registered: ‎07-17-2009
My Device: Not Specified

Re: How to unmask password field

Thanks for both of you!

 

I was in the process of coding juanmab's idea - arkadyz pointed out two great improvements.

I didn't know about replace and didn't think about cursor.

 

btw, when using replace, I learned you have to make double certain you are specifying the correct manager or you get an exception.  Some errors are so obvious you miss the cause.

 

Mine is a little more complicated than just a replace because I use a custom button that can be enabled & disabled.  So I had to modify the listener for the fields to ensure I was listening to the 'visible' field.  But the result is just perfect.

 

:smileyhappy:

 

Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various

Re: How to unmask password field

Can you mark this thread as solved then? Thank you!

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
New Developer
_Jon
Posts: 18
Registered: ‎07-17-2009
My Device: Not Specified

Re: How to unmask password field

 

I tried, but I think only the original poster can do that, which I am not.

 

Sorry.