Hi,
your problem is the call of
FacesContext.getCurrentInstance().renderResponse().
this skips the applicationPhase and so the old component tree is
rendered again.
During rendering an old tree the previoly submitted value takes
precedence over the bean value.
regards
Volker
Jeffrey Porter wrote:
> Hi Stefan,
>
>
>
> This is what I’m trying at the moment.
>
>
>
> This though doesn’t change the value displayed on the web page.
>
>
>
> The member variable has the new value set, but the value displayed on
> the page doesn’t change.
>
> When the method, firstnameSelected, gets called a second time I can see
> the modified value in the bean instance.
>
>
>
> I’m at a loss of why this doesn’t work.
>
>
>
> Jeff.
>
>
>
> The code I have is…
>
>
>
> CODE…
>
> FacesContext ctxt = FacesContext.getCurrentInstance();
>
>
>
> String firstName = ((String)vce.getNewValue());
>
> System.out.println("A value has changed!" + firstName);
>
>
>
> bean.setFirstname(firstName);
>
> bean.setSurname("yyyyyyyyyyy");
>
>
>
> FacesContext.getCurrentInstance().renderResponse();
>
>
>
> JSP…
>
> <body>
>
> <f:view>
>
> <t:saveState id="saveStateBean01" value="#{ncmManager}"/>
>
> <h:panelGroup id="body">
>
> <h:form>
>
>
>
> <h:inputText
>
> id="firstname"
>
> valueChangeListener="#{ncmManager.categorySelected}"
>
> value="#{ncmManager.bean.firstname}"
>
> immediate="true"
>
> onblur="submit()"
>
> />
>
>
>
> <h:inputText immediate="true" id="surname"
> value="#{ncmManager.bean.surname}" required="true" />
>
>
>
> </h:form>
>
> </h:panelGroup>
>
> </f:view>
>
> </body>
>
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.