Oct 16, 2009, 7:44 AM
[0.8.1] Combo with ForceSelection
Hi,
I have a problem with the combobox in extjs 0.8.1 and 0.8.0. When I start writing in my combo the autocomplete function select the value regularly.
If you add characters at the end of the combo with the selected value such ZZZ, start forceselection and reselect the correct value by removing ZZZ but the VALUE of the hidden field: cdMotivo_Value has the text and not the value!
Definition of my combo:
The result to the normal selection code is as follows:
After the selection of forceselection (made by adding the suffix ZZZ):
Something wrong in the definition of my combo? I have to create a function that my system matching text with the value? I wish that I maintained the value.
Thanks a lot for the attention,
I have a problem with the combobox in extjs 0.8.1 and 0.8.0. When I start writing in my combo the autocomplete function select the value regularly.
If you add characters at the end of the combo with the selected value such ZZZ, start forceselection and reselect the correct value by removing ZZZ but the VALUE of the hidden field: cdMotivo_Value has the text and not the value!
Definition of my combo:
<ext:ComboBox ID="cdMotivo" runat="server" FieldLabel="Motivo" StoreID="dsRevocheRinunce" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" DisplayField="DESCRIZIONE_MOTIVO" ValueField="CODICE_MOTIVO" DataIndex="COD_MOTIVO" LoadingText="Caricamento..." IDMode="Static" FireSelectonload="true">
<Triggers>
<ext:FieldTrigger Icon="Clear" Qtip="Svuota Selezione" />
</Triggers>
<Listeners>
<TriggerClick Handler="this.clearValue();" />
</Listeners>
</ext:ComboBox>
The result to the normal selection code is as follows:
<div style="" id="x-form-el-cdMotivo" class="x-form-element">
<div class="x-form-field-wrap" id="ext-gen111" style="overflow: hidden; width: 877px;">
<input type="hidden" id="cdMotivo_Value" name="cdMotivo_Value" value="4 " />
<input type="text" id="cdMotivo" autocomplete="off" size="24" class=" x-form-text x-form-field"
name="cdMotivo" style="width: 835px;" />
<img class="x-form-trigger x-form-clear-trigger" src="/extjs/resources/images/gray/s-gif/coolite.axd"
ext:qtip="Svuota Selezione" id="ext-gen113" />
<img class="x-form-trigger" src="/extjs/resources/images/gray/s-gif/coolite.axd"
id="ext-gen114" />
<input type="hidden" name="cdMotivo_SelIndex" id="cdMotivo_SelIndex" autocomplete="off"
size="20" class=" x-form-hidden x-form-field" value="3" />
cdMotivo_Value = 4, OK!After the selection of forceselection (made by adding the suffix ZZZ):
<div style="" id="x-form-el-cdMotivo" class="x-form-element">
<div class="x-form-field-wrap " id="ext-gen111" style="overflow: hidden; width: 877px;">
<input type="hidden" id="cdMotivo_Value" name="cdMotivo_Value" value="Mutate condizioni di mercato"/>
<input type="text" id="cdMotivo" autocomplete="off" size="24" class=" x-form-text x-form-field " name="cdMotivo" style="width: 835px;"/>
<img class="x-form-trigger x-form-clear-trigger" src="/extjs/resources/images/gray/s-gif/coolite.axd" ext:qtip="Svuota Selezione" id="ext-gen113"><img class="x-form-trigger" src="/extjs/resources/images/gray/s-gif/coolite.axd" id="ext-gen114" />
<input type="hidden" name="cdMotivo_SelIndex" id="cdMotivo_SelIndex" autocomplete="off" size="20" class=" x-form-hidden x-form-field" value="-1">
cdMotivo_Value is not 4 but text.Something wrong in the definition of my combo? I have to create a function that my system matching text with the value? I wish that I maintained the value.
Thanks a lot for the attention,