Package javax.el

Examples of javax.el.PropertyNotWritableException


                  throws NullPointerException, PropertyNotFoundException,
                  PropertyNotWritableException, ELException
         {
            if (SeamMockELResolverTest.property.equals(property))
            {
               throw new PropertyNotWritableException();
            }
         }

      };
      resolvers[1] = new ELResolver() {

          @Override
          public Class<?> getCommonPropertyType(ELContext arg0, Object arg1)
          {
             return null;
          }

          @Override
          public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext arg0, Object arg1)
          {
             return null;
          }

          @Override
          public Class<?> getType(ELContext arg0, Object base, Object property)
                   throws NullPointerException, PropertyNotFoundException, ELException
          {
             return null;
          }

          @Override
          public Object getValue(ELContext context, Object base, Object property)
                   throws NullPointerException, PropertyNotFoundException, ELException
          {
             if (base != null && "className".equals(property))
             {
                context.setPropertyResolved(true);
                return base.getClass().getSimpleName();
             }
             return null;
          }

          @Override
          public boolean isReadOnly(ELContext arg0, Object base, Object property)
                   throws NullPointerException, PropertyNotFoundException, ELException
          {
             return true;
          }

          @Override
          public void setValue(ELContext context, Object base, Object property, Object value)
                   throws NullPointerException, PropertyNotFoundException,
                   PropertyNotWritableException, ELException
          {
             throw new PropertyNotWritableException();
          }
      };
      return resolvers;
   }
View Full Code Here


        {
            throw new PropertyNotFoundException(this.attr + ": " + pnfe.getMessage(), pnfe.getCause());
        }
        catch (PropertyNotWritableException pnwe)
        {
            throw new PropertyNotWritableException(this.attr + ": " + pnwe.getMessage(), pnwe.getCause());
        }
        catch (ELException e)
        {
            throw new ELException(this.attr + ": " + e.getMessage(), e.getCause());
        }
View Full Code Here

        String strProperty = property.toString();

        if (implicitObjects.containsKey(strProperty))
        {
            throw new PropertyNotWritableException();
        }
    }
View Full Code Here

  }

  @Override
  public void setValue(ELContext context, Object base, Object property, Object value) {
    if (base == null && TOP_LEVEL_PROPERTIES.contains(property)) {
      throw new PropertyNotWritableException();
    }
  }
View Full Code Here

  }

  @Override
  public void setValue(ELContext context, Object base, Object property, Object value) {
    if ((base == null) && PROPERTY_MSG.equals(property)) {
      throw new PropertyNotWritableException();
    }
  }
View Full Code Here

     * @see javax.el.ValueExpression#setValue(javax.el.ELContext,
     *      java.lang.Object)
     */
    public void setValue(ELContext context, Object value) {
        context.setPropertyResolved(false);
        throw new PropertyNotWritableException();
    }
View Full Code Here

        return true;
    }

    public void setValue(EvaluationContext ctx, Object value)
            throws ELException {
        throw new PropertyNotWritableException(MessageFactory.get("error.syntax.set"));
    }
View Full Code Here

                }
                return null;
            }
            @Override
            public ValueExpression setVariable(String variable, ValueExpression expression) {
                throw new PropertyNotWritableException();
            }
View Full Code Here

            return true;
        }

        @Override
        public void setValue(ELContext context, Object value) {
            throw new PropertyNotWritableException();
        }
View Full Code Here

            if (context == null) {
                throw new NullPointerException();
            }
            if (base != null && base instanceof List) {
                if (isReadOnly) {
                    throw new PropertyNotWritableException();
                }
                String str = property.toString();
                if ("add".equals(str)) {
                    if (Debug.verboseOn()) {
                        Debug.logVerbose("ExtendedListResolver.setValue adding List element: base = " + base + ", property = " + property + ", value = " + val, module);
                    }
                    context.setPropertyResolved(true);
                    List list = (List) base;
                    list.add(val);
                } else if (str.startsWith("insert@")) {
                    if (Debug.verboseOn()) {
                        Debug.logVerbose("ExtendedListResolver.setValue inserting List element: base = " + base + ", property = " + property + ", value = " + val, module);
                    }
                    context.setPropertyResolved(true);
                    String indexStr = str.replace("insert@", "");
                    int index = Integer.parseInt(indexStr);
                    List list = (List) base;
                    try {
                        list.add(index, val);
                    } catch (UnsupportedOperationException ex) {
                        throw new PropertyNotWritableException();
                    } catch (IndexOutOfBoundsException ex) {
                        throw new PropertyNotFoundException();
                    }
                } else {
                    super.setValue(context, base, property, val);
View Full Code Here

TOP

Related Classes of javax.el.PropertyNotWritableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.