Examples of MultiLineLabel


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

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

      @Override
      protected void onComponentTagBody(MarkupStream markupStream, 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

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

    {
      public void populateItem(final ListItem listItem)
      {
        final Comment comment = (Comment)listItem.getModelObject();
        listItem.add(new Label("date", new Model(comment.getDate())));
        listItem.add(new MultiLineLabel("text", comment.getText()));
      }
    });
   
    // we need to cancel the standard submit of the form in the onsubmit handler,
    // otherwise we'll get double submits. To do so, we return false after the
View Full Code Here

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

    {
      public void populateItem(final ListItem listItem)
      {
        final Comment comment = (Comment)listItem.getModelObject();
        listItem.add(new Label("date", new Model(comment.getDate())));
        listItem.add(new MultiLineLabel("text", comment.getText()));
      }
    }).setVersioned(false);
  }
View Full Code Here

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

   */
  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

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

    // during rendering, as changing the request target during rendering
    // is not allowed.
    final ClientProperties properties = ((WebClientInfo)getRequestCycle().getClientInfo())
        .getProperties();

    add(new MultiLineLabel("clientinfo", properties.toString()));

    IModel clientTimeModel = new AbstractReadOnlyModel()
    {
      /**
       * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
View Full Code Here

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

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

    // Add exception label
    add(new MultiLineLabel("exception", Strings.toString(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

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

    // don't use a property model here or anything else that is resolved
    // during rendering, as changing the request target during rendering
    // is not allowed.
    final ClientProperties properties = ((WebClientInfo)getRequestCycle().getClientInfo()).getProperties();

    add(new MultiLineLabel("clientinfo", properties.toString()));

    IModel<String> clientTimeModel = new AbstractReadOnlyModel<String>()
    {
      /**
       * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
View Full Code Here

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

      @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

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

  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

Examples of org.mevenide.idea.util.ui.MultiLineLabel

                reports,
                TO_STRING_ASPECT,
                TITLE,
                ListSelectionModel.SINGLE_SELECTION);

        dlg.addToDialog(new MultiLineLabel(RES.get("select.report.label")),
                        BorderLayout.PAGE_START);

        dlg.setModal(true);
        dlg.setResizable(true);
        dlg.setSelection(value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.