MutablePortletApplication pa = registry.getPortletApplication(paName);
if (null != pa)
{
request.setAttribute(VIEW_PA, new PortletApplicationBean(pa));
String pdefName = (String) request.getPortletSession().getAttribute(PortletApplicationResources.REQUEST_SELECT_PORTLET, PortletSession.APPLICATION_SCOPE);
PortletDefinitionComposite pdef = (PortletDefinitionComposite) pa.getPortletDefinitionByName(pdefName);
request.setAttribute(VIEW_PD, pdef);