j-ClBind
The component reads an item with a linked data source. The component supports Tangular template inside the element (optional). As the value is stored in the {{ value.something }} variable.
Configuration:
datasource {String}ordirsource {String}required a data-sourceid {String}a pair key (default:id)nullable {Boolean}rendersnullvalue (default:true)exec {String}executesfunction(value, element)methodbind {String}binds a read value according to the defined path
Use it with <ui-component name="clbind">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<ui-component name="clbind" path="form.typeid" config="datasource:#types;nullable:0;bind:form.type">
<script type="text/html">
<div>Value: {{ value.name }}</div>
</script>
</ui-component>
<br />
<ui-bind path="!form.type" config="html:value.name"></ui-bind>
<script>
DEF.cl.types = [{ id: 'totaljs', name: 'Total.js' }, { id: 'java', name: 'Java' }, { id: 'php', name: 'PHP' }, { id: '.net', name: '.NET' }];
var form = {};
form.typeid = 'totaljs';
</script>