* if the portlet mode is not allowed for some reason
* (configuration, permissions etc.)
*/
public void setPortletMode(UI uI, PortletMode portletMode)
throws IllegalStateException, PortletModeException {
PortletResponse response = getCurrentResponse();
if (response instanceof MimeResponse) {
PortletURL url = ((MimeResponse) response).createRenderURL();
url.setPortletMode(portletMode);
throw new RuntimeException("UI.open has not yet been implemented");
// UI.open(new ExternalResource(url.toString()));