phil-rice/SoftwareFm — Issue #11: Right click on collection doesn't work when collection doesn't exist
Author: phil-rice
Created: 2011-12-13 15:34:09+00:00
State: open

Version 1.2.0
Steps to reproduce:
* Click on an item with an attached artifact
* Find a collection that has zero items
* right click on the collection and 'view'
Observe that the left panel is a list (with nothing in it)
* Right click on the table
Observe that no menu appears

This is because the ViewCardsMenuHandler.optionallyCreate method, cannot tell that the displayed card is a collection (and in fact it isn't because the sling:resourceType isn't set).

I am not sure how to deal with this.
* A bodge would check if there was a xxx.properties (where xxx is the last segment of the url) if the cardtype is null. This is not ideal as it might pollute some part of the upper data structure).
* A related idea would be a property collection: xxx.allowAddingWhenEmpty=true