Bug: ComboBox.getValue() with non-unique item text.

  1. #1

    Bug: ComboBox.getValue() with non-unique item text.

    Hi


    I have (possibly) found a bug with the ComboBox. Running the following code snippet produces two different results from getValue() when the last item in the list is selected.


    Not sure if this is present in plain extjs - haven't tested it as I'm not too familiar with extjs.




    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
    <script type="text/javascript" >
    
    </script>
        <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        
            <ext:ComboBox ID="ComboBox1" runat="server">
            <Items>
                <ext:ListItem Value="0" Text="Zero"/>
                <ext:ListItem Value="1" Text="One"/>
                <ext:ListItem Value="2" Text="Two"/>
                <ext:ListItem Value="3" Text="Three"/>
                <ext:ListItem Value="4" Text="Four"/>
                <ext:ListItem Value="5" Text="Two"/>
            </Items>
            <Listeners>
                <Select Handler="alert(#{ComboBox1}.getValue());" />
            </Listeners>
            </ext:ComboBox>
            <ext:Button ID="Button1" runat="server" Text="Submit">
            <Listeners>
                <Click Handler="alert(#{ComboBox1}.getValue());" />
            </Listeners>
            </ext:Button>
        
        
    
        </form>
    </body>
    </html>
  2. #2

    RE: Bug: ComboBox.getValue() with non-unique item text.

    Hi Neil,

    Thanks for the sample. I was able to reproduce the problem.


    We're just trying to figure out what's causing the conflict and should have another update shortly.


    Geoffrey McGill
    Founder & CEO

Similar Threads

  1. Replies: 3
    Last Post: Oct 27, 2012, 10:47 AM
  2. [CLOSED] ComboBox getValue returns text instead of value
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Jun 19, 2012, 7:22 AM
  3. Replies: 4
    Last Post: Nov 30, 2011, 5:25 AM
  4. [CLOSED] Change combobox item text
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 25, 2011, 1:20 PM
  5. Replies: 10
    Last Post: Apr 05, 2010, 1:42 AM

Posting Permissions