myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Andersson" <mail.mi...@gmail.com>
Subject Re: inputText not updating from valueChangedListener
Date Wed, 14 Jun 2006 13:10:52 GMT
Had this problem myself, and couldn't find a solution to it :( Especially
since I use facelets which doesn't like the valueChangeNotifier (or so I
read) ...

I assumed it was a phase problem, does the application actually get to the
apply request values phase when calling responseComplete()? But that doesn't
really explain why an outputText component gets the proper value..

I would also be interested in knowing the answer to your question.

- Micke

On 14/06/06, David Boyd <dboyd@indauto.com.au> wrote:
>
>  Hey all,
>
>
>
> I know this problem most likely would have been addressed before but was
> just wondering if there has been any solution for it?
>
>
>
> Say you had
>
>
>
> <t:selectOneMenu value="#{bean.test}"
>
>   onchange="submit();"
>
>   valueChangeListener="#{bean.changedMethod}">
>
>    <f:selectItem itemValue="a" itemLabel="a"/>
>
>    <f:selectItem itemValue="b" itemLabel="b"/>
>
> </t:selectOneMenu>
>
>
>
> <t:inputText  value="#{bean.userName}" />
>
> <t:outputText " value="#{bean.userName}" />
>
>
>
>
>
>
>
> and you have the value change method
>
>
>
>
>
> private userName;
>
> //getters and setters for userName
>
>
>
> public void changedMethod(ValueChangeEvent event)
>
>     {
>
>             userName = "someValue";
>
>             FacesContext.getCurrentInstance().renderResponse();
>
>    }
>
>
>
>
>
>
>
> Just wondering why does the outputText update but the inputText does not?
> i.e why does the outputText display "someValue" and the inputText is still
> empty?
>
>
>
> I know if you bind the inputText and call the setSubmittedValue() you can
> update the inputText
>
>
>
> Just wondering if I can get an explanation of why this problem occurs?
>
>
>
>
>

Mime
View raw message