7 Replies Latest reply: Oct 13, 2011 12:36 PM by Brian Leathem RSS

What to do about the columnVar/var attributes of the pickList?

Brian Leathem Master

See issue: https://issues.jboss.org/browse/RF-11208

 

Summarized here:

If we want the pickList to be able to define it's own select items, the way the orderingLIst does, then the syntax looks like:

<r:pickList values="..." colmunVar="columnVar" itemValues="..." var="itemVar" itemLabel="#{itemVar.title}"> <r:column> #{columnVar.somAttribute} </r:column> </r:pickList>

 

where columnVar iterates over the values, and is used as the replacement variable while rendering the columns
and var iterates over the itemValues, and is used as the replacement variable when defining the selectItems.

One question is, if we drop the columnVar, and recycle the "var" attribute between the two contexts, is that more or less confusing for end-users?

Or, another alternative, is to not support the pickList defining selectItems itself, it alway require a f:selectItems child - but I don't think I like this alternative.

 

So, any suggestions on how to clen up the above syntax?  The only real constraint is being consistent with the APIs of the other RichFaces and JSF components.  PickList is unique, for having two looping contexts.