Package org.apache.tapestry

Examples of org.apache.tapestry.ApplicationRuntimeException


            objDataModel = new SimpleListTableDataModel((Collection) objSourceValue);
        else if (objSourceValue instanceof Iterator)
            objDataModel = new SimpleListTableDataModel((Iterator) objSourceValue);

        if (objDataModel == null)
            throw new ApplicationRuntimeException(
                TableUtils.format(
                    "invalid-table-source",
                    getExtendedId(),
                    objSourceValue.getClass()));
View Full Code Here


            List arrColumnsList = (List) objColumns;
            int nColumnsNumber = arrColumnsList.size();
            for (int i = 0; i < nColumnsNumber; i++)
            {
                if (!(arrColumnsList.get(i) instanceof ITableColumn))
                    throw new ApplicationRuntimeException(
                        TableUtils.format("columns-only-please", getExtendedId()));
            }
            //objColumns = arrColumnsList.toArray(new ITableColumn[nColumnsNumber]);
            return new SimpleTableColumnModel(arrColumnsList);
        }

        if (objColumns instanceof ITableColumn[])
        {
            return new SimpleTableColumnModel((ITableColumn[]) objColumns);
        }

        if (objColumns instanceof String)
        {
            String strColumns = (String) objColumns;
            if (getColumnsBinding().isInvariant())
            {
                // if the binding is invariant, create the columns only once
                if (m_objColumnModel == null)
                    m_objColumnModel = generateTableColumnModel(strColumns);
                return m_objColumnModel;
            }

            // if the binding is not invariant, create them every time
            return generateTableColumnModel(strColumns);
        }

        throw new ApplicationRuntimeException(
            TableUtils.format("invalid-table-columns", getExtendedId(), objColumns.getClass()));
    }
View Full Code Here

            {
                result = objectClass.newInstance();
            }
            catch (Exception ex)
            {
                throw new ApplicationRuntimeException(
                    Tapestry.format("Pool.unable-to-instantiate-instance", objectClass.getName()),
                    ex);
            }
        }
View Full Code Here

            {
                result = Ognl.parseExpression(expression);
            }
            catch (Exception ex)
            {
                throw new ApplicationRuntimeException(
                    Tapestry.format("OgnlUtils.unable-to-parse-expression", expression),
                    ex);
            }

            _cache.put(expression, result);
View Full Code Here

            Ognl.setValue(expression, context, target, value);
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format(
                    "OgnlUtils.unable-to-update-expression",
                    "<parsed expression>",
                    target,
                    value),
View Full Code Here

            return Ognl.getValue(expression, context, object);
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format(
                    "OgnlUtils.unable-to-read-expression",
                    "<parsed expression>",
                    object),
                ex);
View Full Code Here

            {
                externalize(resourcePath);
            }
            catch (IOException ex)
            {
                throw new ApplicationRuntimeException(
                    Tapestry.format("AssetExternalizer.externalize-failure", resourcePath, _assetDir),
                    ex);
            }

            result = _URL + resourcePath;
View Full Code Here

        {
            bi = Introspector.getBeanInfo(beanClass);
        }
        catch (IntrospectionException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("PropertyFinder.unable-to-introspect-class", beanClass.getName()),
                ex);
        }

        PropertyDescriptor[] pd = bi.getPropertyDescriptors();
View Full Code Here

            return url.openStream();
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("PrivateAsset.resource-missing", location),
                ex);
        }
    }
View Full Code Here

            return url.openStream();
        }
        catch (Exception ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format("ContextAsset.resource-missing", getResourceLocation()),
                ex);
        }
    }
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.