Changing Parts of Main Content on Click of Button in Common Menu

Changing Parts of Main Content on Click of Button in Common Menu

  

Hi,


I want to develop a web page where on click of a button in common menu, some parts of Main Content of same page change but I am not able to figure out how to achieve the same.

Does anyone have any idea to implement the same?

It would be nice if someone can post an oml file.


Thanks and Regards,

Rushabh Shah

Solution

Hello Rushabh,

  1. On the button define a screen action as destination.
  2. In the flow of the action add a Notify action, optionally set input parameter message to a text you want to propagate.
  3. In the parent (your screen that has the common\menu webblock) you will have to handle the notification, so you open the screen and select the block, in the properties right bottom corner of your sceen set the destination of the On Notify to a action that will catch the notification.
  4. In that action implement the logic to handle the notification. If you send a message in the OnNotify you can use the NotifyGetMessage action to retrieve it.
  5. To update parts of your screen use the AjaxRefresh widget, if data from your preperation needs to be refreshed first do then use the RefreshData widget for each of the aggregates.

The above is for OS10 (https://success.outsystems.com/Documentation/10/Developing_an_Application/Design_UI/Reuse_UI/Pass_Data_Between_Blocks)

For OS11 you do not have to use Notify and GetNotifyMessage (https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI/Pass_Data_Between_Blocks

Instead you can use strong typed parameters.

One more remark, be aware that the changed made in common/menu webblock will effect all screens that use it.

Regards,

Daniel

Solution

Hey Daniël,


Thanks. I will surely try this out.


Regads, 

Rushabh Shah

Hey Daniël,


The Solution for OS 11 works like charm. Thanks :P


Regards, 

Rushabh Shah

Great, happy coding!