cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to get details of selected menu from any service.

menayat
6-Contributor

How to get details of selected menu from any service.

Hi,

 

Suppose I have the menu in my master. The menu is like electronics, groceries, and vegetables in horizontal. 

Now the question is simple. How can I get the detail of the selected menu?


If I select groceries then I want to know the details of the grocery menu like 


menu .linkDestination = "MainMash";
menu .parentMenuId = "TotalCareMenu";
menu .menuId = "TotalCareMenu_0";
menu .isDefault = "true";
menu .imageURL = "";
menu .linkTarget = "Self";
menu .description = "";
menu .linkType = "Mashup";
menu .title = "[[MAP]]";

Thank you. 

ACCEPTED SOLUTION

Accepted Solutions

Historically menu doesn't updates Service Selected Row  

 

There's a nasty trick: Add a hidden List Widget and bind the menu content to it also, set (ValueField=linkDestination,DisplayField=title - or whatever-), then bind Menu's Mashup property to List "SelectedText", and voila you will have the Selected Row on the service result selected and you will be able to use selected Row(s) content.

View solution in original post

4 REPLIES 4

Historically menu doesn't updates Service Selected Row  

 

There's a nasty trick: Add a hidden List Widget and bind the menu content to it also, set (ValueField=linkDestination,DisplayField=title - or whatever-), then bind Menu's Mashup property to List "SelectedText", and voila you will have the Selected Row on the service result selected and you will be able to use selected Row(s) content.

menayat
6-Contributor
(To:CarlesColl)

Hi, Thank you for your interest in helping me.

Now I had completed my requirement but now I need to know, how to get a menu by default selected in a dynamic menu.

My codes are


var row = new Object();
row.linkDestination = mainMash;
row.parentMenuId = "Menu";
row.menuId = "Menu_0";
row.isDefault = true;
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "MAP";
result.AddRow(row);

 

Could you please help me with that. Thankyou!

Setting isDefault to true should work.

menayat
6-Contributor
(To:CarlesColl)

I did sir, but It's not working. Please help me out.

 

You can also see below to what I did,


var row = new Object();
row.isDefault = false;
row.parentMenuId = "";
row.imageURL = "";
row.description = "";
row.menuId = "TotalCareMenu";
row.linkType = "Menu";
row.title = "";
result.AddRow(row);

 

row = new Object();
row.linkDestination = "MainMash";
row.parentMenuId = "Menu";
row.menuId = "Menu_0";
row.isDefault = true;
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "MAP";
result.AddRow(row);

 

row = new Object();
row.linkDestination = "ReportMash";
row.parentMenuId = "Menu";
row.menuId = "Menu_1";
row.isDefault = false;
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "REPORT";
result.AddRow(row);

 

row = new Object();
row.linkDestination = "SettingsMash";
row.parentMenuId = "Menu";
row.menuId = "Menu_2";
row.isDefault = false;
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "SETTINGS";
result.AddRow(row);

and I want to select the

Announcements


Top Tags