This topic contains 1 reply, has 2 voices, and was last updated by msulima 6 years, 2 months ago.
- Topic
Hi! and Good day for everybody!!
I need some help trying to update a block-widget after closing a dialog-widget, but I’m probably doing something wrong. Set the aliases and call the mediator but I can not reload the block widget again after close a dialog-window..
maybe someone can guide me that I’m doing wrong.
First I render some content block from a controller. And add a button who will open a dialog window.
12345678910111213141516171819202122232425262728293031<div class="responsive-block">{{ oro_widget_render({'widgetType': 'block','url': path('my_path'),'title': '','alias': 'reload-this-widget',}) }}//** Button whom open a dialog and on close should reload widget alias 'reload-this-widget' from 'my-path'{{ UI.clientLink({'dataUrl': path('open_dialog_path'),'label' : 'Open window'|trans,'widget' : {'type' : 'dialog','multiple' : false,'refresh-widget-alias': 'reload-this-widget','reload-widget-alias': 'reload-this-widget','options' : {'alias': 'my-dialog','dialogOptions' : {'title' : 'My title'|trans,'allowMaximize': false,'allowMinimize': false,'modal': true,'dblclick': 'maximize','maximizedHeightDecreaseBy': 'minimize-bar','width': 550}}},}) }}</div>And the code for my dialog window
1234567891011121314151617<div class="widget-content">{% if saved is defined %}<script type="text/javascript">require(['underscore', 'orotranslation/js/translator', 'oroui/js/widget-manager', 'oroui/js/messenger', 'oroui/js/mediator','jquery'],function(_, __, widgetManager, messenger, mediator,$) {widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {messenger.notificationFlashMessage('success', __('saved'));mediator.trigger('widget_success:' + widget.getWid());mediator.trigger('widget_success:' + widget.getAlias());mediator.trigger('widgets:getByAliasAsync');widget.remove();});});</script>{% else %}//** etc....Thanks in advance for any help!!!
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.