<ext:Store runat="server" ID="RosesStore"> <Proxy> <ext:HttpProxy Method="POST" Url="WebService/GetRoses.asmx/GetRosesByRoseId" /> </Proxy> <Reader> <ext:XmlReader Record="Roses"> <Fields> <ext:RecordField Name="RoseId" Type="Int"> </ext:RecordField> <ext:RecordField Name="RoseName" Type="String"> </ext:RecordField> <ext:RecordField Name="Des" Type="String"> </ext:RecordField> </Fields> </ext:XmlReader> </Reader> <BaseParams> <ext:Parameter Name="roseId" Value="#{txtFullname}.getValue()" Mode="Raw" /> </BaseParams> </ext:Store>
<ext:FormLayout ID="FormLayout1" runat="server"> <ext:Anchor Horizontal="100%"> <ext:TextField ID="txtFullname" EnableKeyEvents="true" runat="server" FieldLabel="用户名"> <Listeners> <KeyUp Handler="#{RosesStore}.load();" /> </Listeners> </ext:TextField> </ext:Anchor> <ext:Anchor Horizontal="100%"> <ext:ComboBox ID="cmbRoses" runat="server" StoreID="RosesStore" Width="250" FieldLabel="角色" Editable="false" DisplayField="RoseName" ValueField="RoseId" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="选择相应角色..." ItemSelector="div.list-item" SelectOnFocus="true"> <Template ID="Template1" runat="server"> <tpl for="."> <div class="list-item"> <h3>{RoseName}</h3> {Des} </div> </tpl> </Template> </ext:ComboBox> </ext:Anchor> </ext:FormLayout>