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
New Developer
Posts: 2
Registered: ‎11-28-2008
My Device: Not Specified

Equivalent of .NET Repeater control, Focus issue

Hi,

 

I've searched the forum and someone else has already asked for this and judging by the answers there isn't an equivalent control.

 

I'm currently looking at extending the Manager class to use Vertical- and HorizontalFieldManager objects to populate it, in a table-like format.

 

The issue I'm having is that I cannot select any of the rows (HorizontaFieldManager).  I have set the style to FOCUSABLE.

 

The constructor for this class is as follows:

 

 

public repeater(int rows, int cols) { super(Manager.NO_HORIZONTAL_SCROLLBAR); for (int x = 0; x < rows; x++) { HorizontalFieldManager row = new HorizontalFieldManager(HorizontalFieldManager.FOCUSABLE); for (int y = 0; y < cols; y++) { VerticalFieldManager col = new VerticalFieldManager(); col.add(new LabelField(String.valueOf(y), LabelField.FIELD_LEFT)); row.add(col); } add(row); } }

 

I have added a Dialog.Alert() statement in the onFocus() event to check when focus is given but nothing is showing up.

 

 I'm using JDE Component version 3.4.0 from within Eclipse.

 

BlackBerry Development Advisor
Posts: 15,694
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Equivalent of .NET Repeater control, Focus issue

Focus should be going to the fields placed within your managers.  What fields are present there?

 

Here are a couple of samples that may be of interest to you.

 

How to - Use the User Interface API to create an editable table
Article Number: DB-00130

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

 

How To - Create a screen with stationary headings
Article Number: DB-00510

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Highlighted
New Developer
Posts: 2
Registered: ‎11-28-2008
My Device: Not Specified

Re: Equivalent of .NET Repeater control, Focus issue

Thanks Mark,

 

I ended up using a modified ListField to mimic the functionality of the .NET Repeater control, rather than Horizontal- and VerticalFieldManager, and it's working fine.

 

Cheers