本文整理汇总了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);
}
}
示例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);
}
}
}
}
示例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();
}
}
}
示例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);
}
}
示例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);
}
}
示例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");
}
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
}
示例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");
}
}
示例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);
}
示例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);
}
示例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();
}
}
}
示例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");
}
}
示例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();
}
}
}