Package org.apache.wicket.markup.html.form

Examples of org.apache.wicket.markup.html.form.TextArea


     *            component name
     */
    public TemplateForm(String name)
    {
      super(name);
      add(templateTextArea = new TextArea("templateInput", new PropertyModel(new Model(
          TemplatePage.this), "template")));
    }
View Full Code Here


    Form form = new Form("form", new CompoundPropertyModel(domainObject));
    add(form);

    form.add(new TextField("text"));
    form.add(new CheckBox("checkbox"));
    form.add(new TextArea("textarea"));
    form.add(new Button("submit"));
  }
View Full Code Here

   * @see org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel#newEditor(org.apache.wicket.MarkupContainer,
   *      java.lang.String, org.apache.wicket.model.IModel)
   */
  protected FormComponent newEditor(MarkupContainer parent, String componentId, IModel model)
  {
    TextArea editor = new TextArea(componentId, model);
    editor.add(new AttributeModifier("rows", new AbstractReadOnlyModel()
    {
      private static final long serialVersionUID = 1L;

      public Object getObject()
      {
        return new Integer(rows);
      }
    }));
    editor.add(new AttributeModifier("cols", new AbstractReadOnlyModel()
    {
      private static final long serialVersionUID = 1L;

      public Object getObject()
      {
        return new Integer(cols);
      }
    }));
    editor.setOutputMarkupId(true);
    editor.setVisible(false);
    editor.add(new EditorAjaxBehavior()
    {
      private static final long serialVersionUID = 1L;

      /**
       * @see org.apache.wicket.behavior.AbstractAjaxBehavior#onComponentTag(org.apache.wicket.markup.ComponentTag)
View Full Code Here

   * Constructor.
   */
  public UnicodeConverter()
  {
    Form form = new Form("form", new CompoundPropertyModel(this));
    form.add(new TextArea("source"));
    form.add(new DropDownChoice("translationType", translationTypes));
    form.add(new TextArea("target", new ConverterModel()));
    add(form);
  }
View Full Code Here

      // this is just to make the unit test happy
      setMarkupId("commentForm");

      // Add text entry widget
      add(new TextArea("text"));

      // Add simple automated spam prevention measure.
      add(new TextField("comment"));
    }
View Full Code Here

    {
      // Construct form with no validation listener
      super(id, new CompoundPropertyModel(new Comment()));

      // Add text entry widget
      text = new TextArea("text").setOutputMarkupId(true);
      add(text);
    }
View Full Code Here

                public String getIdValue(Object o, int i) {
                    return o.toString();
                }
            });
            add(choice);
            TextArea commentArea = new TextArea("comment");
            commentArea.setRequired(true);
            commentArea.add(new ErrorHighlighter());
            add(commentArea);
        }
View Full Code Here

            /*
             * ===================================================
             * Detail
             * ===================================================
             */
            add(new TextArea("detail").setRequired(true).add(new ErrorHighlighter()));
           
            /*
             * ===================================================
             * Custom fields
             * ===================================================
             */
            if (editMode) {
                add(new CustomFieldsFormPanel("fields", model, item.getSpace()).setRenderBodyOnly(true));
            } else {
                add(new CustomFieldsFormPanel("fields", model, item, getPrincipal()).setRenderBodyOnly(true));
            }
           
            /*
             * Hide some components if editing item
             */
            WebMarkupContainer hideAssignedTo = new WebMarkupContainer("hideAssignedTo");
            WebMarkupContainer hideNotifyList = new WebMarkupContainer("hideNotifyList");
            WebMarkupContainer hideEditReason = new WebMarkupContainer("hideEditReason");
            add(hideAssignedTo);
            add(hideNotifyList);
            add(hideEditReason);
            if (editMode) {
                hideAssignedTo.setVisible(false);
                hideNotifyList.setVisible(false);
                hideEditReason.add(new TextArea("editReason").setRequired(true).add(new ErrorHighlighter()));
            } else {
                hideEditReason.setVisible(false);
               
                /*
                 * ===================================================
 
View Full Code Here

            this.itemId = item.getId();
            final History history = new History();
            history.setItemUsers(item.getItemUsers());
            final BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(history);
            setModel(model);
            add(new TextArea("comment").setRequired(true).add(new ErrorHighlighter()));
            // custom fields ===================================================
            User user = getPrincipal();
            add(new CustomFieldsFormPanel("fields", model, item, user));
            // =================================================================
            final Space space = item.getSpace();
View Full Code Here

        private String comment;               
       
        public ConfirmForm(String id) {
            super(id);           
            setModel(new BoundCompoundPropertyModel(this));
            TextArea commentArea = new TextArea("comment");
            commentArea.setRequired(true);
            commentArea.add(new ErrorHighlighter());
            add(commentArea);
        }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.TextArea

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.