menambahkan checkbox pada grid

Component checkbox pada grid biasanya digunaka untuk memilih row mana yang akan di-delete..

Contoh AddCheckBox.tml

<form>

<table t:type="grid" t:source="listAnggota" t:row="anggota" t:add="check" t:reorder="check,nama_anggota, alamat">

<t:parameter name="chechcell">
 <input t:type="checkbox" t:id="check" t:value="check">
 </t:parameter>

</table>

</form>

Untuk AddCheckBox.java :

 @Property
 private Anggota anggota;</code>

private boolean check;

private List listCheck

public List getListAnggota(){
 return getMasterFacade().getAnggotaDao().getAllAnggota();
 }

public boolean isCheck(){
 return check;
 }

public void setCheck(boolean check){
 if (check)
 getListCheck.add(anggota);
 }

public List getListCheck(){
 if (listCheck == null)
 listCheck = new ArrayList();
 return listCheck
 }

public void setListCheck(List listCheck){
 this.listCheck = listCheck;
 }

Published by

saifiahmada

Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s