• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PropertyNotWritableException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setValue

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

  if ((property != null) && resolveType(base)) {
    context.setPropertyResolved(base, property);

    if (isReadOnly(context, base, property)) {
      throw new PropertyNotWritableException();
    }

    if (val == null) {
      throw new IllegalArgumentException(String.format("property %s cannot be set to null",
          property));
    }

    try {
      final Message.Builder builder = (Message.Builder) base;
      final FieldDescriptor field = getPropertyFieldDescriptor(builder, property);
      builder.setField(field, verifyAndConvertField(val, field));
    } catch (final UnsupportedOperationException ex) {
      throw new PropertyNotWritableException();
    }
  }
}
 
开发者ID:protobufel,项目名称:protobuf-el,代码行数:29,代码来源:BuilderELResolver.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PreparedGeometryFactory类代码示例发布时间:2022-05-21
下一篇:
Java Thing类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap