Jasig/uPortal — pull request #480 by jameswennmacher (2014-12-05 20:22:03+00:00)
Title: UP-4332 Create transient tab for portlets not on user's layout

https://issues.jasig.org/browse/UP-4332

As part of a broader issue (https://issues.jasig.org/browse/UP-4041) this commit alters uPortal functionality such that focusing on a portlet that is not on the user's layout (transient portlet) will open the portlet on a transient, temporary tab to display the portlet's content. If the portlet is present on a user's layout, the portlet will be displayed in focus mode on the tab the portlet is present on, just like it currently does.

The current functionality is that the transient portlet would display on the first tab that is in the user's layout (Admin Tools tab in the case of the Admin).

# New Functionality

The new functionality is
![up-4332dynamictab](https://cloud.githubusercontent.com/assets/1479823/5321800/daed3bb4-7c7b-11e4-855e-f9dbaa5621ad.png)

Further when displaying a transient portlet
* transient tab's name is the portlet's title
* transient tab cannot be clicked on since there is no valid URL to display a folder that is not on your layout. Applies to site navigation also
* transient portlets do not receive a 'Return to desktop' link (Respondr only, didn't change Universality). To display other content you click on another navigation link (tab name, portlet title in sitemap, etc.). IMHO https://issues.jasig.org/browse/UP-3553 should be resolved before 'Return to desktop' is added in for transient portlets.

![auth user portlet not on layout](https://cloud.githubusercontent.com/assets/1479823/5321853/9b0dfd34-7c7c-11e4-8d9c-1a644df6d5ac.png)

This change does make for a slightly different Admin UI interaction since the Manage Portal launches transient portlet links. Returning from say 'Manage Portlets' would be done by clicking on the Admin Tools tab as indicated above. The following image illustrates Admin UI interaction in the adverse scenario of Admin Tools not being the admin's 1st tab (illustrates UP-3553 graphically as well).

![admin ui interaction](https://cloud.githubusercontent.com/assets/1479823/5321957/af07a352-7c7d-11e4-8d0e-a8a945513bfd.png)

## Guest User

Guest functionality is not currently impacted since guest users can only focus on portlets on their layout (UP-4041 will fix this). However by commenting out the wrapping of the layout manager with the ImmutableUserLayoutManager (line 153 in UserInstanceManagerImpl.java) for guest, you can see what guest user's will eventually see as illustrated below for a portlet not on their layout when UP-4041 is resolved.

![guest user portlet not on layout - new](https://cloud.githubusercontent.com/assets/1479823/5322030/8f324752-7c7e-11e4-9599-e9bea584e3c2.png)

## Universality

The corresponding changes were made to Universality since they were not terribly difficult or time consuming. My intent is not to make this feature (or more to the point the full UP-4041 implementation) flawless in Universality. I don't see investment in the Universality theme at this point as particularly compelling with uPortal 4.1+. Respondr is sufficiently superior that the community would need to vocally speak up to warrant the effort.

Universality had decided for a focused transient portlet to create an URL to return to the normal dashboard view (display 1st tab) for the 'Return to dashboard' link. I left it that way since it was such already defined to do that. However I don't think that is necessarily the right user interaction (e.g. doesn't work for UP-3553 use case) so I did not implement it that way for Respondr.

![auth user portlet not on layout - universality](https://cloud.githubusercontent.com/assets/1479823/5322218/ac131a5c-7c80-11e4-85b9-2e61a7afb9d8.png)