Package org.apache.tapestry

Examples of org.apache.tapestry.ApplicationRuntimeException


        ITableModelSource objSource =
            (ITableModelSource) objCycle.getAttribute(
                ITableModelSource.TABLE_MODEL_SOURCE_ATTRIBUTE);

        if (objSource == null)
            throw new ApplicationRuntimeException(
                "The component "
                    + getId()
                    + " must be contained within an ITableModelSource component, such as TableView",
                this,
                null,
View Full Code Here


        IScript script = source.getScript(location);

        Body body = Body.get(cycle);

        if (body == null)
            throw new ApplicationRuntimeException(
                Tapestry.getMessage("ValidField.must-be-contained-by-body"),
                field,
                null,
                null);
View Full Code Here

        {
            return _patternCompiler.compile(pattern, Perl5Compiler.SINGLELINE_MASK);
        }
        catch (MalformedPatternException ex)
        {
            throw new ApplicationRuntimeException(ex);
        }
    }
View Full Code Here

        // This is all copied out of of FieldBinding!!

        int dotx = _fieldName.lastIndexOf('.');

        if (dotx < 0)
            throw new ApplicationRuntimeException(
                Tapestry.format("invalid-field-name", _fieldName));

        String className = _fieldName.substring(0, dotx);
        String 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;

        Class targetClass = null;

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

        Field field = null;

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

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

        try
        {
            _fieldValue = field.get(null);
        }
        catch (IllegalAccessException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("illegal-field-access", _fieldName),
                ex);
        }
        catch (NullPointerException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("field-is-instance", _fieldName),
                ex);
        }

        _fieldResolved = true;
View Full Code Here

        Object objSourceObj = objCycle.getAttribute(ITableRowSource.TABLE_ROW_SOURCE_ATTRIBUTE);
        ITableRowSource objSource = (ITableRowSource) objSourceObj;

        if (objSource == null)
            throw new ApplicationRuntimeException(
                "The component "
                    + getId()
                    + " must be contained within an ITableRowSource component, such as TableRows",
                this,
                null,
View Full Code Here

                    "AbstractBeanInitializer.unable-to-set-property",
                    _propertyName,
                    bean,
                    value);

            throw new ApplicationRuntimeException(message, getLocation(), ex);
        }

    }
View Full Code Here

        symbols.put("URL", link.getURL());

        Body body = Body.get(cycle);

        if (body == null)
            throw new ApplicationRuntimeException(
                Tapestry.getMessage("InspectorButton.must-be-contained-by-body"),
                this,
                null,
                null);
View Full Code Here

            {
                insert = format.format(value);
            }
            catch (Exception ex)
            {
                throw new ApplicationRuntimeException(
                    Tapestry.format("Insert.unable-to-format", value),
                    this,
                    getFormatBinding().getLocation(),
                    ex);
            }
View Full Code Here

        {
            return Class.forName(name, true, _loader);
        }
        catch (Throwable t)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("ResourceResolver.unable-to-load-class", name, _loader, t.getMessage()),
                t);
        }
    }
View Full Code Here

                IResourceResolver objResolver = objColumnSettingsContainer.getPage().getEngine().getResourceResolver();

                Object objColumn =
                    OgnlUtils.get(strColumnExpression, objResolver, objColumnSettingsContainer);
                if (!(objColumn instanceof ITableColumn))
                    throw new ApplicationRuntimeException(
                        format("not-a-column", objComponent.getExtendedId(), strColumnExpression));

                arrColumns.add(objColumn);
                continue;
            }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ApplicationRuntimeException

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.