Monday, February 4, 2013

Type-Casting UIComponent to get properties of it in backing bean

Set disable=true for  UIComponent in backing bean

       {


        RichShowDetailItem component =
            (RichShowDetailItem)JSFUtils.findComponentInRoot("showDetailTab");

        if (displayTab) {
            component.setDisabled(Boolean.FALSE);
        } else {
            component.setDisabled(Boolean.TRUE);

        }
        AdfFacesContext.getCurrentInstance().addPartialTarget(component);

No comments: