portletEntity = entityAccessor.generateEntityFromFragment(fragment, principal);
entityAccessor.storePortletEntity(portletEntity);
}
catch (PortletEntityNotGeneratedException e)
{
throw new FailedToCreateWindowException("Error generating new PortletEntity: "+e.toString(), e);
}
catch (PortletEntityNotStoredException e)
{
throw new FailedToCreateWindowException("Error storing new PortletEntity: "+e.toString(), e);
}
if(portletEntity == null)
{
throw new FailedToCreateWindowException("Unable to generate portlet entity.");
}
}
((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);