menjajal komponen select tapestry5

File .tml

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">

<t:form>
 <t:label for="hp"/><t:select t:id="hp" t:model="literal:nokia,cross,sony,motorola"/>
 <t:submit t:value="Pesan"/>
 </t:form>
 <t:if test="hp">
 Item dipesan : ${hp}
 </t:if>

</html>

File .java

package com.example.tutorial.pages;

import org.apache.tapestry5.annotations.Persist;
 import org.apache.tapestry5.annotations.Property;

public class Tselect {

@Property
 @Persist
 private String hp;

void onActivate(String hp){
 hp = hp;
 }

Object onPassivate(){
 return hp;
 }

}

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