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

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


        final WebMarkupContainer tableGroup = new WebMarkupContainer("tableGroup");
        tableGroup.setOutputMarkupId(true);
        //tableGroup.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
        tableGroup.add(new PagingNavigator("navigator", listview));
        tableGroup.add(listview);
        final MultiLineLabel statusLabel = new MultiLineLabel("status",
                new PropertyModel(this, "message"));
        statusLabel.setOutputMarkupId(true);
        final Label tickerLabel =new Label("ticker",new PropertyModel(this,"ticker"));
        tickerLabel.setOutputMarkupId(true);
        add(new AbstractAjaxTimerBehavior(Duration.seconds(3))
        {
            protected void onTimer(AjaxRequestTarget target)
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

  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

    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

   *      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

      @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

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

    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

  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

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.