use of org.alfresco.web.ui.repo.component.UIActions in project acs-community-packaging by Alfresco.
the class ActionLinkRenderer method encodeEnd.
/**
* @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
*/
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
// always check for this flag - as per the spec
if (!component.isRendered()) {
return;
}
UIActionLink link = (UIActionLink) component;
// on the page so don't bother rendering anything
if (link.getValue() != null) {
Writer out = context.getResponseWriter();
UIComponent verticalContiner = getVerticalContainer(link);
if (verticalContiner != null) {
int padding = link.getPadding();
if (verticalContiner instanceof UIActions) {
padding = ((UIActions) verticalContiner).getVerticalSpacing();
}
// render as menu item style action link
renderMenuAction(context, out, link, padding);
} else {
// render as action link
renderActionLink(context, out, link);
}
}
}
Aggregations