December 2017
Intermediate to advanced
282 pages
5h 54m
English
Create an ojSelect component using the ojComponent binding with an ID. To review the value of the select element, create an HTML label with the for attribute referring to the value of the ID from ojSelect. Populate the value from the model layer. The select component is available in two modes, single select and multi select. Let's look at examples for both. Following is the example for the single select component:
<form id="form1"> <label for="selectTransport">Mode of Transport: </label> <select id="selectTransport" data-bind="ojComponent: {component: 'ojSelect', value: selectedVal, rootAttributes: {style:'max-width:20em'}}"> <option value="W">Walk</option> <option value="B">Bicycle</option> <option value="M">Motor ...Read now
Unlock full access