I bet your code is running, and setting the value of text1 during the validate phase.
However during the update-model phase the h:outputText component is then overwriting the value. wang suya wrote: > Hi Simon Kitching > > I actrully wrote the program same as you wrote : > > <[EMAIL PROTECTED] contentType="text/html; charset=Shift_JIS" %> > <[EMAIL PROTECTED] uri="http://java.sun.com/jsf/core" prefix="f" %> > <[EMAIL PROTECTED] uri="http://java.sun.com/jsf/html" prefix="h" %> > <[EMAIL PROTECTED] uri="http://myfaces.apache.org/tomahawk" prefix="t" %> > > <html> > <head> > <title>jsfsample1</title> > </head> > <body bgcolor="#ffffff"> > <h1>JSF sample</h1> > <f:view> > <h:form id="form1"> > <h:outputText > id="text1" > value="Welcome to JavaServer Pagee." > binding="#{SampleJsfBean.text1}"/> > <br /> > <h:selectBooleanCheckbox > id="check1" > immediate="true" > onchange="this.form.submit();" > binding="#{SampleJsfBean.check1}" > valueChangeListener="#{SampleJsfBean.check1_valueChanged}" /> > <h:messages/> > <h:outputText > value="check"/> > </h:form> > > </f:view> > </body> > </html> > > public void check1_valueChanged(ValueChangeEvent valueChangeEvent){ > Boolean neu =(Boolean)valueChangeEvent.getNewValue(); > text1.setValue("check is " + neu.toString()); > } > } > > But it does not work when I run it. The content of text1 does not change. Do > you know > where is my wrong? Thank you very much.

