Package org.jquantlib.quotes

Examples of org.jquantlib.quotes.Handle$Link


   public void check_add_javascript_calls_component_resources_to_create_url()
   {
      Object [] context = new Object[]{ "something", "somewhere" };
      ComponentResources resources = mockComponentResources();
      JavaScriptSupport javaScriptSupport = mockJavaScriptSupport();
      Link link = mockLink();
     
      Zone zone = mockZone();
     
      ZoneRefresh zoneRefresh = new ZoneRefresh(context, resources, javaScriptSupport, zone);
     
      expect(resources.createEventLink("zoneRefresh", context)).andReturn(link);
      expect(link.toAbsoluteURI()).andReturn("mylink");
     
      JSONObject params = new JSONObject();
      params.put("period", 0);
      params.put("id", zone.getClientId());
      params.put("URL", "mylink");
View Full Code Here


                if (value == null)
                {
                    return;
                }

                Link link = event.getEventContext().get(Link.class, 0);

                String clientValue = encoder.toClient(value);

                // TAP5-1768: escape special characters
                clientValue = urlEncoder.encode(clientValue);

                link.addParameter(parameterName, clientValue);
            }
        };

        support.addEventHandler(EventConstants.DECORATE_COMPONENT_EVENT_LINK, 0,
                String.format("ActivationRequestParameterWorker decorate component event link event handler for field %s as query parameter '%s'", fieldName, parameterName), handler);
View Full Code Here

                                                                              manager, optimizer, null, null, null,
                                                                              false);

        PageRenderRequestParameters parameters = new PageRenderRequestParameters("MyPage", new EmptyEventContext());

        Link link = encoder.createPageRenderLink(parameters);

        assertEquals(link.toAbsoluteURI(), "MAGIC");

        verify();
    }
View Full Code Here

        return asset;
    }

    protected final Link mockLink(String absoluteURI)
    {
        Link link = mockLink();

        expect(link.toURI()).andReturn(absoluteURI).atLeastOnce();

        return link;
    }
View Full Code Here

        "id", menuId,

        "class", "t-autocomplete-menu");
        writer.end();

        Link link = resources.createEventLink(EVENT_NAME);

        JSONObject config = new JSONObject();
        config.put("paramName", PARAM_NAME);
        config.put("indicator", loaderId);

        if (resources.isBound("minChars"))
            config.put("minChars", minChars);

        if (resources.isBound("frequency"))
            config.put("frequency", frequency);

        if (resources.isBound("tokens"))
        {
            for (int i = 0; i < tokens.length(); i++)
            {
                config.accumulate("tokens", tokens.substring(i, i + 1));
            }
        }

        // Let subclasses do more.
        configure(config);

        JSONObject spec = new JSONObject("elementId", id, "menuId", menuId, "url", link.toURI()).put("config",
                config);

        jsSupport.addInitializerCall("autocompleter", spec);
    }
View Full Code Here

        // Page is secure but request is not, so redirect.
        // We can safely ignore the forForm parameter since secure form requests are always done from
        // an already secured page

        Link link = componentEventLinkEncoder.createComponentEventLink(parameters, false);

        response.sendRedirect(link);

        return true;
    }
View Full Code Here

        if (!needsRedirect(parameters.getLogicalPageName()))
            return false;

        // Page is secure but request is not, so redirect.

        Link link = componentEventLinkEncoder.createPageRenderLink(parameters);

        response.sendRedirect(link);

        return true;
    }
View Full Code Here

        captchaText = producer.createText();
    }

    boolean beginRender(MarkupWriter writer)
    {
        Link link = resources.createEventLink("image");

        writer.element("img",

                "src", link.toURI(),

                "width", producer.getWidth(),

                "height", producer.getHeight());
View Full Code Here

      javaScriptSupport.addInitializerCall(InitializationPriority.LATE, "zoneRefresh", params);
   }

   private Object createEventLink()
   {
      Link link = resources.createEventLink("zoneRefresh", context);
      return link.toAbsoluteURI();
   }
View Full Code Here

    };

    @Test
    public void no_anchor()
    {
        Link link = mockLink();
        ComponentResources resources = mockComponentResources();
        MarkupWriter writer = new MarkupWriterImpl();

        train_toURI(link, LINK_URI);
        //note that we aren't trying to test the parameters code here, so we only worry about the single, simplest branch.
View Full Code Here

TOP

Related Classes of org.jquantlib.quotes.Handle$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.