1 Reply Latest reply on Jan 8, 2010 2:44 PM by Nick Belaevski

    referencing other component values in EL expression

    v c Newbie

      hihi all,


      is there a way to reference other component values in an EL expression?


      for example i have a select html component and a command button.  when the user clicks on the command button i would like to pass in the value of the selected option from the select component to the function triggered by the command button.


      something like the following:

      <h:selectOneMenu id="languageField"  >
         <f:selectItem itemLabel="English" itemValue="eng" />
         <f:selectItem itemLabel="Spanish" itemValue="spa" />
      <a4j:commandButton action="#{myBean.myFunction( languageField.value )}"/ >


      i've tried many things so far but just can't seem to get it working... is this possible?


      basically i want to have the function triggered as if it were like this:  #{ myBean.myFunction( 'eng' ) }


      it's kind of like mixing javascript into EL...