Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch selectfield item selection issue
    primarykey
    data
    text
    <p>Here is my Model and Store, </p> <pre><code> Ext.regModel('Agent', { fields: [{ name: 'userid', type: 'int' }, { name: 'agentname', type: 'string'}] }); App.stores.agentStore = new Ext.data.Store({ model: 'Agent', storeId: 'AgentsStoreid', proxy: { type: 'ajax', url: 'https://abc123.com/wsbrightdoor.asmx/GetAgents?username=abc&amp;password=123', reader: { type: 'xml', root: 'root', record: 'salesagent' } }, autoLoad: true }); //App.stores.agentStore.load(); console.log(App.stores.agentStore); </code></pre> <p>I'm setting this store to my selectitem like this </p> <pre><code>var sel = new Ext.form.Select( { id: 'Myselectfield', name: 'myagent', label: 'Agent', store: App.stores.agentStore, displayField: 'agentname', valueFiels: 'userid', placeHolder: 'Click/touch to select options...', }); </code></pre> <p>Here is my XML file the server returns</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;root&gt; &lt;salesagent&gt; &lt;userid&gt;1&lt;/userid&gt; &lt;agentname&gt;Name1&lt;/agentname&gt; &lt;/salesagent&gt; &lt;salesagent&gt; &lt;userid&gt;13&lt;/userid&gt; &lt;agentname&gt;Name2&lt;/agentname&gt; &lt;/salesagent&gt; &lt;/root&gt; </code></pre> <p>I can see store is getting values from the webserver and I can see the data object with agentname and userid values. We are using Sencha touch 1.1.0. I can now see the values in the selectfield that are populated from the webservice. When I select an item the selected item is not changing to the item I selected. I see the first element in my store as selected. How do we fix this? Please suggest. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload