Hello,
Requirement:
It is required to trigger a dialog from an external widget which will allow to switch the view in a multi view workspace on clicking on OK button. For example: when having Content and Task views, switch to Task view in case the user is on Content view.
Configurations:
We made a dialog which is called by an external custom widget and displayed using Open Ajax Hub in JavaScript sending a message on channel D2_ACTION_DISPLAY_DIALOG. In D2-Configuration we added our external custom widget and assigned him to workspace. Dialog is showed in D2 Client. Now, we need on pressing OK in dialog ( by overriding validDialog() method in Java code) to switch to another view.
Question:
In javascript we can do this publishing a message to the Hub, like this:
var messageToSend = new OpenAjaxMessage();
Any ideas on how we can implement this in the java method validDialog() ?
I have seen that only Widgets objects in java could publish events to the Message Hub, there is any idea how to obtain the current widget from the Context ?
Any ideas are welcomed !
Thank you.