POLALA.COM
welcome to my space
X
Search:  
Welcome to:polala.com
Web Design | Video Games | RVs | Religion | Management | Supplements and Vitamins | Software | Basketball | Related articles
 HOME   XmlReader, mapping and checkboxes checked
XmlReader, mapping and checkboxes checked
Published by: jack 2009-01-09
  • Hi,

    I am using a form panel, and the form is populated with data from and xml file through the XmlReader. But I can't get the some checkboxes checked.

    Xml file:

    1


    true
    true
    true


    true
    true


    And I have an XML reader configured:
    var xmlR = new Ext.data.XmlReader({
    Ajax Tutorial : Ajax Help and Tutorials » javascript::
    XmlReader({ // records will have an "Item" tag record: 'Item', id: 'ASIN', totalRecords: '@total' }, [ // set up the fields mapping into the xml doc // The
    http://www.ajaxtutorial.net/index.php/category/javascript/
    HOME
    record : 'produkt',
    success: '@success',
    id: 'produkt_nr'
    }, [
    {name: 'produkt_nr', mapping:'awa_produkt_nr'},
    {name: 'multiple[1][3]', mapping: 'awa_multiple/awa_1/awa_3'},
    {name: 'multiple[1][2]', mapping: 'awa_multiple/awa_1/awa_2'},
    {name: 'multiple[1][1]', mapping: 'awa_multiple/awa_1/awa_1'},
    {name: 'multiple[1][4]', mapping: 'awa_multiple/awa_1/awa_4'},
    {name: 'multiple[1][5]', mapping: 'awa_multiple/awa_1/awa_5'},
    {name: 'multiple[2][1]', mapping: 'awa_multiple/awa_2/awa_1'},
    {name: 'multiple[2][2]', mapping: 'awa_multiple/awa_2/awa_2'},
    {name: 'multiple[2][3]', mapping: 'awa_multiple/awa_2/awa_3'}
    Automatic Datastore and ColumnModel Creator (PHP) - Ext JS Forums::
    This version uses the XMLReader (easy to change to JSON, I believe). Requires MySQL - I can put . <input type="checkbox" name="editable_checked"><BR>
    http://extjs.net/forum/showthread.php?p=242419
    HOME
    );


    The fields is added to the form this way:

    [...]
    {xtype: 'checkbox', boxLabel: 'Large  ', name: 'multiple[1][3]'},{xtype: 'checkbox', boxLabel: 'Medium  ', name: 'multiple[1][2]'}
    [...]


    The produkt_nr field is populated fine. But the checboxes are not checked as they should, even though the field names correspond to those above.

    Any clue?


  • xml must return 0 value if not checked, 1 if checked


  • did you try setting type: 'boolean'?


    {name: 'multiple[1][3]', mapping: 'awa_multiple/awa_1/awa_3', type: 'boolean'},

    See Record.create() in API (http://extjs.com/deploy/dev/docs/?class=Ext.data.Record), it's mentioned in the XmlReader constructor detail:

    XmlReader( Object meta, Object recordType)
    Create a new XmlReader.
    Create a new XmlReader.
    Parameters:

    * meta : Object
    Metadata configuration options
    *recordType : Object
    Either an Array of field definition objects as passed to Ext.data.Record.create, or a Record constructor object created using Ext.data.Record.create.





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market
    #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 XmlReader, mapping and checkboxes checked , Please add it free.
    About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008polala.com All Rights Reserved