Women in Technology

Hear us Roar



Article:
  JSP 2.0: The New Deal, Part 1
Subject:   Correction
Date:   2003-11-06 08:55:22
From:   niallm
Nice article. One quick correction...


<select name="artist">
<option value="1" ${param.artist == 1 ? 'checked' : ''}>
Vesica Pisces
<option value="2" ${param.artist == 2 ? 'checked' : ''}>
Cortical Control
<option value="3" ${param.artist == 3 ? 'checked' : ''}>
Vida Vierra
</select>


should be



<select name="artist">
<option value="1" ${param.artist == 1 ? 'selected' : ''}>
Vesica Pisces
<option value="2" ${param.artist == 2 ? 'selected' : ''}>
Cortical Control
<option value="3" ${param.artist == 3 ? 'selected' : ''}>
Vida Vierra
</select>
Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • Correction
    2007-09-10 23:22:38  jspform [View]

    What if the value for the option tag is comming dinamically from ArrayList e.g

    <select name="functionalArea">
    <c:forEach var="fa" ="${jpBean.functionalAreas}">
    <option value="${fa.functionalAreaId}">
    <c:out value="${fa.functionalAreaName}"/>
    </option>
    </c:forEach>
    </select>
  • Correction
    2003-11-10 08:48:04  Hans Bergsten | O'Reilly Author [View]

    Oops, you're right. I'll try to get it corrected in the article as well.
    • Chris Adamson photo Correction
      2003-11-10 11:11:01  Chris Adamson | O'Reilly AuthorO'Reilly Blogger [View]

      The article has been corrected, per this thread and author's OK.

      --Chris (editor)
      • Correction (almost there)
        2003-12-10 12:50:42  anonymous2 [View]

        The text below the code still references it as 'checked'