Package org.apache.wicket.markup.html

Examples of org.apache.wicket.markup.html.WebMarkupContainer


    this.nrOfStars = wrap(nrOfStars);
    this.nrOfVotes = wrap(nrOfVotes);
    this.hasVoted = wrap(hasVoted);

    WebMarkupContainer rater = new WebMarkupContainer("rater");
    rater.add(newRatingStarBar("element", this.nrOfStars));

    // add the text label for the message 'Rating 4.5 out of 25 votes'
    rater.add(ratingLabel = newRatingLabel("rating", wrap(rating), this.nrOfVotes));

    // set auto generation of the markup id on, such that ajax calls work.
    rater.setOutputMarkupId(true);

    add(rater);

    // don't render the outer tags in the target document, just the div that
    // is inside the panel.
View Full Code Here


   */
  public NoRecordsToolbar(final DataTable<?, ?> table, final IModel<String> messageModel)
  {
    super(table);

    WebMarkupContainer td = new WebMarkupContainer("td");
    add(td);

    td.add(AttributeModifier.replace("colspan", new AbstractReadOnlyModel<String>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public String getObject()
      {
        return String.valueOf(table.getColumns().size()).intern();
      }
    }));
    td.add(new Label("msg", messageModel));
  }
View Full Code Here

    private static final long serialVersionUID = 1L;

    public TestContainer()
    {
      super("A");
      WebMarkupContainer b = new WebMarkupContainer("B");
      WebMarkupContainer c = new WebMarkupContainer("C");
      WebMarkupContainer d = new WebMarkupContainer("D");
      WebMarkupContainer e = new WebMarkupContainer("E");
      WebMarkupContainer f = new WebMarkupContainer("F");
      WebMarkupContainer g = new MarkedWebMarkupContainer("G");
      WebMarkupContainer h = new WebMarkupContainer("H");
      add(b);
      add(c);
      c.add(d);
      c.add(e);
      e.add(f);
View Full Code Here

      if (modelObject != null)
      {
        for (T value : modelObject)
        {
          // we need a container to represent a row in repeater
          WebMarkupContainer row = new WebMarkupContainer(newChildId());
          row.setRenderBodyOnly(true);
          add(row);

          // we add our actual SelectOption component to the row
          String text = renderer.getDisplayValue(value);
          IModel<T> model = renderer.getModel(value);
          row.add(newOption(text, model));
        }
      }
    }
  }
View Full Code Here

  @Override
  protected void onInitialize()
  {
    super.onInitialize();

    WebMarkupContainer td = new WebMarkupContainer("td");
    add(td);

    td.add(AttributeModifier.replace("colspan", new AbstractReadOnlyModel<String>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public String getObject()
      {
        return String.valueOf(getTable().getColumns().size()).intern();
      }
    }));

    td.add(new Label("exportTo", messageModel));

    RepeatingView linkContainers = new RepeatingView("linkContainer");
    td.add(linkContainers);

    for (IDataExporter exporter : dataExporters)
    {
      WebMarkupContainer span = new WebMarkupContainer(linkContainers.newChildId());
      linkContainers.add(span);

      span.add(createExportLink("exportLink", exporter));
    }
  }
View Full Code Here

    data1.put("label", "foo");

    ValueMap data2 = new ValueMap();
    data2.put("label", "bar");

    WebMarkupContainer parent = new WebMarkupContainer("foo");
    Label label = new Label("label");
    parent.add(label);

    parent.setDefaultModel(new CompoundPropertyModel<>(data1));
    assertEquals("foo", label.getDefaultModelObject());

    parent.setDefaultModel(new CompoundPropertyModel<>(data2));
    assertEquals("bar", label.getDefaultModelObject());

    data2.put("label", "foo");
    assertEquals("foo", label.getDefaultModelObject());
  }
View Full Code Here

   *
   */
  @SuppressWarnings("serial")
  public TraditionalEnclosureAjaxPage()
  {
    add((traditionalAjaxVisibilityToggleRequiresPlaceholder = new WebMarkupContainer(
      "toggleable-placeholder")
    {
      @Override
      public boolean isVisible()
      {
        return get(toggleableChildId).isVisible();
      }
    }).setOutputMarkupPlaceholderTag(true));
    Assert.assertEquals("Ajax requires tag to remain in DOM even if not visible", true,
      traditionalAjaxVisibilityToggleRequiresPlaceholder.getOutputMarkupPlaceholderTag());
    {
      traditionalAjaxVisibilityToggleRequiresPlaceholder.add((toggleable = new WebMarkupContainer(
        toggleableChildId = "toggleable")).setOutputMarkupPlaceholderTag(true));
      add(link = new AjaxLink<Void>("link")
      {
        @Override
        public void onClick(AjaxRequestTarget target)
View Full Code Here

    border.getBodyContainer().setVisible(false);

    add(border);

    border.add(new TextField<String>("text"));
    border.add(new WebMarkupContainer("img"));
  }
View Full Code Here

  private void init()
  {
    setVersioned(false);
    cookieName = null;

    add(empty = new WebMarkupContainer(getContentId()));

    add(newCloseButtonBehavior());
    add(new WindowClosedBehavior());

    // install a default callback that will force
View Full Code Here

  public ModalWindow remove(final Component component)
  {
    super.remove(component);
    if (component.getId().equals(getContentId()))
    {
      add(empty = new WebMarkupContainer(getContentId()));
    }

    return this;
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.WebMarkupContainer

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.