POLALA.COM
welcome to my space
X
Welcome to:polala.com
Search:  
Web Design | Video Games | RVs | Religion | Management | Supplements and Vitamins | Software | Basketball | Related articles
NAVIGATION: Home >>
loading jsondata into a textfield
Published by: smith 2009-01-07
  • Hey!

    I have a problem with loading a jsonstore and write a value in a textfield.


    var LicenseData = new Ext.data.JsonStore({
    url: '../../libs/sysconfig/get-information.php',
    Grid Filter (Plugin) [Archive] - Page 2 - Ext JS Forums::
    that the arrows keys dont work inside the text field in your extension. { proxy: new Ext.ux.data.PagingMemoryProxy(js.reader.jsonData), reader: js.reader,
    http://extjs.com/forum/archive/index.php/t-14503-p-2.html
    HOME
    baseParams:{module:'sysLicense'},
    root: 'SystemLicense',
    fields: ['companyname', 'address','city','country']
    });

    LicenseData.on('load', function(store) {
    console.debug(LicenseData);
    FieldCompanyname.setValue(LicenseData.getAt(0).dat a.companyname);
    });
    LicenseData.load();

    [...]
    items: [
    {
    fieldLabel: Lang.LicenseCompanyname,
    name: 'FieldCompanyname',
    id:'FieldCompanyname'
    },{[...]


    get-information.php response me

    {success: true, SystemLicense :{"companyname":"Master GmbH","address":"Strasse 4","city":"12345 City","country":"Germany"}}



    The firebug told me
    四水流年 - JavaEye技术网站::
    走自己的路,没有屈服,没有束缚 表名=case when a.colorder=1 then d.name else end, insert into TestTable([id], FirstName, LastName, Country,Note) values(@i,
    http://zhanglei14616-163-com.javaeye.com/blog/monthblog/2008-07?show_full=true
    HOME

    LicenseData.getAt(0) has no properties
    [Break on this error] FieldCompanyname.setValue(LicenseData.getAt(0).dat a.companyname);


    Where ist my mistake?


  • SystemLicense in the json needs to be an array:

    {success: true, SystemLicense :[{"companyname":"Master GmbH","address":"Strasse 4","city":"12345 City","country":"Germany"}]}

    note that using a store to load a single record is a bit of overkill, as you could do it with just a normal ajax request.


  • Oh, ive found the mistake. And, yes of course it is very overkilled. But, now there are much more records.

    If you have only one record the json_encode function of php response:

    {success: true, SystemLicense :{"companyname":"Master GmbH","address":"Strasse 4","city":"12345 City","country":"Germany"}}


    If there more records the function returns:

    {success: true, SystemLicense :[{"companyname":"Master GmbH","address":"Strasse 4","city":"12345 City","country":"Germany"},
    {"companyname":"Master GmbH","address":"Strasse 4","city":"12345 City","country":"Germany"}]}

    If the response have more items, i can get them with getAt().





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market
  • for sale weather worx xm satellite
  • storm chaser teachers needed
  • chase hotline open to the public
  • fs panasonic 3ccd camcorder gs500
  • latest gulf of mexico sea surface temperatures
  • for sale dbsw819 cellular wireless booster
  • texas oklahoma dustbowl older thread
  • severe storms pound portions of california
  • 5 5 07 sweetwater ok tornado video
  • for sale cobra esd 7000 radar detector
  • greensburg damage and tornado video wanted
  • jvc hdv gy hd100 hd101 dv pro camcorder broadcast 3 ccd 2100 oklahoma city
  • boltek lightning detection w grl3
  • radar detector w noaa weather radio alert integrated
  • thunderstorms forecast as far north as des moines thursday
  • severe weather for oklahoma this friday
  • wanted waterproofing kits
  • for sale canon hv30 750
  • new weather data site
  • another first chase chance
  • gempak sale
  • target area forum
  • weather teams and teachers needed
  • can children help storm trackers from their home
  • tornado paintings
  • winter storm warning for dfw metroplex
  • sprint samsung a640
  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about loading jsondata into a textfield , Please add it free.
    About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008polala.com All Rights Reserved