Pregunta

I use display tag for displaying data in table form. We want to add new editable row for adding new records in the table. If the table is having one or more records, I am able to add an editable row at the end of the table and save.

How to add a new editable row in case the table is not having any records?

¿Fue útil?

Solución

You may try this:

<s:if test="%{list.size == 0}">
// create an HTML table with an <input> in a column to add records
</s:if>
<s:else>
// your display table with decorator to add new records
</s:else>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top