1 5 package org.exoplatform.portal.faces.renderer; 6 7 import java.util.Map ; 8 import javax.faces.component.UIComponent; 9 import javax.faces.context.FacesContext; 10 import org.exoplatform.container.SessionContainer; 11 import org.exoplatform.faces.core.event.ExoActionEvent; 12 import org.exoplatform.faces.core.renderer.html.HtmlBasicRenderer; 13 import org.exoplatform.portal.faces.component.UIBasicComponent; 14 import org.exoplatform.portal.session.RequestInfo; 15 20 abstract public class BaseRenderer extends HtmlBasicRenderer { 21 22 public void decode(FacesContext context, UIComponent uiComponent) { 23 RequestInfo rinfo = (RequestInfo) SessionContainer.getComponent(RequestInfo.class); 24 String portalAction = rinfo.getPortalAction(); 25 if(portalAction != null) { 26 UIBasicComponent basicComponent = (UIBasicComponent) uiComponent ; 27 Map paramMap = context.getExternalContext().getRequestParameterMap() ; 28 basicComponent.broadcast(new ExoActionEvent(uiComponent, portalAction, paramMap)) ; 29 } else { 30 decodeComponentAction(context, uiComponent) ; 31 } 32 } 33 34 protected void decodeComponentAction(FacesContext context, UIComponent uiComponent) { 35 } 36 37 } | Popular Tags |