当前位置: 首页>>代码示例>>Java>>正文


Java PropertyNotWritableException类代码示例

本文整理汇总了Java中javax.el.PropertyNotWritableException的典型用法代码示例。如果您正苦于以下问题:Java PropertyNotWritableException类的具体用法?Java PropertyNotWritableException怎么用?Java PropertyNotWritableException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PropertyNotWritableException类属于javax.el包,在下文中一共展示了PropertyNotWritableException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:ELResolverImpl.java

示例2: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:25,代码来源:ScopedAttributeELResolver.java

示例3: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:ImplicitObjectELResolver.java

示例4: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object value)
{
  Object items = _itemsExpression.getValue(context);

  if (items != null)
  {
    if (items instanceof CollectionModel)
    {
      // There is no support for setting row data on the collection model
      throw new PropertyNotWritableException();
    }

    context.setPropertyResolved(false);
    context.getELResolver().setValue(context, items, _key, value);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:18,代码来源:ForEachTag.java

示例5: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext eLContext, Object base, Object property, 
                     Object value)
{
  if (base == null)
  {
    throw new PropertyNotWritableException();
  }
  else
  {
    if (_isIndexed(base))
      _pr.setValue(base, _getIndex(property), value);
    else
      _pr.setValue(base, property, value);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:17,代码来源:MELResolver.java

示例6: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
	if (base == null) {
		String beanName = property.toString();
		BeanFactory bf = getBeanFactory(elContext);
		if (bf.containsBean(beanName)) {
			if (value == bf.getBean(beanName)) {
				// Setting the bean reference to the same value is alright - can simply be ignored...
				elContext.setPropertyResolved(true);
			}
			else {
				throw new PropertyNotWritableException(
						"Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
			}
		}
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:SpringBeanELResolver.java

示例7: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        getDefaultResolver().setValue(context, base, property, value);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:ELResolverImpl.java

示例8: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
		throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
	if (context == null) {
		throw new NullPointerException();
	}

	if (base == null) {
		context.setPropertyResolved(true);
		throw new PropertyNotWritableException("Legacy VariableResolver wrapped, not writable");
	}

	if (!context.isPropertyResolved()) {
		elResolver.setValue(context, base, property, value);
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:17,代码来源:ELResolverImpl.java

示例9: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
		throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
	if (context == null) {
		throw new NullPointerException();
	}

	if (base == null) {
		context.setPropertyResolved(true);
		if (property != null) {
			String key = property.toString();
			PageContext page = (PageContext) context.getContext(JspContext.class);
			int scope = page.getAttributesScope(key);
			if (scope != 0) {
				page.setAttribute(key, value, scope);
			} else {
				page.setAttribute(key, value);
			}
		}
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:22,代码来源:ScopedAttributeELResolver.java

示例10: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
	if (base == null) {
		String beanName = property.toString();

		if (beanName.equals(MESSAGESOURCE_SHORTCUT))
			beanName = "messageSource";

		BeanFactory bf = getBeanFactory(elContext);
		if (bf.containsBean(beanName)) {
			throw new PropertyNotWritableException(
					"Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
		}
	} else if (base instanceof MessageSource && property != null) {
		throw new PropertyNotWritableException(
				"MessageSource: '" + property + "' refers to a Spring bean which by definition is not writable");
	}
}
 
开发者ID:psramkumar,项目名称:grails-jsf2-plugin,代码行数:19,代码来源:GrailsELResolver.java

示例11: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:9,代码来源:ValueExpressionImpl.java

示例12: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:ValueExpressionImpl.java

示例13: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
		throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
	if (context == null) {
		throw new NullPointerException();
	}

	if (base == null && property != null) {
		int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
		if (idx >= 0) {
			context.setPropertyResolved(true);
			throw new PropertyNotWritableException();
		}
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:16,代码来源:ImplicitObjectELResolver.java

示例14: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
    if (context == null) {
        throw new NullPointerException("context is null");
    }
    if (isResolvable(base)) {
        throw new PropertyNotWritableException("resolver is read-only");
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:10,代码来源:NodeELResolver.java

示例15: setValue

import javax.el.PropertyNotWritableException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(base, property);
            throw new PropertyNotWritableException();
        }
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:16,代码来源:ImplicitObjectELResolver.java


注:本文中的javax.el.PropertyNotWritableException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。