Package org.apache.wicket

Examples of org.apache.wicket.ResourceReference


  /**
   * Construct.
   */
  public BlockedResourceLinkPage()
  {
    add(new ResourceLink<Void>("link", new ResourceReference(BlockedResourceLinkPage.class,
        "BlockedResourceLinkPage.html")));
  }
View Full Code Here


    setOutputMarkupId(true);
    form.setOutputMarkupId(true);
    setRenderBodyOnly(true);

    add(HeaderContributor.forJavaScript(JS));
    ResourceReference css = getCss();
    if (css != null)
    {
      add(HeaderContributor.forCss(css));
    }

    final WebMarkupContainer barDiv = new WebMarkupContainer("bar");
    barDiv.setOutputMarkupId(true);
    add(barDiv);

    final WebMarkupContainer statusDiv = new WebMarkupContainer("status");
    statusDiv.setOutputMarkupId(true);
    add(statusDiv);

    if (!(RequestCycle.get().getRequest() instanceof UploadWebRequest) &&
      !(RequestCycle.get().getRequest() instanceof MultipartRequest))
    {
      log.warn("UploadProgressBar will not work without an UploadWebRequest. See the javadoc for details.");
    }

    form.add(new AttributeModifier("onsubmit", true, new Model<String>()
    {

      private static final long serialVersionUID = 1L;


      @Override
      public String getObject()
      {
        ResourceReference ref = new ResourceReference(RESOURCE_NAME);

        return "var def=new Wicket.WUPB.Def('" + form.getMarkupId() + "', '" +
          statusDiv.getMarkupId() + "', '" + barDiv.getMarkupId() + "', '" +
          getPage().urlFor(ref) + "'); Wicket.WUPB.start(def);";
      }
View Full Code Here

   * @param response
   */
  public void renderHead(IHeaderResponse response)
  {
    response.renderJavascriptReference(JAVASCRIPT);
    ResourceReference css = getCSS();
    if (css != null)
    {
      response.renderCSSReference(css);
    }
  }
View Full Code Here

  /**
   * @return ResourceReference token for this letter
   */
  public ResourceReference getSharedImageResource()
  {
    return new ResourceReference(Letter.class, asString() +
        (isGuessed() ? "_enabled" : "_disabled"))
    {
      protected Resource newResource()
      {
        // Lazy loading of shared resource
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 ResourceReference("cancelButton")));

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

    // Add okay button image
    add(new Image("okButton", getOkButtonImage()));

    // Add cancel button image
    add(new Image("cancelButton", new ResourceReference("cancelButton")));

    // image loaded as resource ref via model.
    add(new Image("imageModelResourceReference", new Model<ResourceReference>(RESOURCE_REF)));

    // image loaded as resource via model.
View Full Code Here

  /**
   * @return Gets shared image component
   */
  public ResourceReference getImage5Resource()
  {
    return new ResourceReference(Home.class, "image5")
    {
      @Override
      public Resource newResource()
      {
        final BufferedDynamicImageResource resource = new BufferedDynamicImageResource();
View Full Code Here

    graphics.drawOval(x, y, dx, dy);
  }

  final ResourceReference getOkButtonImage()
  {
    return new ResourceReference("okButton")
    {
      @Override
      protected Resource newResource()
      {
        return new DefaultButtonImageResource("Ok");
View Full Code Here

   *
   * @return the url to use for the popup button/ icon
   */
  protected CharSequence getIconUrl()
  {
    return RequestCycle.get().urlFor(new ResourceReference(DatePicker.class, "icon1.gif"));
  }
View Full Code Here

  /**
   * Construct.
   */
  public MockResourceLinkPage()
  {
    add(new ResourceLink("link", new ResourceReference(MockResourceLinkPage.class, "test.html")));
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.ResourceReference

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.