Вопрос

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