What I was thinking is that if your Person object's "toString" method returns 
whatever you want to display in the ListView.  Then just use List<Person> as 
the ListView data.  Then the "getSelectedItem" can return your Person object 
and you can do whatever you want with it.....

HTH,
~Roger

On Aug 14, 2012, at 9:39 AM, Greg Brown wrote:

>> If I have an ArryList of person objects, is the only way to display their 
>> names in a ListView to create an ArrayList of Strings filled with their 
>> names and pass it to setListData ?
> 
> You can use a custom list item renderer for this. See this example:
> 
> http://svn.apache.org/repos/asf/pivot/trunk/demos/src/org/apache/pivot/demos/rss/
> 
>> I thought I could set the property to display with setListDataKey, but I do 
>> not understand how to do that.
> 
> This method sets the name of the key that is used in context binding (i.e. 
> load() and store()), so this is probably not what you want.
> 
> Greg
> 
> 

Reply via email to