Question

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?

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top