membuat radio dalam radiogroup zk

Membuat komponen radio dalam radiogroup menggunakan zk framework


q> buat file cobaRadio.zul

 <window apply="org.zkoss.bind.BindComposer"
 <label value="Pilih Gender :"/>
 <radiogroup selectedItem="@bind(vm.gender)" >
 <radio label="Pria" value="pria"/>
 <radio label="Wanita" value="wanita"/>
 <separator />
 <button onClick="@command('simpan')" label="Tes" />


q> buat file

package com.ipi.zk7.mywebzk7;

import org.zkoss.bind.annotation.Command;
import org.zkoss.zul.Messagebox;

public class CobaRadioVM {

 private String gender;

public String getGender() {
 return gender;

public void setGender(String gender) {
 this.gender = gender;

 public void simpan(){"Gender = " + gender);


q> Hasil



Published by


Begin a big Process with a bit trying

Leave a Reply

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

You are commenting using your 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