本文整理汇总了Java中com.google.gwt.dom.client.FormElement类的典型用法代码示例。如果您正苦于以下问题:Java FormElement类的具体用法?Java FormElement怎么用?Java FormElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormElement类属于com.google.gwt.dom.client包,在下文中一共展示了FormElement类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onExportReport
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
/**
* Method executed on report export action.
*
* @param report
* The current report.
*/
private void onExportReport(final ProjectReportDTO report) {
final ServletUrlBuilder urlBuilder =
new ServletUrlBuilder(injector.getAuthenticationProvider(), injector.getPageManager(), Servlet.EXPORT, ServletMethod.EXPORT_REPORT);
urlBuilder.addParameter(RequestParameter.ID, report.getId());
urlBuilder.addParameter(RequestParameter.TYPE, ExportType.PROJECT_REPORT);
urlBuilder.addParameter(RequestParameter.FORMAT, ExportFormat.MS_WORD);
final FormElement form = FormElement.as(DOM.createForm());
form.setAction(urlBuilder.toString());
form.setTarget("_downloadFrame");
form.setMethod(Method.POST.name());
RootPanel.getBodyElement().appendChild(form);
form.submit();
form.removeFromParent();
}
示例2: addUtf8Charset
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
/**
* Sets the encoding of the provided form to UTF-8, see
* https://code.google.com/p/google-web-toolkit/issues/detail?id=4682 for
* details.
* @param form
*/
public void addUtf8Charset(final Form form) {
FormElement.as(form.getElement()).setAcceptCharset("UTF-8");
final Hidden field = new Hidden();
field.setName("utf8char");
field.setValue("\u8482");
form.add(field);
}
示例3: onExportContact
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
/**
* Method executed on export contact action.
*
* @param contact
* The contact to export.
*/
private void onExportContact(final ContactDTO contact) {
view.buildExportDialog(new ExportActionHandler() {
@Override
public void onExportContact(final boolean characteristicsField, final boolean allRelationsField, final boolean frameworkRelationsField, final boolean relationsByElementField) {
final ServletUrlBuilder urlBuilder =
new ServletUrlBuilder(injector.getAuthenticationProvider(), injector.getPageManager(), Servlet.EXPORT, ServletMethod.EXPORT_CONTACT);
urlBuilder.addParameter(RequestParameter.ID, contact.getId());
urlBuilder.addParameter(RequestParameter.WITH_CHARACTERISTICS, characteristicsField);
urlBuilder.addParameter(RequestParameter.WITH_ALL_RELATIONS, allRelationsField);
urlBuilder.addParameter(RequestParameter.WITH_FRAMEWORK_RELATIONS, frameworkRelationsField);
urlBuilder.addParameter(RequestParameter.WITH_RELATIONS_BY_ELEMENT, relationsByElementField);
final FormElement form = FormElement.as(DOM.createForm());
form.setAction(urlBuilder.toString());
form.setTarget("_downloadFrame");
form.setMethod(Method.POST.name());
RootPanel.getBodyElement().appendChild(form);
form.submit();
form.removeFromParent();
}
});
}
示例4: onExportContactRelationships
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
/**
* Method executed on export relationships action.
*
* @param contact
* The contact to export.
*/
private void onExportContactRelationships(final ContactDTO contact) {
view.buildExportDialog(new ExportActionHandler() {
@Override
public void onExportContactRelationships(final boolean characteristicsField, final boolean allRelationsField, final boolean frameworkRelationsField, final boolean relationsByElementField) {
final ServletUrlBuilder urlBuilder =
new ServletUrlBuilder(injector.getAuthenticationProvider(), injector.getPageManager(), ServletConstants.Servlet.EXPORT, ServletConstants.ServletMethod.EXPORT_CONTACT);
urlBuilder.addParameter(RequestParameter.ID, contact.getId());
urlBuilder.addParameter(RequestParameter.WITH_CHARACTERISTICS, characteristicsField);
urlBuilder.addParameter(RequestParameter.WITH_ALL_RELATIONS, allRelationsField);
urlBuilder.addParameter(RequestParameter.WITH_FRAMEWORK_RELATIONS, frameworkRelationsField);
urlBuilder.addParameter(RequestParameter.WITH_RELATIONS_BY_ELEMENT, relationsByElementField);
final FormElement form = FormElement.as(DOM.createForm());
form.setAction(urlBuilder.toString());
form.setTarget("_downloadFrame");
form.setMethod(FormPanel.Method.POST.name());
RootPanel.getBodyElement().appendChild(form);
form.submit();
form.removeFromParent();
}
});
}
示例5: onExportProject
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
/**
* Method executed on export project action.
*
* @param project
* The project to export.
*/
private void onExportProject(final ProjectDTO project) {
view.buildExportDialog(new ExportActionHandler() {
@Override
public void onExportProject(final Field<Boolean> indicatorField, final Field<Boolean> logFrameField, final Field<Boolean> contactsField) {
final ServletUrlBuilder urlBuilder =
new ServletUrlBuilder(injector.getAuthenticationProvider(), injector.getPageManager(), Servlet.EXPORT, ServletMethod.EXPORT_PROJECT);
final ExportType type;
if (indicatorField.getValue()) {
if (logFrameField.getValue()) {
type = ExportType.PROJECT_SYNTHESIS_LOGFRAME_INDICATORS;
} else {
type = ExportType.PROJECT_SYNTHESIS_INDICATORS;
}
} else {
if (logFrameField.getValue()) {
type = ExportType.PROJECT_SYNTHESIS_LOGFRAME;
} else {
type = ExportType.PROJECT_SYNTHESIS;
}
}
urlBuilder.addParameter(RequestParameter.ID, project.getId());
urlBuilder.addParameter(RequestParameter.TYPE, type);
urlBuilder.addParameter(RequestParameter.WITH_CONTACTS, contactsField.getValue());
final FormElement form = FormElement.as(DOM.createForm());
form.setAction(urlBuilder.toString());
form.setTarget("_downloadFrame");
form.setMethod(Method.POST.name());
RootPanel.getBodyElement().appendChild(form);
form.submit();
form.removeFromParent();
}
});
}
示例6: create
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
public static native FormDataOverlay create(FormElement formElement) /*-{
return new FormData(formElement);
}-*/;
示例7: FormData
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
private FormData(FormElement formElement) {
this.formElement = formElement;
this.params = null;
}
示例8: wrap
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
public static FormData wrap(FormElement formElement) {
return new FormData(formElement);
}
示例9: getFormElement
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
public FormElement getFormElement() {
return formElement;
}
示例10: getFormElement
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
FormElement getFormElement() {
return FormElement.as(getElement());
}
示例11: onWrappingPostButtonClick
import com.google.gwt.dom.client.FormElement; //导入依赖的package包/类
void onWrappingPostButtonClick(FormElement formElement);