I am trying to build a CellBrowser as given below.
Week 1 -> Mathematics
Week 2 [] Algebra
Week 3 [] Trigonometry
Science
[] Physics
[] Chemistry
The problem is, I am not able to get the headings (Mathematics and Science) as given in the above code. The heading are from different Object, and my CompositeCell (CheckBox and TextCell) seems to be expecting/applying for all items.
Basically, I am trying to build the list in CellBrowser with some of them having (CheckBox and TextCell) while some of them having only (TextCell).
Please advise.
You have to override the render method either of your
CompositeCell
or theCheckBoxCell
. Something like this:The function
hasCheckBox()
is just an example. Either you access a flag in your DTO (Course
) or you can pass a flag directly to the Cell.Alternatively you can modify the render method of your CheckBoxCell: