mencoba komponen radiogroup tapestry5

File .tml

<html xmlns:t="">

<t:form t:id="form">
 Barang yang dipesan
 <t:label for="rokok"/>:<br/>
 <t:radiogroup t:id="rokok">
 <t:radio t:id="gudang"/><t:label for="gudang"/>
 <t:radio t:id="dyarum"/><t:label for="dyarum"/>
 <t:radio t:id="djizamzoe"/><t:label for="djizamzoe"/>

<t:label for="shampoo"/>:<br/>
 <t:radiogroup t:id="shampoo">
 <t:radio t:id="clear"/><t:label for="clear"/>
 <t:radio t:id="pantene"/><t:label for="pantene"/>
 <t:radio t:id="sunsilk"/><t:label for="sunsilk"/>

<t:submit t:id="submit" t:value="Pesan"/>

<t:if test="item">


File .java

package com.example.tutorial.pages;

import org.apache.tapestry5.annotations.Persist;

import com.example.tutorial.entities.Rokok;

public class Tradiogroup {

 private String item;

private Rokok rokok;

private String shampoo;

Object onSelectedFromSubmit(){
 String items = "Shampoo : " + getShampoo() +", Rokok : "+getRokok();
 return this;

public String getClear(){return "Clear"; }

public String getPantene() { return "Pantene"; }

public String getSunsilk() { return "Sunsilk"; }

public Rokok getGudang(){
 return rokok.GUDANG;

public Rokok getDyarum(){
 return rokok.DYARUM;

public Rokok getDjizamzoe(){
 return rokok.DJIZAMZOE;

public Rokok getRokok() {
 return rokok;

public void setRokok(Rokok rokok) {
 this.rokok = rokok;

public String getShampoo() {
 return shampoo;

public void setShampoo(String shampoo) {
 this.shampoo = shampoo;

public String getItem() {
 return item;

public void setItem(String item) {
 this.item = item;



 package com.example.tutorial.entities;

public enum Rokok {

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