1. #1
    Ext User
    Join Date
    Mar 2010
    Posts
    11
    Vote Rating
    0
    alissonfg is on a distinguished road

      0  

    Default how to use mysql data on ext designer?

    how to use mysql data on ext designer?


    hi, I need to show some data on grids, but how I connect with mysql?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,165
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    You can use a server-side language like PHP, ColdFusion, Ruby, Java or .NET to connect to your MySQL server and return JSON or XML.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Ext User
    Join Date
    Mar 2010
    Posts
    11
    Vote Rating
    0
    alissonfg is on a distinguished road

      0  

    Default


    right, I generated a xml file with my mysql database, but

    how I configure on ext designer
    ?

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,165
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Great, first setup the server you will be working with in Edit -> Preferences. If the data is on http://localhost/ then you can skip this step.

    Then go to the Data Stores tab at the top right hand side of the application. Click the arrow dropdown next to Add Json Store. Click Add Xml Store.

    You will now have an Xml store in your data stores tab. Select it via your mouse.

    Component Config has now become active, you can provide your url.

    If you put myApp/sample.xml the request will be generated to your url prefix + the url you provide. (This is intelligent enough to handle things like relative and absolute paths.)

    You can then define what a record is. This is the particular Xml node in your xml that represents a record.

    Take a look at the following standard Ext example: http://www.extjs.com/deploy/dev/exam.../xml-grid.html

    Here we've setup the record to "Item". You can see how this corresponds to the Xml.

    Next, we need to add fields to our store. Right click the store (or use the overflow menu item option) to add a few fields to the store. You can then configure the name's of these fields within that Item xml node.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,165
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    As a side note, I would recommend the use of JSON instead of XML for performance reasons.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Ext User
    Join Date
    Mar 2010
    Posts
    11
    Vote Rating
    0
    alissonfg is on a distinguished road

      0  

    Default


    I get to load the xml content of my mysql database

    but how I load this "mystore" on a grid? or a data view?

    i'm not understanding ext designer,

Thread Participants: 1