Package org.apache.wicket.request.resource

Examples of org.apache.wicket.request.resource.SharedResourceReference


    final IResourceCachingStrategy strategy = new FilenameWithVersionResourceCachingStrategy(
      "-version-", resourceVersion);

    tester.getApplication().getSharedResources().add(SHARED_NAME, resource);
    tester.getApplication().getResourceSettings().setCachingStrategy(strategy);
    final ResourceReference resourceReference = new SharedResourceReference(SHARED_NAME);
    tester.getApplication().mountResource(mountPath, resourceReference);
  }
View Full Code Here


  public void mapRequest()
  {
    ContextRelativeResource resource = new ContextRelativeResource("/style.css");
    init(resource, "/test/resource");

    IRequestHandler handler = new ResourceReferenceRequestHandler(new SharedResourceReference(
      SHARED_NAME));
    Url url = tester.getApplication().getRootRequestMapper().mapHandler(handler);
    assertNotNull(url);
    assertEquals(url, Url.parse("test/resource-version-123"));
  }
View Full Code Here

    if (css != null)
    {
      response.render(CssHeaderItem.forReference(css));
    }

    ResourceReference ref = new SharedResourceReference(RESOURCE_NAME);

    final String uploadFieldId = (uploadField == null) ? "" : uploadField.getMarkupId();

    final String status = new StringResourceModel(RESOURCE_STARTING, this, (IModel<?>)null).getString();
View Full Code Here

    if (css != null)
    {
      response.render(CssHeaderItem.forReference(css));
    }

    ResourceReference ref = new SharedResourceReference(RESOURCE_NAME);

    final String uploadFieldId = (uploadField == null) ? "" : uploadField.getMarkupId();

    final String status = new StringResourceModel(RESOURCE_STARTING, this, (IModel<?>)null).getString();
View Full Code Here

        if (pageId != NO_PAGE_ID)
        {
          page.send(application, Broadcast.BREADTH, payload);
        } else
        {
          ResourceReference reference = new SharedResourceReference(resourceName);
          IResource resource = reference.getResource();
          if (resource instanceof WebSocketResource)
          {
            WebSocketResource wsResource = (WebSocketResource) resource;
            wsResource.onPayload(payload);
          } else
View Full Code Here

    if (css != null)
    {
      response.renderCSSReference(css);
    }

    ResourceReference ref = new SharedResourceReference(RESOURCE_NAME);

    final String uploadFieldId = (uploadField == null) ? "" : uploadField.getMarkupId();

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    PrintStream js = new PrintStream(out);
View Full Code Here

      PopupSettings.SCROLLBARS).setHeight(500).setWidth(700);
    add(new ExternalLink("googlePopup", "http://www.google.com",
      "Click this link to go to Google in a popup").setPopupSettings(googlePopupSettings));

    // Shared resource link
    add(new ResourceLink("cancelButtonLink", new SharedResourceReference("cancelButton")));

    // redirect to external url form
    FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
    add(feedbackPanel);
    add(new RedirectForm("redirectForm"));
View Full Code Here

  {
    super.setUp();

    resource = new TestResource();
    tester.getApplication().getSharedResources().add(SHARED_NAME, resource);
    ResourceReference resourceReference = new SharedResourceReference(SHARED_NAME);
    mapper = new ResourceMapper("/test/resource", resourceReference);
    mapperWithPlaceholder = new ResourceMapper("/test2/${name}/resource", resourceReference);
    tester.getApplication().getRootRequestMapperAsCompound().add(mapper);
  }
View Full Code Here

        if (pageId != NO_PAGE_ID)
        {
          page.send(application, Broadcast.BREADTH, payload);
        } else
        {
          ResourceReference reference = new SharedResourceReference(resourceName);
          IResource resource = reference.getResource();
          if (resource instanceof WebSocketResource)
          {
            WebSocketResource wsResource = (WebSocketResource) resource;
            wsResource.onPayload(payload);
          } else
View Full Code Here

      PopupSettings.SCROLLBARS).setHeight(500).setWidth(700);
    add(new ExternalLink("googlePopup", "http://www.google.com",
      "Click this link to go to Google in a popup").setPopupSettings(googlePopupSettings));

    // Shared resource link
    add(new ResourceLink("cancelButtonLink", new SharedResourceReference("cancelButton")));

    // redirect to external url form
    FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
    add(feedbackPanel);
    add(new RedirectForm("redirectForm"));
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.resource.SharedResourceReference

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.