You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Carlos Ortiz <co...@coral-technologies.com> on 2007/06/22 16:35:07 UTC

SelectedOneMenu problem

Hi,
I'm having a problem with a selectedOneMenu ,

i have

<t:selectOneMenu
     onchange="getSelectedID();"
       id="cmbSerivces"
      forceId="true"
       value="#{quarrelsBean.selectedService}"
        title="No location selected"
        required="true"                                                
                    
valueChangeListener="#{quarrelsBean.serivceItemSelected}"
   >
    <f:selectItems
      value="#{quarrelsBean.servicesItems}"/>
   </t:selectOneMenu>


so far so good, when the value changes call serivceItemSelected load the 
needed info ,
but when i try to submit the page

 <t:commandButton actionListener="#{quarrelsBean.UpdateQuoatation}" 
id="btn_Save" forceId="true" />

By Some reason does not go to UpdateQuoatation but serivceItemSelected

any ideas why ?¡

Thank you for the help.

PD

 function getSelectedID() {   

     document.getElementById("btn_Save").click();
 }
   




-- 
------------------------------------------------------------------------
Vi Veri Veniversum Vivus Vici [By the power of Truth, I, while living, 
have conquered the universe]

Re: SelectedOneMenu problem

Posted by Andrew Robinson <an...@gmail.com>.
You have a valueChangeListener specified, which will be called first.
Your action listener will only be called if there has been no errors
(including validation errors).

Check your log for any messages. Also include a <t:messages
globalOnly="false" /> to see if there were any validation errors.

On 6/22/07, Carlos Ortiz <co...@coral-technologies.com> wrote:
>
>  Hi,
>  I'm having a problem with a selectedOneMenu ,
>
>  i have
>
>  <t:selectOneMenu
>       onchange="getSelectedID();"
>         id="cmbSerivces"
>        forceId="true"
>         value="#{quarrelsBean.selectedService}"
>          title="No location selected"
>          required="true"
>
> valueChangeListener="#{quarrelsBean.serivceItemSelected}"
>     >
>      <f:selectItems
>        value="#{quarrelsBean.servicesItems}"/>
>     </t:selectOneMenu>
>
>
>  so far so good, when the value changes call serivceItemSelected load the
> needed info ,
>  but when i try to submit the page
>
>   <t:commandButton actionListener="#{quarrelsBean.UpdateQuoatation}"
> id="btn_Save" forceId="true" />
>
>  By Some reason does not go to UpdateQuoatation but serivceItemSelected
>
>  any ideas why ?¡
>
>  Thank you for the help.
>
>  PD
>
>   function getSelectedID() {
>
>       document.getElementById("btn_Save").click();
>   }
>
>
>
>
>
>
> --
>  ________________________________
> Vi Veri Veniversum Vivus Vici [By the power of Truth, I, while living, have
> conquered the universe]