com.vaadin.polymer.iron.element.IronFormElement Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from iron-form project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.iron.element;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.js.JsProperty;
import com.google.gwt.core.client.js.JsType;
/**
* `<iron-form>
is an HTML <form>
element that can validate and submit any custom
elements that implement Polymer.IronFormElementBehavior
, as well as any
native HTML elements.
* It supports both get
and post
methods, and uses an iron-ajax
element to
submit the form data to the action URL.
* Example:
* <form is="iron-form" id="form" method="post" action="/form/handler">
* <paper-input name="name" label="name"></paper-input>
* <input name="address">
* ...
* </form>
*
*
*
By default, a native <button>
element will submit this form. However, if you
want to submit it from a custom element’s click handler, you need to explicitly
call the form’s submit
method.
* Example:
* <paper-button raised onclick="submitForm()">Submit</paper-button>
*
* function submitForm() {
* document.getElementById('form').submit();
* }
*
*
*
*/
@JsType
public interface IronFormElement extends HTMLElement {
public static final String TAG = "iron-form";
public static final String SRC = "iron-form/iron-form.html";
/**
* Content type to use when sending data.
*
* JavaScript Info:
* @property contentType
* @type String
*
*/
@JsProperty String getContentType();
/**
* Content type to use when sending data.
*
* JavaScript Info:
* @property contentType
* @type String
*
*/
@JsProperty void setContentType(String value);
/**
* By default, the form will display the browser’s native validation
UI (i.e. popup bubbles and invalid styles on invalid fields). You can
manually disable this; however, if you do, note that you will have to
manually style invalid native HTML fields yourself, as you are
explicitly preventing the native form from doing so.
*
* JavaScript Info:
* @property disableNativeValidationUi
* @type Boolean
*
*/
@JsProperty boolean getDisableNativeValidationUi();
/**
* By default, the form will display the browser’s native validation
UI (i.e. popup bubbles and invalid styles on invalid fields). You can
manually disable this; however, if you do, note that you will have to
manually style invalid native HTML fields yourself, as you are
explicitly preventing the native form from doing so.
*
* JavaScript Info:
* @property disableNativeValidationUi
* @type Boolean
*
*/
@JsProperty void setDisableNativeValidationUi(boolean value);
/**
* Returns a json object containing name/value pairs for all the registered
custom components and native elements of the form. If there are elements
with duplicate names, then their values will get aggregated into an
array of values.
*
* JavaScript Info:
* @method serialize
*
*/
void serialize();
/**
* Called to submit the form.
*
* JavaScript Info:
* @method submit
*
*/
void submit();
/**
*
*
* JavaScript Info:
* @property extends
* @type string
*
*/
@JsProperty String getExtends();
/**
*
*
* JavaScript Info:
* @property extends
* @type string
*
*/
@JsProperty void setExtends(String value);
/**
* Fired after the form is submitted and an error is received.
*
* JavaScript Info:
* @property listeners
* @type Object
*
*/
@JsProperty JavaScriptObject getListeners();
/**
* Fired after the form is submitted and an error is received.
*
* JavaScript Info:
* @property listeners
* @type Object
*
*/
@JsProperty void setListeners(JavaScriptObject value);
}