Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-1247

addCallables() : add the possibility to not specify a callback function when calling the created callable function

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0 alpha
    • None
    • None
    • None

      PageDAO.js
      this.addCallables({
                      role: "classe.java.PageDAO",
                      methodName: "createPage",
                      callback: {
                          handler: this._createPageCB,
                          scope: this,
                          ignoreOnError: true
                      },
                      waitMessage: "Création de la page en cours",
                      errorMessage: {
                          msg: "Impossible de créer la page"
                      }
      });
      _createPageCB (pageId)
      {
              Ext.create("Ametys.message.Message", { type: CREATION, target: { type: 'page', parameters: { id: pageId }} });
      }
      

      What I should write if I don't need a callback function :

      myCustomClass.js
      PageDAO.createPage([ parentPageId, name ], Ext.emptyFn, {});
      

      What i would like to write :

      myCustomClass.js
      PageDAO.createPage([ parentPageId, name ], null, {});
      

      or :

      myCustomClass.js
      PageDAO.createPage([ parentPageId, name ]);
      

      which is not currently possible

            raphael Raphaël Franchet
            sprieul Simon Prieul (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: