PDA

View Full Version : Complex bean



GattoThor
15 Mar 2011, 3:41 PM
Does anyone knows that if I have a bean with another bean as bean property. How I can bind it to the grid.
For example I have emplyee and I want to show employee data in the grid. In emplyee class there is an object of Address class. I want to show employee.getAddress.getZipCode() in a column of grid how would I bind it.

Thanks

blay
16 Mar 2011, 4:46 AM
I supppouse both Address and Employee extend ModelData. You can access nested values by "." operator and the name of the properties.

Example:


ColumnConfig cc = new ColumnConfig();
cc.setId("address.zipCode");