Skip to main content
Apr 15, 2020 1:32 AM UTC
Solved

How Can I Add An Output Event to Menus Widgets by Coding?

Hello everone!

I want to build a Master like follwing pic.

JasonKwan987_0-1586913524311.png

Click the top menu which is parent menu of the leftside one, the leftside menu will change to appropriate sub items of the top.

I don`t want to build two Master or Mashup  nested. It is better to solve by one Master.

Is there a mathod to add an output Event to Menus Widgets or create a Service for calling one or more sysytem Service as solution?  

 

PaiChungAnswer
Apr 17, 2020 12:31 PM UTC

Have you thought of managing visible menu items by using User Groups?

Not sure how dynamic you are grabbing the menu definition, but the exact same table (data source) should be used for both of the menus for the interaction between menus to work.

4 replies

Apr 16, 2020 12:16 PM UTC

This behavior should be possible with Thingworx menus and the menu widget.

Create your main menu with submenus in Thingworx

Then add two menu widgets, one to display the parent menu items, the other set to display the children.

Apr 17, 2020 2:16 AM UTC

thanks for reply.

I need to get menu items from database insure that i can add or delete menu labels optionally.

But actions in ThingWorx Composer can't realize function.

So I create a service attemched with Menus Widgets MenuData field and put the Mashup field from top menu to leftside where i pulled a Contained Mashup widget on it.

JasonKwan987_0-1587089851812.png

 

It didn't work.

 

PaiChungAnswer
Apr 17, 2020 12:31 PM UTC

Have you thought of managing visible menu items by using User Groups?

Not sure how dynamic you are grabbing the menu definition, but the exact same table (data source) should be used for both of the menus for the interaction between menus to work.