Examples of BindingException


Examples of org.apache.tapestry.BindingException

            if (!Ognl.isSimpleNavigationChain(_parsedExpression, getOgnlContext()))
                return;
        }
        catch (OgnlException ex)
        {
            throw new BindingException(
                Tapestry.format(
                    "ExpressionBinding.unable-to-resolve-expression",
                    _expression,
                    _root),
                this,
View Full Code Here

Examples of org.apache.tapestry.BindingException

        {
            Ognl.setValue(_parsedExpression, getOgnlContext(), _root, value);
        }
        catch (OgnlException ex)
        {
            throw new BindingException(
                Tapestry.format(
                    "ExpressionBinding.unable-to-update-expression",
                    _expression,
                    _root,
                    value),
View Full Code Here

Examples of org.apache.tapestry.BindingException

        String message =
            Tapestry.format(
                key,
                new Object[] { parameterName, result, resultClass.getName(), type.getName()});

        throw new BindingException(message, this);
    }
View Full Code Here

Examples of org.apache.tapestry.BindingException

    /** @since 3.0 **/

    protected BindingException createReadOnlyBindingException(IBinding binding)
    {
        return new BindingException(
            Tapestry.getMessage("AbstractBinding.read-only-binding"),
            binding);
    }
View Full Code Here

Examples of org.apache.tapestry.BindingException

        Field field;

        dotx = fieldName.lastIndexOf('.');

        if (dotx < 0)
            throw new BindingException(Tapestry.format("invalid-field-name", fieldName), this);

        // Hm. Should validate that there's a dot!

        className = fieldName.substring(0, dotx);
        simpleFieldName = fieldName.substring(dotx + 1);

        // Simple class names are assumed to be in the java.lang package.

        if (className.indexOf('.') < 0)
            className = "java.lang." + className;

        try
        {
            targetClass = resolver.findClass(className);
        }
        catch (Throwable t)
        {
            throw new BindingException(Tapestry.format("unable-to-resolve-class", className), this, t);
        }

        try
        {
            field = targetClass.getField(simpleFieldName);
        }
        catch (NoSuchFieldException ex)
        {
            throw new BindingException(Tapestry.format("field-not-defined", fieldName), this, ex);
        }

        // Get the value of the field.  null means look for it as a static
        // variable.

        try
        {
            value = field.get(null);
        }
        catch (IllegalAccessException ex)
        {
            throw new BindingException(Tapestry.format("illegal-field-acccess", fieldName), this, ex);
        }
        catch (NullPointerException ex)
        {
            throw new BindingException(Tapestry.format("field-is-instance", fieldName), this, ex);
        }

        // Don't look for it again, even if the value is itself null.

        accessed = true;
View Full Code Here

Examples of org.apache.tapestry.BindingException

        return true;
    }

    public int getInt()
    {
        throw new BindingException(
            Tapestry.format("ListenerBinding.invalid-access", "getInt()"),
            this);
    }
View Full Code Here

Examples of org.apache.tapestry.BindingException

            this);
    }

    public double getDouble()
    {
        throw new BindingException(
            Tapestry.format("ListenerBinding.invalid-access", "getDouble()"),
            this);

    }
View Full Code Here

Examples of org.apache.tapestry.BindingException

            if (displayName == null)
            {
                String msg = Tapestry.format("FieldLabel.no-display-name", field.getExtendedId());

                throw new BindingException(msg, this, null, getBinding("field"), null);
            }
        }

        IForm form = Form.get(cycle);
View Full Code Here

Examples of org.codehaus.preon.el.BindingException

    public void testResolution2ndAttempt() {
        Object runtimeContext = new Object();
        Object result = new Object();
        expect(reference1.getReferenceContext()).andReturn(context);
        expect(reference2.getReferenceContext()).andReturn(context);
        expect(reference1.resolve(runtimeContext)).andThrow(new BindingException("Not found."));
        expect(reference2.resolve(runtimeContext)).andReturn(result);
        expect(reference1.getType()).andReturn(String.class);
        expect(reference2.getType()).andReturn(String.class);
        replay(reference1, reference2);
        MultiReference multi = new MultiReference(reference1, reference2);
View Full Code Here

Examples of org.eclipse.core.databinding.BindingException

  public Object remove(int index) {
    getterCalled();
    int size = doGetSize();
    if (index < 0 || index > size - 1)
      throw new BindingException(
          "Request to remove an element out of the collection bounds"); //$NON-NLS-1$

    String[] newItems = new String[size - 1];
    String oldElement = getItem(index);
    if (newItems.length > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.