BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 03-24-2009, 09:41 AM   #1
DD12
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Question Field Is Full and Save/Discard/Cancel

Please Login to Remove!

Hello Everyone

I am following 2 issues.

1. I have an EditField which allows only 7 digits. When all 7 digits are entered, it displays "Field is Full" message.

Is there any way to stop that message from poping up?

2. When ever I enter data in the field and press blackberry application menu and select close. It displays "Changes Made" popup with "Save/Discard/Cancel" buttons.

Is there any way to stop that message from poping up?

Thanks
Offline  
Old 03-24-2009, 10:00 AM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

1. don't limit the field to 7 digits

2. override onSave() in your screen class.
Offline  
Old 03-25-2009, 04:39 AM   #3
hippocamp software
Thumbs Must Hurt
 
Join Date: Feb 2009
Model: 9000
PIN: N/A
Carrier: T-Mobile
Posts: 67
Default

1. i can't see anything in the api that lets you capture the field full event to surpress the status popup. what you could do is override keyChar on your screen and track how many characters have been entered that way. something like this should work:

public boolean keyChar(char key, int status, int time) {
switch (key) {
case Characters.BACKSPACE:
return false;
case Characters.ESCAPE:
System.exit(0);
return true;
default:
if (getFieldWithFocus() == entryField) {
if (entryField.getTextLength() < 7) {
return false;
} else {
return true;
}
}else{
return false;
}
}
}

2.

protected boolean onSave() {
close();
return true;
}
Offline  
Old 03-25-2009, 07:38 AM   #4
DD12
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Default

Thanks for the samle code hippocamp.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Schneider Electric Energy Server EBX510 Server For Energy Management- picture

Schneider Electric Energy Server EBX510 Server For Energy Management-

$4350.00



FANUC Server Driver A06B-6077-H111 picture

FANUC Server Driver A06B-6077-H111

$2158.86



FANUC Server Driver A06B-6117-H211 picture

FANUC Server Driver A06B-6117-H211

$3993.99



SERVER TECHNOLOGY 4870-XLS-44 SENTRY VDC 48VOLT DC REMOTE POWER MANAGER picture

SERVER TECHNOLOGY 4870-XLS-44 SENTRY VDC 48VOLT DC REMOTE POWER MANAGER

$299.99



NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0 picture

NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0

$179.99



9.5qt Chafing Dish Buffet Set Professional Chaffer Server Wamer Commercial 400W picture

9.5qt Chafing Dish Buffet Set Professional Chaffer Server Wamer Commercial 400W

$175.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.