1 Reply Latest reply on Sep 26, 2007 8:49 AM by Pete Muir

    getting the selectedItem via JavaScript

    Ricardo Memoria Novice

      Hi all,

      I have a page with a s:selectItems tag feeding a h:selectOneMenu like that:

      <h:selectOneMenu id="source" value="#{userSelection.source}" required="true">
       <s:selectItems value="#{sources.resultList}" var="c" label="#{c.name}" noSelectionLabel="-" value="#{c.id}" />

      I have to take the ID of the selected item via JavaScript, but the value of the selectedItem is not the ID, but a meaningless number for me.

      Does anybody know how can I do that?

      Ricardo Memória