Have you included the <h:form> tags around your code?

Bruno

On 6/13/06, Johnny Gonzalez <[EMAIL PROTECTED]> wrote:
Hello everybody,

I have a JSP wich has a selectOneMenu, with this code:

<h:selectOneMenu id="discountsLst"
value="#{myBean.discount}" styleClass="atexto12"
valueChangeListener="#{myBean.selectTypeDesc}"
onchange="submit();">
                                                                                   
                     <f:selectItems
value="#{myBean.itemsDisc}"/>
                                                                                      
          </h:selectOneMenu>

In the code of the method selectTypeDesc I have a
sentece that depending on the discount selected,
retrieves its numeric value and calls the setter for
the inputText, in order to set the new value to show
on it, so I'm using this:


setSelectedDiscountValue(""+discountType.getNumericValue());


The idea with the method (selectTypeDesc) in the
valueChangeListener attribute is to change what is
displayed in a InputText component that lies in front
of the selectOneMenu. The InputText is non editable

After the user makes a selection in the selectOneMenu,
the pages gets refreshed, but the new value doesn't
get printed in the InputText, what could the problem
be?


The bean is in request,  I also tried in sesion, but
the behaviour is the same. I also tried with an
immediate="true", but no change.

I also tried to set the value putting the value in the
request with: request.setAttribute("value",
"NumericValue");

then in the JSP:

<h:inputText id="tipoDesc"
value="#{requestScope.value}"                           rendered="true"
styleClass="abox2"  size="5" maxlength="5"
readonly="true"/>


Still I haven't see any change, what I'm doing wrong?

Thanks a lot,

Johnny

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.yahoo.es

Reply via email to