Jan 27, 2010, 12:14 PM
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.
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>