Package org.apache.tapestry5

Examples of org.apache.tapestry5.EventContext


        {
            public Boolean answer() throws Throwable
            {
                Object[] arguments = EasyMock.getCurrentArguments();

                EventContext ec = (EventContext) arguments[1];

                assertEquals(ec.getCount(), context.length);

                for (int i = 0; i < context.length; i++)
                {
                    assertEquals(ec.get(Object.class, i), context[i]);
                }


                return handled;
            }
View Full Code Here


        appendContext(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(pageActivationContext, builder);
View Full Code Here

        if (localizationSetter.setLocaleFromLocaleName(possibleLocaleName))
            activePageName = activePageName.substring(slashx + 1);

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

        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) eventType = EventConstants.ACTION;
View Full Code Here

    private PageRenderRequestParameters checkIfPage(String pageName, String pageActivationContext)
    {
        if (!componentClassResolver.isPageName(pageName)) return null;

        EventContext activationContext = contextPathEncoder.decodePath(pageActivationContext);

        return new PageRenderRequestParameters(pageName, activationContext);
    }
View Full Code Here

        String pageName = pageClass == null
                ? requestGlobals.getActivePageName()
                : resolver.resolvePageClassNameToPageName(pageClass.getName());

        EventContext context = activationContext == null
                ? new EmptyEventContext()
                : new ArrayEventContext(typeCoercer, activationContext);

        if (value.isBypassActivation())
        {
View Full Code Here

    {
        RequestPageCache cache = mockRequestPageCache();
        ComponentEventResultProcessor processor = mockComponentEventResultProcessor();
        PageResponseRenderer renderer = mockPageResponseRenderer();
        Page page = mockPage();
        EventContext context = mockEventContext();
        ComponentPageElement root = mockComponentPageElement();
        InternalComponentResources pageResources = mockInternalComponentResources();
        PageActivator activator = newMock(PageActivator.class);
        Request request = mockRequest();
       
View Full Code Here

    @Test
    public void matches_on_event_type()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
View Full Code Here

     */
    @Test
    public void no_match_one_event_is_aborted()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        Object result = new Object();
        ComponentPageElementResources resources = mockResources();
        ComponentModel model = mockComponentModel();

View Full Code Here

    @Test
    public void event_type_match_is_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
View Full Code Here

    @Test
    public void matches_on_component_id()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
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.