Example usage for javax.el ValueExpression isReadOnly

List of usage examples for javax.el ValueExpression isReadOnly

Introduction

In this page you can find the example usage for javax.el ValueExpression isReadOnly.

Prototype

public abstract boolean isReadOnly(ELContext context);

Source Link

Usage

From source file:com.googlecode.jsfFlex.component.AbstractFlexUITextInputBase.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;/*from  www.  jav  a2 s . c om*/
    }

    javax.el.ValueExpression ve = getValueExpression(TEXT_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getText());
        setText(null);
    }

}

From source file:com.googlecode.jsfFlex.component.AbstractFlexUISelectedBase.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;/*from   w  w w .j a va 2s  . c  o  m*/
    }

    javax.el.ValueExpression ve = getValueExpression(SELECTED_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getSelected());
        setSelected(null);
    }

}

From source file:com.googlecode.jsfFlex.component.ext.AbstractFlexUIColorPicker.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;//www  .java2 s .c  o m
    }

    ValueExpression ve = getValueExpression(SELECTED_COLOR_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getSelectedColor());
        setSelectedColor(null);
    }

}

From source file:com.googlecode.jsfFlex.component.AbstractFlexUISelectedIndexBase.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;// ww w .ja v a 2s. c  om
    }

    javax.el.ValueExpression ve = getValueExpression(SELECTED_INDEX_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getSelectedIndex());
        setSelectedIndex(null);
    }

}

From source file:com.googlecode.jsfFlex.component.AbstractFlexUIHtmlTextInputBase.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;//from  ww  w.ja  v a  2s.  c  om
    }

    javax.el.ValueExpression ve = getValueExpression(HTML_TEXT_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getHtmlText());
        setHtmlText(null);
    }

}

From source file:com.googlecode.jsfFlex.component.ext.AbstractFlexUIDateChooser.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;//  ww  w .j ava 2 s.  c o m
    }

    javax.el.ValueExpression ve = getValueExpression(SELECTED_DATE_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getSelectedDate());
        setSelectedDate(null);
    }

}

From source file:org.nuxeo.ecm.platform.ui.web.binding.alias.AliasValueExpression.java

@Override
public boolean isReadOnly(ELContext context) {
    ValueExpression ve = resolveExpression(context);
    if (ve != null) {
        return ve.isReadOnly(context);
    }//from   w ww  .  j a  v a  2  s .c  o  m
    return true;
}

From source file:com.googlecode.jsfFlex.component.ext.AbstractFlexUIComboBox.java

@Override
public void processUpdates(FacesContext context) {
    super.processUpdates(context);

    if (!isRendered() || !isValid()) {
        return;//from w  w w  .  jav  a  2 s . co m
    }

    ValueExpression ve = getValueExpression(TEXT_ATTR);

    if (ve != null && !ve.isReadOnly(context.getELContext())) {
        ve.setValue(context.getELContext(), getText());
        setText(null);
    }

}

From source file:org.richfaces.component.UIExtendedDataTable.java

/**
 * Puts own state into component state. 
 *///from w w  w.  j a v a 2 s .  c o  m
protected void updateTableState(FacesContext context) {
    ValueExpression ve = getValueExpression("tableState");
    if ((null != ve) && (!ve.isReadOnly(context.getELContext()))) {
        ve.setValue(context.getELContext(), getState().toString());
    }
}

From source file:org.apache.empire.jsf2.utils.TagEncodingHelper.java

protected boolean hasValueExpression() {
    // Find expression
    if (hasValueExpr != null)
        return hasValueExpr.booleanValue();
    // Find expression
    ValueExpression ve = findValueExpression("value", false);
    if (ve != null) { // check
        if (log.isDebugEnabled()) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            boolean readOnly = ve.isReadOnly(ctx.getELContext());
            if (readOnly)
                log.debug(tag.getClass().getSimpleName() + " for " + getColumnName() + " expression "
                        + ve.getExpressionString() + " is readOnly!");
            else/*from   ww  w .j  a  v a 2  s . c o  m*/
                log.debug(tag.getClass().getSimpleName() + " for " + getColumnName() + " expression "
                        + ve.getExpressionString() + " is updateable!");
        }
    }
    /*
    else if (log.isDebugEnabled())
    log.debug(tag.getClass().getSimpleName()+" for "+getColumnName()+" has no value expression!");
    */
    // merken
    hasValueExpr = Boolean.valueOf(ve != null);
    return hasValueExpr.booleanValue();
}