ForgeKomponenty
pl

Komponenty

j-RadioButton

jComponent 20 · jcomponent@20 component Przykład załadowany z jComponent 20
  • W projektowaniu dostosowanym możesz użyć j-RadioButtonExpert
  • Teraz możesz użyć źródła danych

Konfiguracja:

  • items {String} musi zawierać text 1|value 1;text 2|value 2 lub text 1;text 2
  • required {Boolean} umożliwia required
  • disabled {Boolean} wyłącza tę kontrolę
  • label {String} może zmienić zawartość (default: innerHTML)
  • type {String} może zawierać number
  • inline {Boolean} umożliwia/nie wyklucza pozycji inline (default: true)
  • datasource {String} ścieżka do źródła danych (musi być array lub array obiektów)
  • text {String} określa nazwę właściwości dla tekstu (w źródle danych), domyślnie: name
  • value {String} określa nazwę właściwości dla wartości (w źródle danych) wstępnie: id

Użyj go z <ui-component name="radiobutton">Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu DEF.fallback (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.

example.html
<ui-component name="radiobutton" path="model.myvalue1" config="items:Yes|0,No|1,Maybe|2;type:number;required:true;inline:0" default="0">Are you crazy?</ui-component>
<br />
<ui-component name="radiobutton" path="model.myvalue2" config="datasource:frameworks;required:true">What is the best node.js framework?</ui-component>
<br />
<ui-component name="radiobutton" path="model.myvalue3" config="datasource:list;required:true">Total.js is framework for...</ui-component>

<script type="text/javascript">
	var frameworks = ['Total.js', 'express', 'Hapi', 'Koa', 'Sails'];
	var list = [{ name: 'Ruby', id: 1 }, { name: 'PHP', id: 2 }, { name: 'node.js', id: 3 }, { name: 'Python', id: 4 }];
</script>