Skip to main content

JSF2.0 - ActionEvent triggered from CommandButton not updating GUI

1 reply [Last post]
patnevin
Offline
Joined: 2009-11-13
Points: 0

Hi,

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

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 was edited by: patnevin

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nash_era
Offline
Joined: 2010-05-10
Points: 0

Hi,

is your h:commandButton surrounded by h:form tag?

if not, then do so,and respond back