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

Native Development

Reply
BlackBerry Development Advisor (Retired)
smacmartin
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?

 

Stuart

 

 

Please use plain text.