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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 141
Registered: ‎08-06-2008
My Device: Not Specified
Accepted Solution

check data empty in EditField.

Hello,

 

I created several EditField for gethering address like addr, city, state and zipcode.

I want to give some alert without moving next field if user dodn't fill out the field.

 

Is there anyway for this feature?

 

Thanks,

DK.

Highlighted
Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: check data empty in EditField.

Try this:

 

 

EditField ef = new EditField("Text: ","<data>"); String s = ef.getText(); if (s.equals("")){ //if the EditField does not contain data }else{ //it does contain data }

 

 Check for that at: onClose()

 

 

 

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: check data empty in EditField.

I suggest you override onUnfocus() to do this.

 

Unfortunately this doesn't stop anyone "submitting" immediately without going through your protected fields, so I have never bothered with this.  It is also incredibly annoying if you really want to fill out the screen in a different order than they are displayed.  Instead, I do the 'not empty' checking as part of the submit process.  But that is just me......