Search in sources :

Example 1 with UIShortcutsShelfItem

use of org.alfresco.web.ui.repo.component.shelf.UIShortcutsShelfItem in project acs-community-packaging by Alfresco.

the class ShortcutsShelfItemTag method setProperties.

/**
 * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
 */
protected void setProperties(UIComponent component) {
    super.setProperties(component);
    setStringBindingProperty(component, "value", this.value);
    if (isValueReference(this.clickActionListener)) {
        MethodBinding vb = getFacesContext().getApplication().createMethodBinding(this.clickActionListener, ACTION_CLASS_ARGS);
        ((UIShortcutsShelfItem) component).setClickActionListener(vb);
    } else {
        throw new FacesException("Click Action listener method binding incorrectly specified: " + this.clickActionListener);
    }
    if (isValueReference(this.removeActionListener)) {
        MethodBinding vb = getFacesContext().getApplication().createMethodBinding(this.removeActionListener, ACTION_CLASS_ARGS);
        ((UIShortcutsShelfItem) component).setRemoveActionListener(vb);
    } else {
        throw new FacesException("Remove Action listener method binding incorrectly specified: " + this.clickActionListener);
    }
}
Also used : MethodBinding(javax.faces.el.MethodBinding) UIShortcutsShelfItem(org.alfresco.web.ui.repo.component.shelf.UIShortcutsShelfItem) FacesException(javax.faces.FacesException)

Aggregations

FacesException (javax.faces.FacesException)1 MethodBinding (javax.faces.el.MethodBinding)1 UIShortcutsShelfItem (org.alfresco.web.ui.repo.component.shelf.UIShortcutsShelfItem)1