當前位置: 首頁>>代碼示例>>Java>>正文


Java Form.setMultiPart方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.html.form.Form.setMultiPart方法的典型用法代碼示例。如果您正苦於以下問題:Java Form.setMultiPart方法的具體用法?Java Form.setMultiPart怎麽用?Java Form.setMultiPart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.html.form.Form的用法示例。


在下文中一共展示了Form.setMultiPart方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initLayout

import org.apache.wicket.markup.html.form.Form; //導入方法依賴的package包/類
private void initLayout() {
	Form mainForm = new Form("mainForm");
	mainForm.setMultiPart(true);
	add(mainForm);

	mainForm.add(new ScenePanel(ID_PRIMARY_DELTAS_SCENE, primaryDeltasModel));
	mainForm.add(new ScenePanel(ID_SECONDARY_DELTAS_SCENE, secondaryDeltasModel));

	WebMarkupContainer policyViolationsContainer = new WebMarkupContainer(ID_POLICY_VIOLATIONS_CONTAINER);
	policyViolationsContainer.add(new VisibleBehaviour(() -> !policyViolationsModel.getObject().getPart().isEmpty()));
	policyViolationsContainer.add(new InformationPanel(ID_POLICY_VIOLATIONS, policyViolationsModel));
	mainForm.add(policyViolationsContainer);

	WebMarkupContainer approvalsContainer = new WebMarkupContainer(ID_APPROVALS_CONTAINER);
	approvalsContainer.add(new VisibleBehaviour(() -> !approvalsModel.getObject().isEmpty()));
	approvalsContainer.add(new ApprovalProcessesPreviewPanel(ID_APPROVALS, approvalsModel));
	mainForm.add(approvalsContainer);

	initButtons(mainForm);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:21,代碼來源:PagePreviewChanges.java

示例2: initLayout

import org.apache.wicket.markup.html.form.Form; //導入方法依賴的package包/類
private void initLayout() {
    Form mainForm = new Form("mainForm");
    mainForm.setMultiPart(true);
    add(mainForm);

    WebMarkupContainer protectedMessage = new WebMarkupContainer(ID_PROTECTED_MESSAGE);
    protectedMessage.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            ObjectWrapper wrapper = accountModel.getObject();
            return wrapper.isProtectedAccount();
        }
    });
    mainForm.add(protectedMessage);

    PrismObjectPanel<ShadowType> userForm = new PrismObjectPanel<ShadowType>("account", accountModel, new PackageResourceReference(
            ImgResources.class, ImgResources.HDD_PRISM), mainForm, this);
    mainForm.add(userForm);

    initButtons(mainForm);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:23,代碼來源:PageAccount.java

示例3: initLayout

import org.apache.wicket.markup.html.form.Form; //導入方法依賴的package包/類
private void initLayout() {
    WorkItemSummaryPanel summaryPanel = new WorkItemSummaryPanel(ID_SUMMARY_PANEL,
            new PropertyModel<>(workItemDtoModel, WorkItemDto.F_WORK_ITEM), workItemDtoModel, this);
    add(summaryPanel);

    Form mainForm = new Form(ID_MAIN_FORM);
    mainForm.setMultiPart(true);
    add(mainForm);

    mainForm.add(new WorkItemPanel(ID_WORK_ITEM_PANEL, workItemDtoModel, mainForm, this));

    initButtons(mainForm);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:14,代碼來源:PageWorkItem.java

示例4: onInitialize

import org.apache.wicket.markup.html.form.Form; //導入方法依賴的package包/類
@Override
protected void onInitialize() {
    super.onInitialize();
    final RI requirement = loadRequirement();

    currentModel = $m.loadable(() -> requirement != null && requirement.getCod() != null ? requirementService.getRequirement(requirement.getCod()) : requirement);
    currentModel.setObject(requirement);

    fillTransitionControllerMap(transitionControllerMap);
    SingularSpringInjector.get().injectAll(transitionControllerMap.values());
    SingularSpringInjector.get().injectAll(transitionConfirmModalMap.values());

    singularFormPanel.setViewMode(getViewMode(config));
    singularFormPanel.setAnnotationMode(getAnnotationMode(config));
    singularFormPanel.setInstanceCreator(() -> createInstance(formRequirementService.loadRefType(config.getFormName())));

    Form<?> form = new Form<>("save-form");
    form.setMultiPart(true);
    form.add(singularFormPanel);
    form.add(modalContainer);
    BSModalBorder enviarModal = buildConfirmationModal(modalContainer, getInstanceModel());
    form.add(buildSendButton(enviarModal));
    form.add(buildSaveButton());
    form.add(buildFlowButtons());
    form.add(buildValidateButton());
    form.add(buildExtensionButtons());
    form.add(buildCloseButton());
    form.add(closeModal);
    form.add(buildExtraContent("extra-content"));
    add(form);
}
 
開發者ID:opensingular,項目名稱:singular-server,代碼行數:32,代碼來源:AbstractFormPage.java

示例5: ExportImportDependenciesPanel

import org.apache.wicket.markup.html.form.Form; //導入方法依賴的package包/類
/**
 * Constructor for the import/export dependencies panel. The page is initialized in this method,
 * including the event type dropdown and export button and the upload for importing.
 *
 * @param id initialized ID
 * @param page the page the panel belongs to
 */
ExportImportDependenciesPanel(String id, final GeneratorPage page) {
    super(id);
    this.page = page;
    exportForm = new Form("exportForm");
    this.add(exportForm);
    importForm = new Form("importForm") {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit() {
            final FileUpload uploadedFile = uploadField.getFileUpload();
            if (uploadedFile == null) {
                this.error("File not found.");
                return;
            }
            // make sure provided file is json
            final String fileName = uploadedFile.getClientFileName();
            String fileFormat = fileName.substring(fileName.lastIndexOf('.') + 1);
            if (!"json".equals(fileFormat)) {
                error("Please provide a json file.");
                return;
            }
            // generate dependencies from file
            File newFile;
            try {
                newFile = uploadedFile.writeToTempFile();
                String fileContent = Files.readFirstLine(newFile, Charset.defaultCharset());
                boolean success = JsonImporter.generateAttributeDependenciesFromString(fileContent);
                if (!success) {
                    error("Dependencies could not be created. "
                            + "Make sure you have the correct event type stored and the attribute values match their type.");
                    return;
                }
            } catch (Exception e) {
                logger.warn("File could not be read.", e);
                return;
            }
            success("Saved attribute dependencies.");
        }
    };
    importForm.setMultiPart(true);
    this.add(importForm);

    this.addEventTypeDropDown();
    this.addExportButton();
    this.addImportField();
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:55,代碼來源:ExportImportDependenciesPanel.java


注:本文中的org.apache.wicket.markup.html.form.Form.setMultiPart方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。