Package org.apache.wicket.markup.html.basic

Examples of org.apache.wicket.markup.html.basic.MultiLineLabel


        return choices.iterator();
      }
    };
    form.add(field);

    final MultiLineLabel label = new MultiLineLabel("history", new PropertyModel<String>(this,
      "values"));
    label.setOutputMarkupId(true);
    form.add(label);

    field.add(new AjaxFormSubmitBehavior(form, "change")
    {
      @Override
View Full Code Here


    TextField<String> nameTextField = new TextField<String>("name", new PropertyModel<String>(
      MailTemplate.this, "name"));
    nameTextField.setOutputMarkupId(true);
    form.add(nameTextField);

    final MultiLineLabel result = new MultiLineLabel("result", new Model<String>());
    result.setOutputMarkupId(true);
    add(result);

    AjaxSubmitLink basedOnPageLink = new AjaxSubmitLink("pageBasedLink", form)
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

   */
  @Override
  protected MultiLineLabel newLabel(final MarkupContainer parent, final String componentId,
    final IModel<T> model)
  {
    MultiLineLabel label = new MultiLineLabel(componentId, model)
    {
      private static final long serialVersionUID = 1L;

      /**
       * {@inheritDoc}
       */
      @Override
      public void onComponentTagBody(final MarkupStream markupStream,
        final ComponentTag openTag)
      {
        Object modelObject = getDefaultModelObject();
        if ((modelObject == null) || "".equals(modelObject))
        {
          replaceComponentTagBody(markupStream, openTag, defaultNullLabel());
        }
        else
        {
          super.onComponentTagBody(markupStream, openTag);
        }
      }
    };
    label.setOutputMarkupId(true);
    label.add(new LabelAjaxBehavior(getLabelAjaxEvent()));
    return label;
  }
View Full Code Here

  public ExceptionErrorPage(final Throwable throwable, final Page page)
  {
    this.throwable = throwable;

    // Add exception label
    add(new MultiLineLabel("exception", getErrorMessage(throwable)));

    add(new MultiLineLabel("stacktrace", getStackTrace(throwable)));

    // Get values
    String resource = "";
    String markup = "";
    MarkupStream markupStream = null;

    if (throwable instanceof MarkupException)
    {
      markupStream = ((MarkupException)throwable).getMarkupStream();

      if (markupStream != null)
      {
        markup = markupStream.toHtmlDebugString();
        resource = markupStream.getResource().toString();
      }
    }

    // Create markup label
    final MultiLineLabel markupLabel = new MultiLineLabel("markup", markup);

    markupLabel.setEscapeModelStrings(false);

    // Add container with markup highlighted
    final WebMarkupContainer markupHighlight = new WebMarkupContainer("markupHighlight");

    markupHighlight.add(markupLabel);
View Full Code Here

   */
  public MultiLineLabelPage()
  {
    String text = "\nThis is a line.\n" + "And this is another line.\n" + "End of lines.\n";

    add(new MultiLineLabel("multiLineLabel", text));
  }
View Full Code Here

      @Override
      public void populateItem(final ListItem<Comment> listItem)
      {
        final Comment comment = listItem.getModelObject();
        listItem.add(new Label("date", new Model<Date>(comment.getDate())));
        listItem.add(new MultiLineLabel("text", comment.getText()));
      }
    });

    // we need to cancel the standard submit of the form in the onsubmit
    // handler,
View Full Code Here

   * @param code
   */
  public ExplainPanel(String html, String code)
  {
    super("explainPanel");
    add(new MultiLineLabel("html", html));
    add(new MultiLineLabel("code", code).setEscapeModelStrings(false));
  }
View Full Code Here

   */
  @Override
  protected MultiLineLabel newLabel(final MarkupContainer parent, final String componentId,
    final IModel<T> model)
  {
    MultiLineLabel label = new MultiLineLabel(componentId, model)
    {
      private static final long serialVersionUID = 1L;

      /**
       * {@inheritDoc}
       */
      @Override
      public void onComponentTagBody(final MarkupStream markupStream,
        final ComponentTag openTag)
      {
        Object modelObject = getDefaultModelObject();
        if ((modelObject == null) || "".equals(modelObject))
        {
          replaceComponentTagBody(markupStream, openTag, defaultNullLabel());
        }
        else
        {
          super.onComponentTagBody(markupStream, openTag);
        }
      }
    };
    label.setOutputMarkupId(true);
    label.add(new LabelAjaxBehavior(getLabelAjaxEvent()));
    return label;
  }
View Full Code Here

    TextField<String> nameTextField = new TextField<String>("name", new PropertyModel<String>(
      MailTemplate.this, "name"));
    nameTextField.setOutputMarkupId(true);
    form.add(nameTextField);

    final MultiLineLabel result = new MultiLineLabel("result", new Model<String>());
    result.setOutputMarkupId(true);
    add(result);

    AjaxSubmitLink basedOnPageLink = new AjaxSubmitLink("pageBasedLink", form)
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

    {
      @Override
      public void populateItem(final ListItem<Comment> listItem)
      {
        listItem.add(new Label("date"));
        listItem.add(new MultiLineLabel("text"));
      }
    }).setVersioned(false);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.basic.MultiLineLabel

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.