[ROO-709] "Add"-Button should not be supressed, when list is empty Created: 16/Mar/10  Updated: 04/May/17  Resolved: 04/May/17

Status: Closed
Project: Spring Roo
Component/s: WEB MVC
Affects Version/s: 1.1.0.M1
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Stefan Ocke Assignee: Juan Carlos García del Canto
Resolution: Invalid Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Rev 695

Currently, the "Add"-Button is rendered in table.tagx. In list.tagx, there is:

        <c:choose>
                <c:when test="${not empty items}">
        		<jsp:doBody />  <!-- here comes the table.tagx -->
        	</c:when>
        	<c:otherwise>
        		<spring:message arguments="${label}" code="entity.not.found.single"/>
        	</c:otherwise>
        </c:choose>       	

In result, the "Add"-Button is not rendered, when the list is empty, which is kind of user-unfriendly...

Proposal: Move the check for empty list into list.tagx and always render the add button.



 Comments   
Comment by Stefan Schmidt [ 17/Mar/10 ]

Remarking this as 'Feature Improvement' rather than bug.

I am happy to include a button for the creation of a new entity there but I remember there was a Jira ticket (or a forum discussion) where we have considered to return a 404 status code from the controller if a resource with a given ID could not be found.

This would me more in line with the REST pattern, but it would reduce the functionality of the view presented since the presented Roo view would change to 'Requested resource not found'.

Comment by Juan Carlos García del Canto [ 04/May/17 ]

Spring Roo 2.0 uses HTML5 pages instead of JSP and TAGX

Generated at Fri Jul 10 07:16:19 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.