applicationimpl.java

来自「RESIN 3.2 最新源码」· Java 代码 · 共 1,774 行 · 第 1/4 页

JAVA
1,774
字号
	throw new javax.faces.el.PropertyNotFoundException();      try {	FacesContext context = FacesContext.getCurrentInstance();	return _elResolver.getType(context.getELContext(), base, property);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }    public Object getValue(Object base, int index)      throws javax.faces.el.PropertyNotFoundException    {      if (base == null)	throw new javax.faces.el.PropertyNotFoundException(	  "getValue() has null base object");      try {	FacesContext context = FacesContext.getCurrentInstance();	return _elResolver.getValue(context.getELContext(), base, index);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }    public Object getValue(Object base, Object property)      throws javax.faces.el.PropertyNotFoundException    {      try {	FacesContext context = FacesContext.getCurrentInstance();	return _elResolver.getValue(context.getELContext(), base, property);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }    public boolean isReadOnly(Object base, int index)      throws javax.faces.el.PropertyNotFoundException    {      try {	FacesContext context = FacesContext.getCurrentInstance();	return _elResolver.isReadOnly(context.getELContext(), base, index);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }    public boolean isReadOnly(Object base, Object property)      throws javax.faces.el.PropertyNotFoundException    {      try {	FacesContext context = FacesContext.getCurrentInstance();	return _elResolver.isReadOnly(context.getELContext(), base, property);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }    public void setValue(Object base, int index, Object value)      throws javax.faces.el.PropertyNotFoundException    {      if (base == null)	throw new javax.faces.el.PropertyNotFoundException();      try {	FacesContext context = FacesContext.getCurrentInstance();	_elResolver.setValue(context.getELContext(), base, index, value);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }      catch (javax.el.PropertyNotWritableException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }    public void setValue(Object base, Object property, Object value)      throws javax.faces.el.PropertyNotFoundException    {      try {	FacesContext context = FacesContext.getCurrentInstance();	_elResolver.setValue(context.getELContext(), base, property, value);      }      catch (javax.el.PropertyNotFoundException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }      catch (javax.el.PropertyNotWritableException e) {	throw new javax.faces.el.PropertyNotFoundException(e);      }    }  }  static class VariableResolverAdapter    extends VariableResolver  {    private ELResolver _elResolver;    VariableResolverAdapter(ELResolver elResolver)    {      _elResolver = elResolver;    }    public Object resolveVariable(FacesContext context, String value)    {      return _elResolver.getValue(context.getELContext(), null, value);    }  }  class VariableResolverChainWrapper    extends ELResolver {    VariableResolverChainWrapper()    {    }    public Class<?> getCommonPropertyType(ELContext context, Object base)    {      if (base == null)        return String.class;      else        return null;    }    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,                                                             Object base)    {      return null;    }    public Class<?> getType(ELContext context, Object base, Object property)    {      if (base == null && property == null)        throw new PropertyNotFoundException();       return null;    }    public Object getValue(ELContext context, Object base, Object property)      throws PropertyNotFoundException, ELException    {      if (base != null)        return null;      if (property == null && base == null)        throw new PropertyNotFoundException();      context.setPropertyResolved(true);      FacesContext facesContext = FacesContext.getCurrentInstance();      try {        return _legacyVariableResolver.resolveVariable(facesContext,                                                       (String) property);      }      catch (EvaluationException e) {        context.setPropertyResolved(false);        throw new ELException(e);      } catch (RuntimeException e) {        context.setPropertyResolved(false);        throw e;      } catch (Exception e){        context.setPropertyResolved(false);        throw new ELException(e);      }          }    public boolean isReadOnly(ELContext context, Object base, Object property)      throws PropertyNotFoundException, ELException    {      if (base == null && property == null)        throw new PropertyNotFoundException();            return false;    }    public void setValue(ELContext context,                         Object base,                         Object property,                         Object value)      throws      PropertyNotFoundException, PropertyNotWritableException, ELException    {      if (base == null && property == null)        throw new PropertyNotFoundException();    }  }    class PropertyResolverChainWrapper    extends ELResolver  {    PropertyResolverChainWrapper()    {    }    public Class<?> getCommonPropertyType(ELContext context, Object base)    {      if (base == null)	return null;      return Object.class;    }    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,							     Object base)    {      return null;    }    public Class<?> getType(ELContext context, Object base, Object property)    {      if (base == null || property == null)	return null;      try {	if (base.getClass().isArray() || base instanceof List)	  return _legacyPropertyResolver.getType(base, ((Long) property).intValue());	else	  return _legacyPropertyResolver.getType(base, property);      }      catch (PropertyNotFoundException e) {	context.setPropertyResolved(false);	throw e;      }      catch (EvaluationException e) {	context.setPropertyResolved(false);	throw e;      }      catch (RuntimeException e) {	context.setPropertyResolved(false);	throw e;      }    }    public Object getValue(ELContext context, Object base, Object property)      throws PropertyNotFoundException, ELException    {      if (base == null || property == null)	return null;      context.setPropertyResolved(true);      try {	if (base.getClass().isArray() || base instanceof List)	  return _legacyPropertyResolver.getValue(base, ((Long) property).intValue());	else	  return _legacyPropertyResolver.getValue(base, property);      }      catch (PropertyNotFoundException e) {	context.setPropertyResolved(false);	throw e;      }      catch (EvaluationException e) {	context.setPropertyResolved(false);	throw e;      }      catch (RuntimeException e) {	context.setPropertyResolved(false);	throw e;      }    }    public boolean isReadOnly(ELContext context, Object base, Object property)      throws PropertyNotFoundException, ELException    {      if (base == null || property == null)	return true;            try {	if (base.getClass().isArray() || base instanceof List)	  return _legacyPropertyResolver.isReadOnly(base, ((Long) property).intValue());	else	  return _legacyPropertyResolver.isReadOnly(base, property);      }      catch (PropertyNotFoundException e) {	context.setPropertyResolved(false);	throw e;      }      catch (EvaluationException e) {	context.setPropertyResolved(false);	throw e;      }      catch (RuntimeException e) {	context.setPropertyResolved(false);	throw e;      }    }    public void setValue(ELContext context,			 Object base,			 Object property,			 Object value)      throws      PropertyNotFoundException, PropertyNotWritableException, ELException    {      if (base == null || property == null)	return;      try {	if (base.getClass().isArray() || base instanceof List)	  _legacyPropertyResolver.setValue(base, ((Long) property).intValue(), value);	else	  _legacyPropertyResolver.setValue(base, property, value);      }      catch (PropertyNotFoundException e) {	context.setPropertyResolved(false);	throw e;      }      catch (EvaluationException e) {	context.setPropertyResolved(false);	throw e;      }      catch (RuntimeException e) {	context.setPropertyResolved(false);	throw e;      }    }  }  static class DummyPropertyResolver    extends PropertyResolver  {    public Object getValue(Object base, Object property)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);            return null;    }    public Object getValue(Object base, int index)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);      return null;    }    public void setValue(Object base, Object property, Object value)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);    }    public void setValue(Object base, int index, Object value)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);    }    public boolean isReadOnly(Object base, Object property)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);      return false;    }    public boolean isReadOnly(Object base, int index)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);      return false;    }    public Class getType(Object base, Object property)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);      return null;    }    public Class getType(Object base, int index)      throws EvaluationException, javax.faces.el.PropertyNotFoundException    {      FacesContext context = FacesContext.getCurrentInstance();      context.getELContext().setPropertyResolved(false);            return null;    }  }  static class DummyVariableResolver extends VariableResolver {    public Object resolveVariable(FacesContext context, String name)      throws EvaluationException    {      context.getELContext().setPropertyResolved(false);      return null;    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?