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

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


  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

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

      @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

  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

   *      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

   * @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#newLabel(org.apache.wicket.MarkupContainer,
   *      java.lang.String, org.apache.wicket.model.IModel)
   */
  protected Component newLabel(MarkupContainer parent, String componentId, IModel model)
  {
    MultiLineLabel label = new MultiLineLabel(componentId, model)
    {
      private static final long serialVersionUID = 1L;

      protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
      {
        if (getModelObject() == null)
        {
          replaceComponentTagBody(markupStream, openTag, defaultNullLabel());
        }
        else
        {
          super.onComponentTagBody(markupStream, openTag);
        }
      }
    };
    label.setOutputMarkupId(true);
    label.add(new LabelAjaxBehavior(getLabelAjaxEvent()));
    return label;
  }
View Full Code Here

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

    {
      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,
View Full Code Here

    // 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)Session.get().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

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.