0

in my blackberry cascades app I have created a page using qml that loads data from backend after making an API call and works fine. But after I move to next page and come back I need to reload the data. i.e perform the onCreationCompleted operation again. Also the Qt.pageDef shows undefined after I come back so I guess if I could reload the page, it would work fine. I'm new to blackberry cascades, can anyone tell me what should I do to reload this page again and re-initialise Qt.pageDef?

Page {
        id: homePage

        Container {
           id:contactListView
                    //Some code to create listview

                  onCreationCompleted:
                    {
                      Qt.pageDef = contactListView;
                     fetchInfo();
                     }

                    fetchInfo()
                     {
                      //make api call and fill listview
                       }
                  }
    }
Francis F
  • 3,157
  • 3
  • 41
  • 79
  • Could you post the code where you push that next page to the screen? – tonytony Nov 29 '14 at 10:16
  • I have a button that pushes to next page, like onClicked: { nav.push(profilePageDefinition.createObject()); } profilePageDefinition is ComponentDefinition in attached objects. – Francis F Nov 30 '14 at 18:38

1 Answers1

1

Obviously, there are some part of code missing as you show us a Page but you seem to push a new page from a NavigationPane.

Add this to your NavigationPane : onPopTransitionEnded: { fetchInfo() }

Roger Leblanc
  • 1,543
  • 1
  • 10
  • 9
  • I have a main.qml from where I push to this page. There is no navigation page in the homepage I can only access the paneproperties – Francis F Dec 07 '14 at 18:32