-
1. Re: What to do about the columnVar/var attributes of the pickList?
ilya_shaikovsky Aug 23, 2011 10:54 PM (in response to bleathem)Me personally think that it should be enough to have one context.
<f:selectItems> allows you to point the component to any set of objects. And I think it's preferrable to keep one entry point for such definitions. What additionally itemValues gaves to the user?
just select items labels:
<rich:pickList value=#{targetValues} columnVar="foo">
<f:selectItems value="#{beanSelector.values}" itemLabel="#{foo.label}"/>
<f:converter converterId="EntityBeanConverter" />
</rich:pickList>
custom columns
<rich:pickList value=#{targetValues} columnVar="foo">
<f:selectItems value="#{beanSelector.values}"/>
<f:converter converterId="EntityBeanConverter" />
<rich:column>#{foo.title}</rich:column>
<rich:column>#{foo.value}</rich:column>
</rich:pickList>
Or I missed something from prev threads and such simple approach has some usability losses or dev issues?
P.S. why values and not value? I think we could use the same syntax as h:selectMany.
-
2. Re: What to do about the columnVar/var attributes of the pickList?
bleathem Aug 24, 2011 12:46 PM (in response to ilya_shaikovsky)Thanks Ilya,
(sorry, the values was a typo, the attribute is indeed value)
I suppose not enabling the pickList to define the list of source items itself is worth more strongly considering, It does after all have a more "JSF feel" feel to it. I originally wanted to allow for more conciseness with the component, but if the end result is too much complexity, then we are worse off overall.
Thanks again for the feedback!
Brian
-
3. Re: What to do about the columnVar/var attributes of the pickList?
lfryc Sep 8, 2011 2:38 AM (in response to bleathem)Hi Brian, Ilya,
Brian Leathem wrote:
So far, Ilya's suggestion of requiring the pickList to use the f:selectItems appears to be the best option (ad drop the var sttribute from the pickList. Although I'm not entirely happy how this makes the pick and ordering lists dissimilar.
I have looked through dev-examples [1] and Ilya's suggestion looks good for me.
- It would be great to have f:selectItems @itemLabel to and @itemValue consuming EL expressions (I can't see that option in dev-examples)
- You are going to drop rich:pickList @columnVar and use f:selectItems @var instead?
- What about just renaming rich:pickList @columnVar to @var?
- since there is no more @itemVar, it is not necessary to define @columnVar
- and it will no conflict as in Ilya's "just select items labels:" - columnVar=foo, itemLabel=#{foo.label}
- As I understand, rich:pickList and rich:orderingList shares implementation currently? We will loose this advantage when using some of options above?
- If not, I don' tsee problem in making them dissimilar, since they are targetting other purposes
- If not, I don' tsee problem in making them dissimilar, since they are targetting other purposes
[1] https://github.com/richfaces/dev-examples/blob/develop/input-demo/src/main/webapp/examples/pickList.xhtmlhttps://github.com/richfaces/dev-examples/blob/06da70955e414e43597162498929824ce3813713/input-demo/src/main/webapp/examples/pickList.xhtml
-
4. Re: What to do about the columnVar/var attributes of the pickList?
jbalunas Sep 8, 2011 8:21 AM (in response to lfryc)I also agree with Lukas and Ilya, and I think the followup points that Lukas mentions are valid as well.
- Can itemLabel, and itemValue consume EL?
- Using select items imo is fine, it is how I think most developers would use this anyway.
- One problem back in 3.3.X land was way too many @ on components and it started to get confusing.
- If we are moving to just one var I think it should be "var" and not "columnVar"
-
5. Re: What to do about the columnVar/var attributes of the pickList?
bleathem Sep 9, 2011 1:37 PM (in response to jbalunas)Great, thanks for all the feedback guys!
I've gone ahead and dropped the ability for picklist to generate it's own select items, it'll require the use of f:selectItems. A much cleaner API overall.
-
6. Re: What to do about the columnVar/var attributes of the pickList?
healeyb Oct 13, 2011 7:57 AM (in response to bleathem)Can I ask if the use of f:selectItems means that there will be no rich content support in the pickList
component, i.e. nesting an img tag inside an option tag is not allowed by the DTD?
Thanks.
-
7. Re: What to do about the columnVar/var attributes of the pickList?
bleathem Oct 13, 2011 12:36 PM (in response to healeyb)Brendan,
Good question - you would accomplish this with a single column layout of the picklist, as in:
<rich:pickList var="column" ...> <f:selectItems ....> <rich:column> <img ... /> #{column.title} </rich:column> </rich:pickList>