Ejercicio Struts 2 – utilizando una combo desplegable

Por 9.99€ al mes tendrás acceso completo a todos los cursos. Sin matrícula ni permanencia.

Rehacer el ejercicio del hospital utilizando Struts 2.

<s:select headerValue="Elija una opción" headerKey="-1" list="pacientes" multiple="false" listValue="%{nombre}" listKey="%{id}" name="paciente.id">
</s:select>

Notas;

  • Para que se vea el headerValue debe haberse definido un headerKey.
  • Para poner cuadros de texto en horizontal:
    <tr><td>Fecha de alta: </td> <td><s:textfield size="2" maxlength="2" name="dia" theme="simple" />- <s:textfield name="mes" size="2" maxlength="4" theme="simple"/>- <s:textfield size="4" maxlength="4" name="anio" theme="simple"/> </td></tr>
  • Para mostrar una fecha podemos usar la etiqueta:
    <s:date name="fecha" format="dd/MM/yyyy" />

Por 9.99€ al mes tendrás acceso completo a todos los cursos. Sin matrícula ni permanencia.