Search in sources :

Example 1 with UIActions

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);
        }
    }
}
Also used : UIActionLink(org.alfresco.web.ui.common.component.UIActionLink) UIComponent(javax.faces.component.UIComponent) Writer(java.io.Writer) UIActions(org.alfresco.web.ui.repo.component.UIActions)

Aggregations

Writer (java.io.Writer)1 UIComponent (javax.faces.component.UIComponent)1 UIActionLink (org.alfresco.web.ui.common.component.UIActionLink)1 UIActions (org.alfresco.web.ui.repo.component.UIActions)1