Re: Sorting Lists

there doesnt seem to be a direct way to do the sorting. you would have to create your own custom function to sort and refresh the list. (although if you change items on a dataprovider, it automatically refreshes the lsit for you). My theory is if you can pull all the data out of the dataprovider and store it into a seperate array and then sort that enw array and after that "reset" the items on your dataprovider with the new array that is sorted using the setItems() method on your dataprovider. ill try to get a working code to show you an example. good luck!

J. Rab (Blog)(Twitter)--1. If you liked my post or found it useful please click on the thumbs up and provide a Like!2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

J. Rab (Blog)(Twitter)--1. If you liked my post or found it useful please click on the thumbs up and provide a Like!2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. - - Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started - - Hockey DrillBook -

Re: Sorting Lists

To show the image, it will depend on how you implement your custom renderer/skin. In your example, you will need to set the Image in the renderer to the "image" attribute. Be careful to have the full URI so that Image can load it properly.

A list gets its data from the label, and and image gets its data from image. Is that possible? And I'm guessing I'd just use custom renderer on the Image attribute?

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. - - Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started - - Hockey DrillBook -

Re: Sorting Lists

The custom renderer will have an Image as a member variable/attribute. Create it in the constructor, add it as a child in onAdded, and remove it as a child in onRemoved. Set it indrawLabel() and position it either in drawLabel() or the constructor. Make certain the data.image attribute exists or it will throw an exception.

Take a look at the many renderer examples and if it is still not clear, re-post your renderer code for those that might be able to help.

Re: Sorting Lists

This may sound stupid but are Custom Renderer and Custom Cell Renderer different?

Because I'm not trying to put the image in a list. I want the image to show up else where.

Here's an idea of the flow of user interaction:

My first list shows a broad range of topics. When a user selects an item from this list, it loads a secondary list. When a user selects an item from this list, it loads an image on the top half of the screen.

I have the first interaction down. It's getting images to be tied to items in the second list that is driving me bonkers (and getting them to change based on what item is selected).

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. - - Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started - - Hockey DrillBook -