Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How do you bind data to menu options?

edited Sep 4, 2019 2:21AM in Visual Builder 3 comments

Summary

What is the syntax for binding data to a menu option?

Content

In this JET example, how do we bind a data variables to the actual listing of Options in VBCS?

 

            <oj-menu-button id="menuButton1">
              File
              <!-- To handle menu item selection, use an action listener as shown, not a click listener. -->
              <oj-menu id="myMenu1" slot="menu" style="display:none" on-oj-action="[[menuItemAction]]">
                <!-- ko foreach: menuItems -->
                <oj-option data-bind="attr: {id: id, disabled: disabled, value: label}">
                  <span slot="startIcon" data-bind="css: icon"></span>
                  <span data-bind="text: label"></span>
                </oj-option>
                <!-- /ko -->
              </oj-menu>
            </oj-menu-button>
            <oj-menu-button id="menuButton2">

 

We tried something like this, but we cannot get it to display.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!