if (!Portal.isActivePortlet(portletName)) continue;
/*
* On récupère le bean associé au portlet
*/
PortletHolder portletHolder = Portal.getPortlet(request, portletName);
GenericPortlet portlet = portletHolder.getPortlet();
/*
* DOGET
*/
String portletId = TpPortletURL.getPortletId(portletHolder);
TpPortletContext TpPortletContext = (TpPortletContext) portlet.getPortletContext();
TpRenderRequest TPrequest = new TpRenderRequest(portletHolder, request, TpPortletContext);
TpRenderResponse TPresponse = new TpRenderResponse(response, portletId);
/*
* On positionne le bean portlet dans la requête pour pouvoir y accéder depuis les taglibs
*/
TPrequest.setAttribute(Constant.session_portlet_bean,portletHolder);
portletHolder.setRenderRequest(TPrequest);
portletHolder.setRenderResponse(TPresponse);
portletHolder.setPortletConfig(portlet.getPortletConfig());
try {
/*
* On effectue les taches d'ACTION
*/
StringBuffer sb = new StringBuffer(portletId).append("_").append("action");
String action = request.getParameter(sb.toString());
if ("action".equalsIgnoreCase(action)) {
Portal.doAction(request, response, portletHolder, portlet);
} else if ("render".equalsIgnoreCase(action)) {
Portal.doRender(request, response, portletHolder, portlet);
} else {
Portal.setWindowState(request, portletHolder);
Portal.setPortletMode(request, portletHolder);
}
/*
* de RENDU
*/
Portal.doRender(request, response, portletHolder, portlet);
/*
*
*/
try {
Portal.doRefresh(request, response, portletHolder, portlet);
} catch (PortletException e) {
log(e.getMessage());
portletHolder.setTitle("Erreur sur le portlet");
portletHolder.setContent("/!\\ Erreur !!" + e.getMessage());
}
/*
* Enfin, on place le portletHolder dans la map des portlets
* disponible
*/
portletsMap.put(portletName, portletHolder);
} catch (UnavailableException ue) {
portlet.destroy();
Portal.addDisabledPortlet(portletName);
} catch (PortletException e) {
log(e.getMessage());
portletHolder.setTitle("Erreur sur le portlet");
portletHolder.setContent("/!\\ Erreur !!" + e.getMessage());
}
}
/*
* On fait le rendu du portail