Announcement

Collapse
No announcement yet.

how to refresh a side panel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to refresh a side panel

    I have added a side-panel and I want to refresh it on quick-create submission what am trying to do atm


    Espo.define('custom:views/section/detail', 'views/detail', function (Dep) { return Dep.extend({ setup: function () { Dep.prototype.setup.call(this); this.menu.buttons.push({ 'label': 'Create Sub-Section', 'action': 'createSubSection', }); }, actionCreateSubSection: function () { var scope = "Section"; var type = this.getMetadata().get(['clientDefs', scope, 'quickCreateModalType']) || 'edit'; var viewName = this.getMetadata().get(['clientDefs', scope, 'modalViews', type]) || 'views/modals/edit'; this.createView('quickCreate', viewName, { scope: scope, attributes: {parentName: this.model.attributes.name, parentId: this.model.id} }, function (view) { view.once('after:render', function () { Espo.Ui.notify(false); }); this.listenToOnce(view, 'close', function (models) { // what should I do here }); view.render(); }); } }); });
    how would I reload the model it self , then update the side-panel view , since the quick-create is going to effect the model itself?

  • #2
    this.model.fetch();
    or
    this.collection.fetch();
    or
    this.reRender();

    Comment


    • #3
      FYI, this.model.fetch() doesn't refresh the side panel.

      this.reRender() does however!

      Comment


      • #4
        but it requires a this.model.fetch() first!

        Comment

        Working...
        X