Contents

How to use ListModel

Like you do with ListBox component, you must set a model property for the bandinfo.For example,

<bandinfo model="${model}"/>

The listmodel is a variable which type is a SimpleModelList ,ListModelList (or etc) that implements ListModel interface.Here, I create uselistmodel.zul to demonstrate to use ListModel for band #1 and #2. So,when you want to add or remove OccurEvent dynamically from band you only call ListModel.add(OccurEvent) or ListModel.remove(OccurEvent).

Note:The ListModel in TimelineComponent supports lazy-loading.So you needn’t to add BandScrollListener to band.

Another alternate in Timeline1.1-3

In Bandinfo class, modifyOccurEvent(OccurEvent event) is added. The original function which name is addManyOccureEvents has been renamed addManyOccurEvents and its parameter type has been changed from ArrayList to Iterator.