[richfaces-issues] [JBoss JIRA] (RF-12312) rich:select - duplicate labels

Brian Leathem (JIRA) jira-events at lists.jboss.org
Tue Aug 21 19:52:15 EDT 2012


     [ https://issues.jboss.org/browse/RF-12312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Leathem updated RF-12312:
-------------------------------

    Description: 
Given rich:select:
{code}
<rich:select value="#{bean.testValue}">
    <f:selectItem itemLabel="1" itemValue="1"/>
    <f:selectItem itemLabel="1" itemValue="abcdef"/>
    <f:selectItem itemLabel="2" itemValue="2"/>
    <f:ajax event="selectitem" listener="#{bean.testListener}"/>
</rich:select>
{code}
and the bean:

{code}
@ManagedBean
@ViewScoped
public class Bean implements Serializable {
	private String testValue;

	public String getTestValue() {
		return testValue;
	}

	public void setTestValue(String testValue) {
		System.out.println("setter: " + testValue);
		this.testValue = testValue;
	}

	public void testListener(AjaxBehaviorEvent e) {
		System.out.println("listener: " + testValue);
	}
}
{code}

Whatever item with label "1" is selected, the output is the same:

{quote}
setter: abcdef
listener: abcdef
setter: abcdef
listener: abcdef
setter: abcdef
listener: abcdef
{quote}


  was:
Given rich:select:
            <rich:select value="#{bean.testValue}">
                <f:selectItem itemLabel="1" itemValue="1"/>
                <f:selectItem itemLabel="1" itemValue="abcdef"/>
                <f:selectItem itemLabel="2" itemValue="2"/>
                <f:ajax event="selectitem" listener="#{bean.testListener}"/>
            </rich:select>

and the bean:

@ManagedBean
@ViewScoped
public class Bean implements Serializable {
	private String testValue;

	public String getTestValue() {
		return testValue;
	}

	public void setTestValue(String testValue) {
		System.out.println("setter: " + testValue);
		this.testValue = testValue;
	}

	public void testListener(AjaxBehaviorEvent e) {
		System.out.println("listener: " + testValue);
	}
}

Whatever item with label "1" is selected, the output is the same:
setter: abcdef
listener: abcdef
setter: abcdef
listener: abcdef
setter: abcdef
listener: abcdef




    
> rich:select - duplicate labels
> ------------------------------
>
>                 Key: RF-12312
>                 URL: https://issues.jboss.org/browse/RF-12312
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-selects
>    Affects Versions: 4.2.2.Final
>         Environment: Ubuntu 12.04, Tomcat 6.0.35, Mojarra 2.1.8 OR MyFaces 2.1.7
>            Reporter: Denis Kniazhev
>
> Given rich:select:
> {code}
> <rich:select value="#{bean.testValue}">
>     <f:selectItem itemLabel="1" itemValue="1"/>
>     <f:selectItem itemLabel="1" itemValue="abcdef"/>
>     <f:selectItem itemLabel="2" itemValue="2"/>
>     <f:ajax event="selectitem" listener="#{bean.testListener}"/>
> </rich:select>
> {code}
> and the bean:
> {code}
> @ManagedBean
> @ViewScoped
> public class Bean implements Serializable {
> 	private String testValue;
> 	public String getTestValue() {
> 		return testValue;
> 	}
> 	public void setTestValue(String testValue) {
> 		System.out.println("setter: " + testValue);
> 		this.testValue = testValue;
> 	}
> 	public void testListener(AjaxBehaviorEvent e) {
> 		System.out.println("listener: " + testValue);
> 	}
> }
> {code}
> Whatever item with label "1" is selected, the output is the same:
> {quote}
> setter: abcdef
> listener: abcdef
> setter: abcdef
> listener: abcdef
> setter: abcdef
> listener: abcdef
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list