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?

有帮助吗?

解决方案

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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top