Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default [solved]How to load data from store to FormPanel?

    [solved]How to load data from store to FormPanel?


    I have a form.Panel in which I show some data. I receive the data as XML from the server and load it directly into the fields using

    podform.getForm().load({url:url_servlet+'kadastr_zemform.jsp' ... along with a XMLReader.
    Now I want to show the data in 3 separate form.Panel. But I just wan't to load the data once before loading it into panels. I guess form.load() no longer works for me in that case.
    How would I load the data into several panels? Should I use a store cause I also need to be able to edit the data and send it back?

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi maxkliver,

    If you want to display data into three separate formPanel, for this purpose create a single store and use setValues() method of the form like -

    Code:
    var formData = Ext.data.Store(.........);
    
    yourFormPanel.setValues(formData);
    For more detail read API docs-http://docs.sencha.com/ext-js/3-4/#!...thod-setValues
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    I get error:

    TypeError: podform.setValues is not a function

    And in FormPanel API i dont see a setValue() function. Whats wrong?

    UPDATE

    My bad right syntax is formPanle.getForm().setValues();

    But anyway its not work with store. Someone can give me example?

  4. #4
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    2
    johnfanyong is on a distinguished road

      0  

    Default


    var record = store.getAt(rowIndex);
    formPanel.getForm().loadRecord(record);

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    Code:
    var record = store.getAt(rowIndex);
    formPanel.getForm().loadRecord(record);
    Its work.

    What do you think about this?

    Code:
    podform.getForm().setValues(store.getRange(0)[0].data);
    Whats more correctly?
    But i have a problem. Its works only if i have some alerts before this line. How to use setValuers after store was loaded?

  6. #6
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    2
    johnfanyong is on a distinguished road

      1  

    Default


    write the code in store load listener.
    store.on('load',function(){
    //xxxxx
    });

  7. #7
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    Thank you)

Thread Participants: 2