webtier@glassfish.java.net

ActionEvent triggered from CommandButton not updating GUI

From: <webtier_at_javadesktop.org>
Date: Thu, 10 Jun 2010 17:13:03 PDT

Hi,

I’ve a commandbutton an actionListener as show, and had hoped that pressing this button would display updated values for the outputText component

 <h:commandButton actionListener="#{dashBoardBean.displayLastWeek}" value="Last Week" styleClass="logbt" />
 
<h:outputText value="#{dashBoardBean.chartType}" />


Associated methods from DashBoardBean

import javax.faces.event.ActionEvent;
 
 private String chartType = "thisWeek";
 
    /**
     * @return the chartType
     */
    public String getChartType() {
        return chartType;
    }
 
    /**
     * @param chartType the chartType to set
     */
    public void setChartType(String chartType) {
        this.chartType = chartType;
    }
 
    public void displayLastWeek(ActionEvent ae) {
        chartType = "lastWeek";
    }



However the output is not being updates and pressing the button has no effect..... Hopefully someone can point out what I am doing wrong

Thanks....
[Message sent by forum member 'patnevin']

http://forums.java.net/jive/thread.jspa?messageID=473829