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

Native 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.

Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: ListView with custom headers (sections)

My real problem here is with the JSON or XML you set up.  You are embedding UI control into your data.  You want your data model to reflect what is, and the UI to reflect how you want it to be displayed to the user.


Are you planning for your code to do this:


1. import JSON or XML

2. determine the grouping appropriate for this display

3. export edited JSON or XML with additional UI field

4. apply that edited data for the view


This just seems clunky to me.  Even clunkier and difficult to maintain or evolve is coding the display order inside the data.  Don't do this if you can at all help it.  As an intermediate format, fine, if necessary, but it's highly unwise to embed UI in your data.


GroupDataModel is very powerful.   Other supplied data models are applicable in many cases.  But sometimes you need something these don't quite do.   Why force your data into an unmaintainable form to awkardly use GroupDataModel when you can more easily make a clean design with a small effective DataModel of your own?