[richfaces-issues] [JBoss JIRA] Commented: (RF-4293) comboBox: using component with s:convertEntity leads to displaying id list instead of object property in label for s:selectItems.
jordi hernandez (JIRA)
jira-events at lists.jboss.org
Mon Apr 6 07:02:24 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460712#action_12460712 ]
jordi hernandez commented on RF-4293:
-------------------------------------
I just got fooled by thi. It is called ComboBox and it looks like one, so I expected it to behave like a select component. I was also fooled byt the fact that it takes a selectITems tag inside. I think there should be some kind of warning in the docs. A 'this ain't no select input component' message would prevent such confusions and save you guys a lot of arguments/explanations with users.
Of course modifying the comobox to optionally behave as a select would be great.
> comboBox: using component with s:convertEntity leads to displaying id list instead of object property in label for s:selectItems.
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: RF-4293
> URL: https://jira.jboss.org/jira/browse/RF-4293
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.2
> Environment: jboss 4.2.1.GA, seam 2.0.2, richfaces 3.2.2.BETA5(IE6, IE7, FF 3.1, Safari 3.1, Opera 9.51)
> Reporter: Mikhail Vitenkov
> Assignee: Nick Belaevski
>
> #1. Create "Car" entity with two attributes("id" & "name") following way:
> @Entity(name="car")
> public class Car {
> private String name;
>
> public String getName() {
> return name;
> }
> public void setName(String name) {
> this.name = name;
> }
> public Car(int id){
> this.id = id;
> this.name = "name_" + id;
> }
> @Id
> private int id;
> public int getId() {
> return id;
> }
> public void setId(int id) {
> this.id = id;
> }
> }
> #2. Add rich:comboBox on the page.
> <rich:comboBox id="lstIndustry1" defaultLabel="Select your industry">
> <s:selectItems value="#{combobox.selectItems}" var="ind" label="#{ind.name}"/>
> <s:convertEntity />
> </rich:comboBox>
> selectItems is ArrayList<Car> defined in "combobox" bean:
> private ArrayList<Car> selectItems;
> public Combobox(){
> this.selectItems = new ArrayList<Car>();
> for(int i = 0; i < 100; i++){
> selectItems.add(new Car(i));
> }
> }
> #3. Naviagate on the page, contained rich:comboBox.
> #4. Open component's pop up list & verify items' labels.
> Actual behavior:
> Instead of Car's "name" property list fo ids displayed. Replace rich:comboBox with h:selectOneMenu - everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list