BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-15-2009, 06:51 AM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100V
PIN: N/A
Carrier: Vodafone
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default What is the difference between ObjectListField and ListField

Please Login to Remove!

Hi All,
1. My first question is what is the difference between ObjectListField and ListField and which one is easier to use.

2. My another problem is I want to add some items in a list control and I am using ObjectListControl but nothing is showing on to the screen, though I added a label also and that is visible, so there is something going wrong with the list. below is my code snippet

LabelField oLblRepliedPCs = new LabelField("List of responded PCs till now");
add(oLblRepliedPCs);
ObjectListField oPairingList = new ObjectListField(ObjectListField.ELLIPSIS);
Vector vctAllPCs = null;
vctAllPCs = ommCPairedPCDataStore.getAllRepliedPCs();
if (vctAllPCs != null)
{
int nSize = vctAllPCs.size();
for (int i = 0; i < nSize; i++)
{
oPairingList.insert(i, vctAllPCs.elementAt(i));
}
}

Any body has any Idea please?
Offline  
Old 06-16-2009, 03:56 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile ObjectListField : List not shown after adding elements.

Hi Javed

I suggest setting the size of the list may rectify the issue.
Please try and update here if this fixes yout 2nd problem.
__________________
Regards
Anand.
Offline  
Old 06-16-2009, 06:12 AM   #3 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100V
PIN: N/A
Carrier: Vodafone
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ObjectListField : List not shown after adding elements.

Quote:
Originally Posted by Ananthasivan V K View Post
Hi Javed

I suggest setting the size of the list may rectify the issue.
Please try and update here if this fixes yout 2nd problem.
It did not help. Below is my code.

ObjectListField oPairingList = new ObjectListField(ObjectListField.ELLIPSIS);
oPairingList.setSize(2);
Vector vctAllPCs = null;
vctAllPCs = ommCPairedPCDataStore.getAllRepliedPCs();
if (vctAllPCs != null)
{
int nSize = vctAllPCs.size();
for (int i = 0; i < nSize; i++)
{
oPairingList.insert(i, vctAllPCs.elementAt(i));
}
}
Offline  
Old 06-16-2009, 07:05 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Javed

Have you tried to repaint the manager or field using invalidate() ?

Try oPairingList.invalidate().
__________________
Regards
Anand.
Offline  
Old 06-16-2009, 07:44 AM   #5 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100V
PIN: N/A
Carrier: Vodafone
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried but still did not work.
Offline  
Old 06-17-2009, 12:05 AM   #6 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100V
PIN: N/A
Carrier: Vodafone
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there not any standard way to create list control with few items? Can somebody provide a sample code.
Offline  
Old 06-17-2009, 12:42 AM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Hi Javed

Check these Knowledgebase Links
Livelink - Redirection

Livelink - Redirection

I hope you'll find a solution after visiting these links.
__________________
Regards
Anand.
Offline  
Old 06-17-2009, 07:01 AM   #8 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100V
PIN: N/A
Carrier: Vodafone
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks,
I will look into the sample and update.
Offline  
Old 06-17-2009, 07:32 AM   #9 (permalink)
New Member
 
Join Date: Apr 2008
Model: 7100V
PIN: N/A
Carrier: Vodafone
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops, I was doing a small but big mistake.
I did everything but did not add the list to screen

add(oPairingList)

Thank you for your help
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

PNEUTEK 1" Drive Pins 3/8" Head 300 pcs Powder Actuated fastener fastening
$11.57
PNEUTEK 13 pcs CY7C1019CV 33-12VC CYPRESS 128K x 8 Static RAM
$8.9
3 pcs CY7C1019CV 33-12VC CYPRESS 128K x 8 Static RAM pictureTDS 512K Go RAM Card for HP 48GX Calculators
$124.99
TDS 512K Go RAM Card for HP 48GX Calculators pictureCisco CSS5-IOM-16FE CSS1150 16-Port TX Expansion Module + 128MB ECC RAM
$57.99
Cisco CSS5-IOM-16FE CSS1150 16-Port TX Expansion Module + 128MB ECC RAM pictureEnerpac Hydraulic Cylinder RW50, 5 Ton, 5/8" Stroke, Ram, 10,000 PSI
$35.0
Enerpac Hydraulic Cylinder RW50, 5 Ton, 5/8






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