Contoh AddCheckBox.tml
[sourcecode language="xml"]
<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>
[/sourcecode]
Untuk AddCheckBox.java :
[sourcecode language="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;
}
[/sourcecode]
No comments:
Post a Comment