Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.FormElement


     *
     * @return the generated form element
     */
    public static FormElement generateHiddenForm(String action, Method method, String target, Map<String, String> values) {

        FormElement formElement = Document.get().createFormElement();
        formElement.setMethod(method.name());
        if (ClientStringUtil.isNotEmptyOrWhitespaceOnly(target)) {
            formElement.setTarget(target);
        }
        formElement.setAction(action);
        for (Entry<String, String> input : values.entrySet()) {
            formElement.appendChild(createHiddenInput(input.getKey(), input.getValue()));
        }
        return formElement;
    }
View Full Code Here


        tab_title_input.focus();
      };
    })//
    .bind(Dialog.Event.close, new Function() {
      public void f(Element e) {
        FormElement form = $("form", dialog.elements()[0]).elements()[0].cast();
        form.reset();
      };
    });

    // addTab button: just opens the dialog
    $("#add_tab").as(Ui).button().click(new Function() {
View Full Code Here

        popup.removePadding();
        popup.addStyleName(I_LayoutBundle.INSTANCE.contentEditorCss().contentEditor());
        popup.setGlassEnabled(true);
        IFrame editorFrame = new IFrame(IFRAME_NAME, "");
        popup.add(editorFrame);
        final FormElement formElement = DomUtil.generateHiddenForm(dialogUri, Method.post, IFRAME_NAME, parameters);
        RootPanel.getBodyElement().appendChild(formElement);
        exportDialogFunctions(popup);
        popup.addCloseHandler(new CloseHandler<PopupPanel>() {

            public void onClose(CloseEvent<PopupPanel> event) {

                formElement.removeFromParent();
                removeExportedFunctions();
            }
        });
        if (closeHandler != null) {
            popup.addCloseHandler(closeHandler);
        }
        popup.center();
        formElement.submit();
        return popup;
    }
View Full Code Here

   }

   @Test
   public void createForm() {
      // Act
      FormElement elem = FormElement.as(DOM.createForm());

      // Assert
      assertEquals("form", elem.getTagName());
   }
View Full Code Here

   * iframe with the id {@link AbstractForm#ERRAI_FORM_FRAME_ID} with the
   * {@code action} set to the return value of
   * {@link AbstractForm#getFormAction()}.
   */
  public void submit() {
    final FormElement form = getFormElement();
    prepareFormForSubmission(form);
    form.submit();
  }
View Full Code Here

     *
     * @return the generated form element
     */
    public static FormElement generateHiddenForm(String action, Method method, String target, Map<String, String> values) {

        FormElement formElement = Document.get().createFormElement();
        formElement.setMethod(method.name());
        if (ClientStringUtil.isNotEmptyOrWhitespaceOnly(target)) {
            formElement.setTarget(target);
        }
        formElement.setAction(action);
        for (Entry<String, String> input : values.entrySet()) {
            formElement.appendChild(createHiddenInput(input.getKey(), input.getValue()));
        }
        return formElement;
    }
View Full Code Here

        data.put(FormBuilderGlobals.FORM_PANEL_KEY, panel);
        panel.setAction(this.action);
        panel.setEncoding(this.enctype);
        panel.setMethod(this.method);
        FlowPanel flow = new FlowPanel();
        FormElement el = FormElement.as(panel.getElement());
        el.setName(this.name);
        flow.add(new HTML("<!-- process name: " + getProcessId() + ", task name: " + getTaskId() + " -->"));
        for (FBFormItem item : getItems()) {
            flow.add(item.cloneDisplay(data));
        }
        panel.addSubmitHandler(new SubmitHandler() {
View Full Code Here

     *
     * @return the generated form element
     */
    public static FormElement generateHiddenForm(String action, Method method, String target, Map<String, String> values) {

        FormElement formElement = Document.get().createFormElement();
        formElement.setMethod(method.name());
        if (ClientStringUtil.isNotEmptyOrWhitespaceOnly(target)) {
            formElement.setTarget(target);
        }
        formElement.setAction(action);
        for (Entry<String, String> input : values.entrySet()) {
            formElement.appendChild(createHiddenInput(input.getKey(), input.getValue()));
        }
        return formElement;
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.FormElement

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.