yep - that got it Dave....just had to change the label function for 
the data grid to use two input parameters:

private function userNameLabelFunction 
item:Object,dataField:DataGridColumn) : String
                                {
                                         return 
item.createUser.username ;
                                 }                      
                        

thanks for the heads-up!

joe

--- In [email protected], "headjoog" <[EMAIL PROTECTED]> wrote:
>
> thanks for the insight...I'll give this a shot and see where it 
> goes...I think I was emotionally exhausted after getting the whole 
> FDS/Hibernate thing running!
> 
> Joe 
> 
> 
> 
> --- In [email protected], "Dave Carabetta" <dcarabetta@> 
> wrote:
> >
> > It sounds like you need a labelFunction for the DataGridColumn:
> > 
> > private function userNameLabelFunction( item : Object ) : String
> > {
> >    return item.firstName + ' ' + item.lastName;
> > }
> > 
> > and then in your DataGridColumn, just add this to the column's 
> definition:
> > 
> > labelFunction="userNameLabelFunction"
> > 
> > Obviously, I don't know the setup of your Users object, so 
> firstName and
> > lastName might not be appropriate, but hopefully you get the 
point 
> and can
> > adapt the field references as appropriate.
> > 
> > Regards,
> > Dave.
> > Cynergy Systems, Inc.
> > 
> > 
> > On 5/8/07, headjoog <jburns@> wrote:
> > >
> > >   Hello - new on this group and to flex and was hoping for some
> > > feedback...
> > >
> > > I've been able to get a simple one-to-many association 
configured 
> in
> > > FDS and Hibernate. One table has Users, the other a list of 
> records
> > > that users created. I have a data grid that shows the list of 
> records.
> > > The list of records is returned correctly, but under 
> the "createuser"
> > > field where the user name should be displayed I get "[object 
> Users]"
> > > (which is the class that contains the user info). And I can't 
get
> > > either the user id or the user name (which is what I really 
want)
> > > diplayed in the grid.
> > >
> > > How do you display the user in Flex? I have simple POJOs, have 
> the AS
> > > classes, and no errors in my logs. Can somebody clue me in?
> > > I'll post some code snips if necessary.
> > >
> > >  
> > >
> >
>


Reply via email to