开发者

Single model - multiple filtered views

I have data model (dataProvider as ArrayCollection) i want to display in few views , each view should show filtered data.

As you probably know, filterFunction is property of ArrayCollection,so I can't use this solution (unless creating new instance of ArrayCollection for each view on top original and impementing filterFunction).

开发者_JAVA百科

Are there better approaches ?

Thanks


you can use ListCollectionView for each view that use your array, and every time you can pass to it the same array but filtered differently as source...


You're using the same ArrayCollection as dataProvider across multiple views, and setting the filterFunction in view1 persists into view2?

You could probably put code to change the filterFunction for each view in that view's "show" event. If you wanted to default each view to be unfiltered, pass in a function that just returns true.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜