1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    9
    Vote Rating
    0
    gerartje is on a distinguished road

      0  

    Default passing data from one card to another

    passing data from one card to another


    Hello,

    what's the best way to pass data to another card?

    Assume I have a card with 3 dates and one detailCard.
    Depending what I have clicked on the first screen I want to show different content.

    Now I work like this:

    I make a variable in my index.js, lets say "var selectedDay".
    When I click a button, I set the variabele "selectedDay" and call "setCard(detailCard)"

    DetailCard is an empty card (Panel component) with a listener added --> beforeactivate

    When beforeactivate is fired, I call the correspondig handler with a "this.update(selectedDay)" call, to fill the content within the panel.

    This works, but not always, sometime my panel is just empty. What am I doing wrong :-)

    thanks

    grtz

  2. #2
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    691
    Vote Rating
    12
    mrsunshine will become famous soon enough

      0  

    Default


    i would prefer to fire your own event in your application scope and include the information you need as params. than on your panel which should show the information, add a listener to you event and onYourEvent update the content of your panel.

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    9
    Vote Rating
    0
    gerartje is on a distinguished road

      0  

    Default


    seems logic :-)

    I have done it the quick and dirty way now, time was against me :-)

    tnx

Similar Threads

  1. Passing other data in File Uploading
    By calhau in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 20 Oct 2009, 5:09 AM
  2. newbie question, passing data around
    By craigorymaas in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 28 Sep 2009, 11:17 AM
  3. Passing data from one grid to another
    By technokrafts in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 13 Jul 2009, 9:20 PM
  4. passing data to json object
    By paulSC in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 15 Jan 2009, 10:11 AM
  5. Passing array as data store
    By priyanka_iknip in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 10 Sep 2008, 6:36 AM

Thread Participants: 1