1 Reply Latest reply on Nov 23, 2007 4:12 PM by Pete Muir

    How to set

    Tim Morgan Newbie

      Hi!
      I'm pretty new to Seam and have problem with <s:selectItems>.

      The following code

      <h:selectOneListbox size="10">
       <s:selectItems value="#{videos}" var="video"
       label="#{video.videoId} - #{video.headline}" />
       <s:convertEntity />
      </h:selectOneListbox>
      

      does this (I used braces here because the forum didn't want to display the option-tags.)

      {option value="1"}250 - Headline 1{/option}
      {option value="2"}140 - Headline 2{/option}
      {option value="3"}7 - Headline 3{/option}
      .
      .


      but I would like to have

      {option value="250"}250 - Headline 1{/option}
      {option value="140"}140 - Headline 2{/option}
      {option value="7"}7 - Headline 3{/option}
      .
      .

      so that the videoId is transported as parameter when submitting the form.

      What do I have to change to change the value attribute of the option tags to a property of the variable?

      Thanks!

      Haefti