문제

We have a Datagrid:

    <nross:ScalableDataGrid id="grid" 
dataProvider="{model.practiceJoinRequestThickList.practiceJoinRequestThicks}">

    <nross:columns>
                <ui:DataGridToolTipColumn headerText="ID" dataField="practiceJoinRequest.userId"/>
                <ui:DataGridToolTipColumn headerText="Name" dataField="userName"/>
                <ui:DataGridToolTipColumn headerText="Email" dataField="userEmailAddress"/>
                <ui:DataGridToolTipColumn headerText="Office"/>
                <ui:DataGridToolTipColumn headerText="City" dataField="practice.practiceContactAddresses.address.city"/>            
            </nross:columns>

    </nross:ScalableDataGrid>

where practiceJoinRequestThicks is an ArrayCollection of PracticeJoinRequestThick object.

The PracticeJoinRequestThick has an Practice Object.

Practice has an arraycollection "PracticeContactAddresses" which is an arraycollection of PracticeContactAddress object

and PracticeContactAddress object has Address object which has the field city:String

Now when I try to display the City, it does not work. I would appreciate if someone can help me in this regard.

Thanks

Harish

도움이 되었습니까?

해결책

If practiceContactAddresses is an ArrayCollection, you need to set which one you are referring to. Something like so: dataField="practice.practiceContactAddresses[0].address.city"

Hope that helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top