PDA

View Full Version : [CLOSED] I Write code in accordance with Example ,reported Uncaught TypeError: Cannot call method 'call' of undefined



tobros
Jun 05, 2013, 6:04 AM
I write code accordance with Example (http://examples2.ext.net/#/Form/ComboBox/Two_Columns/)

<ext:ComboBox ID="ItemClassCode" runat="Server" FieldLabel="项目类别"
EmptyText="选择项目分类"
TypeAhead="true"
Editable="false"
ForceSelection="true"
DisplayField="ItemClassName"
ValueField="ItemClassCode"
MinChars="1"
MatchFieldWidth="false"
PageSize="10">
<Store>
<ext:Store ID="Store4" runat="server" IsPagingStore="true" PageSize="10">
<Model>
<ext:Model ID="Model4" runat="server">
<Fields>
<ext:ModelField Name="ItemClassCode" />
<ext:ModelField Name="ItemClassName" />
<ext:ModelField Name="CodeScheme" />
<ext:ModelField Name="Memo" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ListConfig Width="340" Height="300" ItemSelector=".x-boundlist-item">
<Tpl ID="Tpl2" runat="server">
<Html>
<tpl for=".">
<tpl if="[xindex] == 1">
<table class="cbStates-list">
<tr>
<th>项目分类编码</th>
<th>项目分类名称</th>
<th>编码方案</th>
<th>备注</th>
</tr>
</tpl>
<tr class="x-boundlist-item">
<td>{ItemClassCode}</td>
<td>{ItemClassName}</td>
<td>{CodeScheme}</td>
<td>{Memo}</td>
</tr>
<tpl if="[xcount-xindex]==0">
</table>
</tpl>
</tpl>
</Html>
</Tpl>
</ListConfig>
<Triggers>
<ext:FieldTrigger Icon="Clear" HideTrigger="true" />
</Triggers>
<Listeners>
<BeforeQuery Handler="this.getTrigger(0)[this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
<TriggerClick Handler="if (index == 0) {
this.focus().clearValue();
trigger.hide();
}" />
<Select Handler="this.getTrigger(0).show();" />
</Listeners>
</ext:ComboBox>


Store store4 = this.ItemClassCode.GetStore();
store4.DataSource = new ItemClassService().getAllItemClass();
Store4.DataBind();

Daniil
Jun 05, 2013, 11:01 AM
Hi @tobros,

Thank you for the report. I think it has been fixed already in the SVN trunk. At least, I could not reproduce. But I can reproduce with v2.2 release.

So, please update form SVN.