There are a number of data types that are supported for widget settings. To specify the data type for a setting, you set the type key to one of the following values:

Depending on the data type it uses, a property will also support a number of data type-specific keys. For the stringType data type, you can add the following keys:

For the numberType data type, you can add the following keys:

For the optionType and multiSelectOptionType data types, you can add an options key that contains a list of objects that describe the entries in the drop-down list. Each option has the following keys:

As previously mentioned, the configurable settings you create are added to the widget’s view model and can be referenced from templates using a data-bind attribute, for example:

<div class="quoteContainer" data-bind="style : {fontSize : quoteSize}">
  <!-- ko ifnot : quoteText() == '' -->
  <blockquote data-bind="css : {quoted : quoteStyle}">
    <p data-bind="text: quoteText"></p>
    <!-- ko ifnot : quoteSource() == '' -->
    <footer data-bind="text : quoteSource"></footer>
    <!-- /ko -->
  </blockquote>
  <!-- /ko -->
</div>

Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices