Package org.apache.tapestry.parse

Examples of org.apache.tapestry.parse.SpecificationParser


        return parser.parseComponentSpecification(location);
    }

    protected IComponentSpecification parsePage(String simpleName) throws Exception
    {
        SpecificationParser parser = new SpecificationParser(_resolver);

        parser.setBindingSource(newBindingSource());

        Resource location = getSpecificationResourceLocation(simpleName);

        return parser.parsePageSpecification(location);
    }
View Full Code Here


        return parser.parsePageSpecification(location);
    }

    protected IApplicationSpecification parseApp(String simpleName) throws Exception
    {
        SpecificationParser parser = new SpecificationParser(_resolver);

        parser.setValueConverter(createValueConverter());

        Resource location = getSpecificationResourceLocation(simpleName);

        return parser.parseApplicationSpecification(location);
    }
View Full Code Here

        return classResource.getRelativeResource(simpleName);
    }

    protected ILibrarySpecification parseLib(String simpleName) throws Exception
    {
        SpecificationParser parser = new SpecificationParser(_resolver);

        parser.setValueConverter(createValueConverter());

        Resource location = getSpecificationResourceLocation(simpleName);

        return parser.parseLibrarySpecification(location);
    }
View Full Code Here

    public void testListenerBinding() throws Exception
    {
        Log log = newMock(Log.class);

        SpecificationParser parser = new SpecificationParser(new DefaultErrorHandler(), log,
                new DefaultClassResolver(), new SpecFactory());

        parser.setBindingSource(newBindingSource());

        Resource location = getSpecificationResourceLocation("ListenerBinding.page");

        log
                .warn("The <listener-binding> element is no longer supported (at classpath:/org/apache/tapestry/junit/parse/ListenerBinding.page, line 25, column 56).");

        replay();

        IComponentSpecification spec = parser.parsePageSpecification(location);

        verify();

        IContainedComponent cc = spec.getComponent("c");
View Full Code Here

    public void testListenerBinding() throws Exception
    {
        Log log = (Log) newMock(Log.class);

        SpecificationParser parser = new SpecificationParser(new DefaultErrorHandler(), log,
                new DefaultClassResolver(), new SpecFactory());

        parser.setBindingSource(newBindingSource());

        Resource location = getSpecificationResourceLocation("ListenerBinding.page");

        log
                .warn("The <listener-binding> element is no longer supported (at classpath:/org/apache/tapestry/junit/parse/ListenerBinding.page, line 25, column 56).");

        replayControls();

        IComponentSpecification spec = parser.parsePageSpecification(location);

        verifyControls();

        IContainedComponent cc = spec.getComponent("c");
View Full Code Here

    protected IApplicationSpecification parseApplicationSpecification(IResourceLocation location)
        throws ServletException
    {
        try
        {
            SpecificationParser parser = new SpecificationParser(_resolver);

            return parser.parseApplicationSpecification(location);
        }
        catch (DocumentParseException ex)
        {
            show(ex);
View Full Code Here

        IComponentSpecification result = null;

        if (LOG.isDebugEnabled())
            LOG.debug("Parsing component specification " + resourceLocation);

        SpecificationParser parser = getParser();

        try
        {
            if (asPage)
                result = parser.parsePageSpecification(resourceLocation);
            else
                result = parser.parseComponentSpecification(resourceLocation);
        }
        catch (DocumentParseException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format(
View Full Code Here

    /** @since 2.2 **/

    protected SpecificationParser getParser()
    {
        SpecificationParser result = (SpecificationParser) _pool.retrieve(PARSER_POOL_KEY);

        if (result == null)
            result = new SpecificationParser(_resolver);

        return result;
    }
View Full Code Here

        IComponentSpecification result = null;

        if (LOG.isDebugEnabled())
            LOG.debug("Parsing component specification " + resourceLocation);

        SpecificationParser parser = getParser();

        try
        {
            if (asPage)
                result = parser.parsePageSpecification(resourceLocation);
            else
                result = parser.parseComponentSpecification(resourceLocation);
        }
        catch (DocumentParseException ex)
        {
            throw new ApplicationRuntimeException(
                Tapestry.format(
View Full Code Here

    /** @since 2.2 **/

    protected SpecificationParser getParser()
    {
        SpecificationParser result = (SpecificationParser) _pool.retrieve(PARSER_POOL_KEY);

        if (result == null)
            result = new SpecificationParser(_resolver);

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.parse.SpecificationParser

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.