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

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


    {
        super(id, model, metaData, viewOnly);

        metaData.consumeParameter(ElementMetaData.PARAM_ROWS);
        metaData.consumeParameter(ElementMetaData.PARAM_COLUMNS);
        TextArea field = new TextArea("component", model) {
            private static final long serialVersionUID = 1L;
            @Override
            protected void onComponentTag(ComponentTag tag)
            {
                super.onComponentTag(tag);
                String rows = metaData.getParameter("rows");
                if (rows != null) {
                    tag.put("rows", rows);
                }

                String cols = metaData.getParameter("cols");
                if (cols != null) {
                    tag.put("cols", cols);
                }
            }
        };
       
        setFieldParameters(field);
        field.setEnabled(!viewOnly);

        add(field);
    }
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)
    {
      private static final long serialVersionUID = 1L;

      protected void onModelChanged()
      {
        AjaxEditableMultiLineLabel.this.onModelChanged();
      }

      protected void onModelChanging()
      {
        AjaxEditableMultiLineLabel.this.onModelChanging();
      }
    };
    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

        return WMSInfo.class;
    }
   
    protected void build(IModel info, Form form) {
        // limited srs list
        TextArea srsList = new TextArea("srs", LiveCollectionModel.list(new PropertyModel(info, "sRS"))) {
            @Override
            public IConverter getConverter(Class type) {
                return new SRSListConverter();
            }
               
        };
        srsList.add(new SRSListValidator());
        srsList.setType(List.class);
        form.add(srsList);

        // general
      form.add(new DropDownChoice("interpolation", Arrays.asList(WMSInfo.WMSInterpolation.values()), new InterpolationRenderer()));
      // resource limits
View Full Code Here

        TextField name = new TextField("name");
        name.setRequired(true);
        add(name);
        add(new TextField("title"));
        add(new TextArea("abstract"));
        add(new KeywordsEditor("keywords", LiveCollectionModel.list(new PropertyModel(model, "keywords"))));
        add(new MetadataLinkEditor("metadataLinks", model));

        final Form refForm = new Form("referencingForm");
        add(refForm);
View Full Code Here

        add(mapPanel = new OpenLayersMapPanel("map", layer));

        Form form = new Form("form");
        add(form);
       
        form.add(sldTextArea = new TextArea("editor", new PropertyModel(this, "sld")));
        sldTextArea.setOutputMarkupId(true);
        //sldTextArea.add(new EditAreaBehavior());
       
        updateSLD();
       
View Full Code Here

    private static final long serialVersionUID = 5645666151936813854L;

    public ResourcePanel(final String id, final IModel resourceModel, final boolean enabled) {
        super(id);
        setOutputMarkupId(true);
        TextArea textArea = new TextArea("textArea", resourceModel);
        textArea.setEnabled(enabled);
        add(textArea);
    }
View Full Code Here

        onlineResource.add(new UrlValidator());
        form.add(onlineResource);
        form.add(new CheckBox("enabled"));
        form.add(new CheckBox("citeCompliant"));
        form.add(new TextField("title"));
        form.add(new TextArea("abstract"));
        form.add(new KeywordsEditor("keywords", LiveCollectionModel.list(new PropertyModel(infoModel, "keywords"))));
        form.add(new TextField("fees"));
        form.add(new TextField("accessConstraints"));
       
        build(infoModel, form);
View Full Code Here

        super(PageMap.forName("demoRequestResponse"));

        Form form = new Form("form");
        add(form);
        form.add(new HiddenField("url", new PropertyModel(model, "requestUrl")));
        form.add(new TextArea("body", new PropertyModel(model, "requestBody")));
        form.add(new HiddenField("username", new PropertyModel(model, "userName")));
        form.add(new HiddenField("password", new PropertyModel(model, "password")));

        // override the action property of the form to submit to the TestWfsPost
        // servlet
View Full Code Here

        urlTextField = new TextField("url", new PropertyModel(requestModel, "requestUrl"));
        urlTextField.setMarkupId("requestUrl");
        urlTextField.setOutputMarkupId(true);
        demoRequestsForm.add(urlTextField);

        body = new TextArea("body", new PropertyModel(requestModel, "requestBody"));
        // force the id otherwise this blasted thing won't be usable from other forms
        body.setMarkupId("requestBody");
        body.setOutputMarkupId(true);
        body.add(new EditAreaBehavior());
        demoRequestsForm.add(body);
View Full Code Here

        add(styleForm);

        styleForm.add(nameTextField = new TextField("name"));
        nameTextField.setRequired(true);
       
        styleForm.add( editor = new TextArea("editor", new PropertyModel(this, "rawSLD")) );
        // force the id otherwise this blasted thing won't be usable from other forms
        editor.setMarkupId("editor");
        editor.setOutputMarkupId(true);
        editor.add(new EditAreaBehavior());
        styleForm.add(editor);
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.