[ 
https://issues.apache.org/jira/browse/WICKET-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654192#action_12654192
 ] 

Juergen Donnerstag commented on WICKET-1937:
--------------------------------------------

Enclosue is a rather generic component which avoids that you need to create a 
large number of tiny, but different, components. That doesn't seem to be true 
in your case. You describe it as something you need more often. Hence creating 
a new panel component which serves your purpose is the way to go, rather than 
enhancing enclosure with something that is only useful for lists.

> Enclosure with fallback section
> -------------------------------
>
>                 Key: WICKET-1937
>                 URL: https://issues.apache.org/jira/browse/WICKET-1937
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>            Reporter: Peter Parson
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> Enclosures would be even more useful, if a "fallback section" could be 
> defined which is displayed only when the enclosure is not displayed.
> This way, an explanatory message like "No items in this list" or similar 
> could be displayed quite easily.
> e.g.
> <wicket:enclosure child="someList">
> <div wicket:id="someList">
> <!--  ... markup of element someList (which sets its own visibility to false 
> if empty)  ... -->
> </div>
> <wicket:fallback>
> Sorry - nothing to display here. <!-- this message would only appear if the 
> list is empty -->
> </wicket:fallback>
> </wicket:enclosure>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to