Package aQute.bnd.osgi

Examples of aQute.bnd.osgi.Macro$Link


                eventType,
                new ArrayEventContext(typeCoercer, pageActivationContext),
                new ArrayEventContext(typeCoercer, eventContext));


        Link link = linkFactory.createComponentEventLink(parameters, forForm);

        for (LinkCreationListener listener : listeners)
            listener.createdComponentEventLink(link);

        return link;
View Full Code Here


            builder.append(eventType.toLowerCase());
        }

        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);

            // Omit that first slash
            result.addParameter(InternalConstants.PAGE_CONTEXT_NAME, builder.substring(1));
        }

        // TAPESTRY-2044: Sometimes the active page drags in components from another page and we
        // need to differentiate that.

        if (!containingPageName.equalsIgnoreCase(activePageName))
            result.addParameter(InternalConstants.CONTAINER_PAGE_NAME, containingPageName.toLowerCase());

        return result;
    }
View Full Code Here

        resources.renderInformalParameters(writer);

        e.addClassName("t-zone");

        Link link = resources.createEventLink(EventConstants.ACTION, context);

        JSONObject spec = new JSONObject();

        if (InternalUtils.isNonBlank(update))
            spec.put("update", update.toLowerCase());

        spec.put("element", clientId);
        spec.put("url", link.toURI());

        jsSupport.addInitializerCall("progressiveDisplay", spec);

        return initial;
    }
View Full Code Here

                {
                    throw new RuntimeException(String.format(
                            "Request was not handled: '%s' may not be a valid page name.", pageName));
                }

                Link link = response.getRedirectLink();

                if (link != null)
                {
                    setupRequestFromLink(link);
                    continue;
View Full Code Here

                if (!handled)
                    throw new RuntimeException(String.format("Request for path '%s' was not handled by Tapestry.",
                            request.getPath()));

                Link link = response.getRedirectLink();

                if (link != null)
                {
                    setupRequestFromLink(link);
                    continue;
View Full Code Here

    void beginRender(MarkupWriter writer)
    {
        if (isDisabled()) return;

        Link link = resources.createPageLink(page, resources.isBound("context"), context);

        writeLink(writer, link);
    }
View Full Code Here

    public void check_redirect_needed() throws Exception
    {
        Request request = mockRequest();
        Response response = mockResponse();
        MetaDataLocator locator = mockMetaDataLocator();
        Link link = mockLink();
        ComponentEventLinkEncoder encoder = newMock(ComponentEventLinkEncoder.class);

        train_isSecure(request, false);

        train_isSecure(locator, PAGE_NAME, true);
View Full Code Here

    @Test
    public void no_client_data_in_request()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        replay();

        ClientPersistentFieldStorage storage = new ClientPersistentFieldStorageImpl(request, clientDataEncoder);
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void store_and_restore_a_change()
    {
        Request request = mockRequest(null);
        Link link = mockLink();
        final Holder<String> holder = Holder.create();

        String pageName = "Foo";
        String componentId = "bar.baz";
        String fieldName = "biff";
        Object value = 99;

        // Use an IAnswer to capture the value.

        link.addParameter(eq(ClientPersistentFieldStorageImpl.PARAMETER_NAME), isA(String.class));
        setAnswer(new IAnswer<Void>()
        {
            public Void answer() throws Throwable
            {
                String base64 = (String) EasyMock.getCurrentArguments()[1];
View Full Code Here

    @Test
    public void multiple_changes()
    {
        Request request = mockRequest(null);
        Link link = mockLink();

        String pageName = "Foo";
        String componentId = "bar.baz";

        link.addParameter(eq(ClientPersistentFieldStorageImpl.PARAMETER_NAME), isA(String.class));

        replay();

        ClientPersistentFieldStorage storage = new ClientPersistentFieldStorageImpl(request, clientDataEncoder);
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.Macro$Link

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.