Postingan

Menampilkan postingan dari 2021

ReactJS | 6. Menambahkan input collection

  6. Menambahkan input collection Menambahkan Control Baru Ke Input Collection Pada bagian ini akan membuat control input baru pada InputCollection Input Checkbox export const InputCheckbox = ( { label , control , name , required , rules , errors , } ) => { return < > < Controller control = { control } render = { ( { onChange , onBlur , value } ) => ( < div className = { "form-group " + ( required ? "required" : "" ) } > < label className = "col-md-3 control-label" > { label } < / label > < div className = "col-md-8" > < input type = "checkbox" onChange = { ( ) => { onChange ( value ? ! value : true ) } } checked ...

ReactJS | 4. Input Collection

Gambar
  4. Input Collection Penggunaan Input Collection Input collection di gunakan oleh react sudah dibuatkan liblary ui kecilnya yang ada di file  InputCollection.js Membuat Controller Tambahkan Controller semisal  TestReactCtr.java  pada package  controllers  dengan fungsi index yang akan mererender index.html . . . public static void inputCollection ( ) { render ( ) ; } . . . Copy Tambahkan route GET / testreact - inputcollection TestReactCtr . inputCollection Copy Tambahkan view tambahkan view pada folder  TestReactCtr/inputCollection.html #{extends 'border.html'/} < div class = " container-fluid " > <!-- Toolbar --> < div class = " row " > < div class = " col-md-12 " > <!-- Breadcrumb --> < ol class = " breadcrumb " > < li > < a href = " @{PublikCtr.home()} " ...