guys, i'm so stress with "if" komponent. how to use it
here's my code
.tml
===========================================
<t:select t:id="chartType" onchange="this.form.submit()"/>
<t:if test="dailyChart">
AAA
</t:if>
<t:if test="monthlyChart">
BBB
</t:if>
<t:if test="yearlyChart">
CCC
</t:if>
=============================================
.java
=============================================
@Persist
private ChartType chartType;
public ChartType getChartType() {
return chartType;
}
@Property
private String dailyChart, monthlyChart, yearlyChart;
Object onSuccessFromChartForm(){
if(chartType==ChartType.DAILY){
dailyChart = "D";
monthlyChart = null;
yearlyChart = null;
}else if (chartType==ChartType.MONTHLY) {
dailyChart = null;
monthlyChart = "M";
yearlyChart = null;
}else if (chartType==chartType.YEARLY) {
dailyChart = null;
monthlyChart = null;
yearlyChart = "Y";
}
if we look the code above, it should work but it doesn't
when i choose "Daily" on select menu that means dailyChart property will
become "D" and it should render this block and output "AAA"
<t:if test="dailyChart">
AAA
</t:if>
is there something wrong wih my code or my perception of if component in
tapestry 5
thnx u
dwi ardi irawan - 'penyihirkecil'
http://www.dwiardiirawan.com <http://dwiardiirawan.blogspot.com/>