Hm, im wondering, bud i never worked with valueChangeListener, so i
don't exactly know how they worked.

Maybe you need to set the submitted value in your surname component.
It should be able to fetch the component from the event.
Something like
vce.getComponent().findComonent("surname").setSubmittedValue("yyyyyyyyyy");

regards
  Volker

Jeffrey Porter wrote:
> Hi Volker,
> 
> So you're saying I should remove the line...
> FacesContext.getCurrentInstance().renderResponse();
> 
> I've tried this, but still the new values do not get rendered.
> 
> Is there something I should replace it with?
> 
> 
> Thanks
> Jeff.
> 
> 
> 
> -----Original Message-----
> From: Volker Weber [mailto:[EMAIL PROTECTED] 
> Sent: 26 October 2005 12:46
> To: MyFaces Discussion
> Subject: Re: Help still needed with valueChangeListener
> 
> 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>
>>
>> 

-- 
-------------------------------------------------------------------------
    Volker Weber    Dietrichsweg 38a     26127 Oldenburg     Germany
    MAILTO:[EMAIL PROTECTED]   HTTP://www.weber-oldenburg.de

Reply via email to