Results 1 to 3 of 3

Thread: Form reader XML

  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    39
    Answers
    1

    Default Form reader XML

    Hi at all.

    I have a problem with an XML reader for a form and its data model.
    In an older version of ExtJS (3.4.0) if I leave empty a tag (or only with CDATA syntax if I expect that its value is a string), I can retrieve all the configured tags from action.result.data property.
    But now, in Extjs6 if I leave empty a tag (without the CDATA syntax) I cannot retrieve all the configured tags from action.result.data property.

    First example:

    From server side
    Code:
    <row>
        <tagA></tagA>
        <tagB><![CDATA[]]></tagB>
    </row>
    In client side
    Code:
    alert(action.result.data.tagA); //---> this exists
    alert(action.result.data.tagB); //---> this exists
    Second example:

    From server side:
    Code:
    <row>
        <tagA></tagA>
        <tagB><![CDATA[]]></tagB>
    </row>
    In client side:
    Code:
    alert(action.result.data.tagA); //---> undefined ???
    alert(action.result.data.tagB); //---> this exists!
    There is a reason for the last behavior?

    Thanks at all,
    Lorenzo.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    What is the difference between your two examples?

  3. #3
    Sencha User
    Join Date
    May 2008
    Posts
    39
    Answers
    1

    Default

    Hi Gary Schlosberg. Thanks for this reply.

    Maybe the two examples are not so clear.

    However, the unique difference is in that from the first example I have tagA (without CDATA) but not from the second example

    To better explain.

    In the first example (ExtJS 3.4.0), on client side I can retrieve tagA and tagB (with or without CDATA).

    In the second example, on client side I can retrieve only tagB (with CDATA) and not tagA (tagA returns as undefined because is not a property of action.result.data).

    From here my question.
    I must use CDATA with all the tags (string or not, empty or not) to retrieve their values?

    Thanks again,
    Lorenzo.

Similar Threads

  1. [CLOSED] Ext.form.Panel - reader is ignored
    By slawekme in forum Ext:Bugs
    Replies: 1
    Last Post: 9 Jun 2012, 6:45 PM
  2. [FIXED] Form Panel / Reader
    By EAHC-IT in forum Sencha Architect 2.x: Bugs
    Replies: 5
    Last Post: 9 Apr 2012, 10:45 PM
  3. Form Panel / Reader
    By EAHC-IT in forum Sencha Architect 2.x: Help & Discussions
    Replies: 1
    Last Post: 2 Apr 2012, 8:06 AM
  4. Form and JSON reader
    By pit in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 Oct 2008, 2:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •