Hi!
    rowStyleClass="row#{(idx%2==0)?'0':'1'}"
rowStyleClass="row0,row1"  should do the trick too

But this approach has a big disadvantage : the method 'selectItemList' is called in every rendered row even though the list themself isn't change.
So why dont you cache the list in your bean? Or even better do not create the list in your getter method. AFAIK you should never do time consuming tasks in your getter as you dont know if one of the components call the method multiple times.

I know there is no init method which will be called to setup your bean, but there are solutions for this.

1) Use Shale
2) workaround using dependency injection. eg in your faces-config configure a managed-property which calls a method "init"- I've seen this mutliple times, though I dont like it.

Personally, as long as JSF doesnt provide such a function, I'll stick with Shale. Or later burden this on JBoss Seam.

---
Mario

Reply via email to