Hi,
I've written a struts-application that shows a list of announcements taken from the database (oracle). In this list (table) I want to add the functionality of changing visibility of the announcement (via a combobox with Yes or No). This changes should be transferred to the database. Here is my sample-code piece:
<logic:iterate id="ann" name="announcements">
<tr>
<td class="list"><bean:write name="ann" format="yyyy-MM-dd" property="val(ADATE)" /></td>
<td class="list"><bean:write name="ann" property="val(TITLE)" /></td>
<td class="list"><html:select name="ann" property="visible" value="val(VISIBLE)" size="1">
<htmlption value="true">Yes</htmlption>
<htmlption value="false">No</htmlption>
</html:select></td>
<td class="list"><html:link action="/administration/announcements/annEditPreparation" paramId="id" paramName="ann" paramProperty="val(ID)"> Edit </html:link></td>
</tr>
</logic:iterate>
I've read about the onchange option of <html:select> tag but I guess this only works with java-script?
I also have another problem - the comboboxvalue that is displayed doesn't equal with the value in the database. Does anyone know why this occures?
Thx for help,
Amrûn
I've written a struts-application that shows a list of announcements taken from the database (oracle). In this list (table) I want to add the functionality of changing visibility of the announcement (via a combobox with Yes or No). This changes should be transferred to the database. Here is my sample-code piece:
<logic:iterate id="ann" name="announcements">
<tr>
<td class="list"><bean:write name="ann" format="yyyy-MM-dd" property="val(ADATE)" /></td>
<td class="list"><bean:write name="ann" property="val(TITLE)" /></td>
<td class="list"><html:select name="ann" property="visible" value="val(VISIBLE)" size="1">
<htmlption value="true">Yes</htmlption>
<htmlption value="false">No</htmlption>
</html:select></td>
<td class="list"><html:link action="/administration/announcements/annEditPreparation" paramId="id" paramName="ann" paramProperty="val(ID)"> Edit </html:link></td>
</tr>
</logic:iterate>
I've read about the onchange option of <html:select> tag but I guess this only works with java-script?
I also have another problem - the comboboxvalue that is displayed doesn't equal with the value in the database. Does anyone know why this occures?
Thx for help,
Amrûn