Sep 16, 2008, 11:53 AM
[FIXED] [V0.6] ComboBox and Selected Item
Hi,
I have the following code.
try
me.lbladdloi.text = me.precombo.selecteditem.value
But when I explicitely select an item. The value is passed properly.
Looks like a bug to me.
Thanks,
I have the following code.
<ext:Window Collapsible ="false" Modal="true" DefaultButton="#{btnaddloi}" Width="367px" Height="150px" ID="addloi" Icon ="Add" ShowOnLoad ="false" AnimateTarget ="btn" AnimCollapse ="true" runat="server" Title="Add LOI">
<Content>
<ext:Panel StyleSpec="padding:10px;" ID="loinopanel" Height="50px" runat="server" BodyBorder ="false"><Content >
<table >
<tr><td>
<ext:ComboBox AllowBlank="false" Editable="false" BlankText="Select" Width="70px" Mode ="Local" ID="precombo" runat="server">
<Items >
<ext:ListItem Text ="SRA" Value ="SRA" />
<ext:ListItem Text ="ENG" Value ="ENG" />
</Items>
<SelectedItem Text ="SRA" Value ="SRA" />
</ext:ComboBox></td>
<td><ext:Label Text ="&nbsp;/&nbsp;" runat="server"></ext:Label></td>
<td><ext:textfield AllowBlank="false" BlankText="Enter Loi No" EmptyText ="Please enter no" ID="txtloino" runat="server" ></ext:textfield></td>
<td><ext:Label Text ="&nbsp;/T/&nbsp;" runat ="server"></ext:Label></td>
<td><ext:ComboBox Editable="false" AllowBlank="false" BlankText="Select" Width="90px" ID="postcombo" runat ="server" >
<Items >
<ext:ListItem Text="Pvt." Value ="Pvt." />
<ext:ListItem Text="M.C.G.M." Value ="M.C.G.M." />
<ext:ListItem Text="MHADA" Value ="MHADA" />
<ext:ListItem Text ="Govt." Value ="Govt." />
</Items>
<SelectedItem Text="Pvt." Value ="Pvt." />
</ext:ComboBox></td></tr>
</table>
</Content></ext:Panel>
<ext:Label StyleSpec="padding-left:15px;" AutoShow ="true" ID="lbladdloi" runat="server" Text=""></ext:Label>
</Content>
<Buttons >
<ext:Button runat="server" ID="btnaddloi" Text ="Add" Icon="Add">
<Listeners >
<Click Handler="#{txtloino}.validate();#{precombo}.validate();#{postcombo}.validate();if(!#{txtloino}.isValid()||!#{precombo}.isValid()||!#{postcombo}.isValid()){return false;};" />
</Listeners>
<AjaxEvents>
<Click OnEvent="btnaddloi_Click">
<EventMask Msg ="Adding..." MinDelay ="0"/>
</Click>
</AjaxEvents>
</ext:Button>
<ext:Button runat="server" ID="cancelloi" Text ="Close" Autopostback="false" Icon="Cancel" OnClientClick ="#{addloi}.hide();" ></ext:Button>
</Buttons>
</ext:Window>
Here, when I click the button, the value of selected item is not passed to the code behind. Its Blank. But the selected item is shown in the combobox.try
me.lbladdloi.text = me.precombo.selecteditem.value
But when I explicitely select an item. The value is passed properly.
Looks like a bug to me.
Thanks,