Examples of MultiLineLabel


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

   * @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)
      {
        Object modelObject = getModelObject();
        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 static class WKTPanel extends Panel {

        public WKTPanel(String id, CoordinateReferenceSystem crs) {
            super(id);
           
            MultiLineLabel wktLabel = new MultiLineLabel("wkt");
           
            add( wktLabel );
           
            if ( crs != null ) {
                wktLabel.setModel( new Model( crs.toWKT() ) );
            }
        }
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

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

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

    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

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

   * @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);
    label.setOutputMarkupId(true);
    label.add(new LabelAjaxBehavior("onclick"));
    return label;
  }
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

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