Examples of ParameterToken


Examples of org.apache.tapestry.internal.parser.ParameterToken

    @Test
    public void parameter_element()
    {
        List<TemplateToken> tokens = tokens("parameter_element.html");

        ParameterToken token4 = get(tokens, 4);
        assertEquals(token4.getName(), "fred");

        CommentToken token6 = get(tokens, 6);
        assertEquals(token6.getComment(), "fred content");

        TemplateToken token8 = get(tokens, 8);
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

    @Test
    public void parameter_element()
    {
        List<TemplateToken> tokens = tokens("parameter_element.tml");

        ParameterToken token4 = get(tokens, 4);
        assertEquals(token4.getName(), "fred");

        CommentToken token6 = get(tokens, 6);
        assertEquals(token6.getComment(), "fred content");

        TemplateToken token8 = get(tokens, 8);
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

        if (InternalUtils.isBlank(parameterName))
            throw new TapestryException(ServicesMessages.parameterElementNameRequired(),
                    getCurrentLocation(), null);

        _tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
    }
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

        if (InternalUtils.isBlank(parameterName))
            throw new TapestryException(ServicesMessages.parameterElementNameRequired(),
                    getCurrentLocation(), null);

        _tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
    }
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

    @Test
    public void parameter_element()
    {
        List<TemplateToken> tokens = tokens("parameter_element.html");

        ParameterToken token4 = get(tokens, 4);
        assertEquals(token4.getName(), "fred");

        CommentToken token6 = get(tokens, 6);
        assertEquals(token6.getComment(), "fred content");

        TemplateToken token8 = get(tokens, 8);
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

        if (InternalUtils.isBlank(parameterName))
            throw new TapestryException(ServicesMessages.parameterElementNameRequired(),
                    getCurrentLocation(), null);

        _tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
    }
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

    @Test
    public void parameter_element()
    {
        List<TemplateToken> tokens = tokens("parameter_element.html");

        ParameterToken token4 = get(tokens, 4);
        assertEquals(token4.getName(), "fred");

        CommentToken token6 = get(tokens, 6);
        assertEquals(token6.getComment(), "fred content");

        TemplateToken token8 = get(tokens, 8);
View Full Code Here

Examples of org.apache.tapestry.internal.parser.ParameterToken

        if (InternalUtils.isBlank(parameterName))
            throw new TapestryException(ServicesMessages.parameterElementNameRequired(),
                    getCurrentLocation(), null);

        _tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
        _endTagHandlerStack.push(_addEndElementToken);
    }
View Full Code Here

Examples of org.apache.tapestry5.internal.parser.ParameterToken

        });
    }

    private void parameter(AssemblerContext context)
    {
        final ParameterToken token = context.next(ParameterToken.class);

        context.add(new PageAssemblyAction()
        {
            public void execute(PageAssembly pageAssembly)
            {
                String parameterName = token.getName();

                ComponentPageElement element = pageAssembly.createdElement.peek();

                BlockImpl block = new BlockImpl(token.getLocation(), interner.format("Parameter %s of %s",
                        parameterName, element.getCompleteId()));

                Binding binding = new LiteralBinding(token.getLocation(), "block parameter " + parameterName, block);

                EmbeddedComponentAssembler embeddedAssembler = pageAssembly.embeddedAssembler.peek();

                ParameterBinder binder = embeddedAssembler.createParameterBinder(parameterName);

                if (binder == null) { throw new TapestryException(PageloadMessages.parameterNotSupported(
                        element.getCompleteId(), parameterName), token.getLocation(), null); }

                binder.bind(pageAssembly.createdElement.peek(), binding);

                pageAssembly.bodyElement.push(block);
            }
View Full Code Here

Examples of org.apache.tapestry5.internal.parser.ParameterToken

            throw new TapestryException(ServicesMessages.parameterElementNameRequired(),
                    getLocation(), null);

        ensureParameterWithinComponent(state);

        tokenAccumulator.add(new ParameterToken(parameterName, getLocation()));

        processBody(state.insideComponent(false));
    }
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.