Package org.apache.tapestry5

Examples of org.apache.tapestry5.EventContext


        final Class<?> pageClass = value.getPageClass();
        final Object[] activationContext = value.getPageActivationContext();

        final String pageName = this.resolver.resolvePageClassNameToPageName(pageClass.getName());

        final EventContext context = activationContext == null ? new EmptyEventContext()
                : new ArrayEventContext(this.typeCoercer, activationContext);
       
        Object generatingRederedPage = request.getAttribute(InternalConstants.GENERATING_RENDERED_PAGE);

        try
View Full Code Here


        appendContext(true, parameters.getEventContext(), builder);

        Link result = new LinkImpl(builder.toString(), baseURL == null, forForm, response,
                optimizer);

        EventContext pageActivationContext = parameters.getPageActivationContext();

        if (pageActivationContext.getCount() != 0)
        {
            // Reuse the builder
            builder.setLength(0);
            appendContext(true, pageActivationContext, builder);
View Full Code Here

        if (!componentClassResolver.isPageName(activePageName))
            return null;

        activePageName = componentClassResolver.canonicalizePageName(activePageName);

        EventContext eventContext = contextPathEncoder.decodePath(matcher.group(CONTEXT));

        EventContext activationContext = contextPathEncoder.decodePath(request
                .getParameter(InternalConstants.PAGE_CONTEXT_NAME));

        // The event type is often omitted, and defaults to "action".

        if (eventType == null)
View Full Code Here

            String pageActivationContext)
    {
        if (!componentClassResolver.isPageName(pageName))
            return null;

        EventContext activationContext = contextPathEncoder.decodePath(pageActivationContext);

        String canonicalized = componentClassResolver.canonicalizePageName(pageName);

        boolean loopback = request.getParameter(TapestryConstants.PAGE_LOOPBACK_PARAMETER_NAME) != null;
View Full Code Here

    @Test
    public void matches_on_event_type()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    @Test
    public void event_type_match_is_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    @Test
    public void matches_on_component_id()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    @Test
    public void component_id_matches_are_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();

        train_getCount(context, 0);

        replay();
View Full Code Here

    @Test
    public void coerce_context()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        PageResources resources = mockPageResources();
        EventContext context = mockEventContext();
        Integer value = new Integer(27);

        train_toClass(resources, "java.lang.Integer", Integer.class);

        train_getCount(context, 2);
View Full Code Here

    @Test
    public void coerce_when_not_enough_context()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();

        train_isDebugEnabled(logger, false);

        train_getCount(context, 0);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.EventContext

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.