当前位置: 首页>>代码示例>>Java>>正文


Java CompoundPropertyModel类代码示例

本文整理汇总了Java中org.apache.wicket.model.CompoundPropertyModel的典型用法代码示例。如果您正苦于以下问题:Java CompoundPropertyModel类的具体用法?Java CompoundPropertyModel怎么用?Java CompoundPropertyModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CompoundPropertyModel类属于org.apache.wicket.model包,在下文中一共展示了CompoundPropertyModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addUrlForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
private void addUrlForm() {
  urlForm = new Form<SeedUrl>("urlForm", CompoundPropertyModel.of(Model
      .of(new SeedUrl())));
  urlForm.setOutputMarkupId(true);
  urlForm.add(new TextField<String>("url"));
  urlForm.add(new AjaxSubmitLink("addUrl", urlForm) {
    @Override
    protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
      addSeedUrl();
      urlForm.setModelObject(new SeedUrl());
      target.add(urlForm);
      target.add(seedUrlsTable);
    }
  });
  add(urlForm);
}
 
开发者ID:jorcox,项目名称:GeoCrawler,代码行数:17,代码来源:SeedPage.java

示例2: PostmanConvertPanel

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public PostmanConvertPanel(String id) {
    super(id);
    setDefaultModel(new CompoundPropertyModel(this));
    Form form = new Form("form") {
        @Override
        protected void onSubmit() {
            logger.debug("text is: {}", text);
            List<PostmanRequest> requests = ConvertUtils.readPostmanJson(text);
            String feature = ConvertUtils.toKarateFeature(requests);
            KarateSession session = service.createSession("dev", feature);
            setResponsePage(new FeaturePage(session.getId()));
        }
    };
    form.add(new TextArea("text"));
    add(form);
    add(new FeedbackPanel("feedback"));
    text = "Paste your postman collection here.";
}
 
开发者ID:intuit,项目名称:karate,代码行数:19,代码来源:PostmanConvertPanel.java

示例3: addFacetValue

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
/**
 * Adds an individual facet value selection link to a dataview item
 *
 * @param item item to add link to
 */
private void addFacetValue(String id, final ListItem<Count> item) {
    item.setDefaultModel(new CompoundPropertyModel<>(item.getModel()));

    // link to select an individual facet value
    final Link selectLink = new IndicatingAjaxFallbackLink(id) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            // reset filter
            ((NameAndCountFieldValuesFilter) filterModel.getObject()).setName(null);

            // call callback
            onValuesSelected(
                    // for now only single values can be selected
                    Collections.singleton(item.getModelObject().getName()),
                    target);
        }
    };
    item.add(selectLink);

    // 'name' field from Count (name of value)
    selectLink.add(new FieldValueLabel("name", fieldNameModel));
    // 'count' field from Count (document count for value)
    selectLink.add(new Label("count"));
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:31,代码来源:FacetValuesPanel.java

示例4: LoginForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public LoginForm(String markupId) {
    super(markupId);
    this.setDefaultModel(new CompoundPropertyModel<Object>(this));

    this.add(new TextField("username").setRequired(true));
    this.add(new PasswordTextField("password").setRequired(true));

    Button submitBtn = new AjaxButton("loginBtn", Model.of("Sign In")) {
        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            if (AuthenticatedWebSession.get().signIn(username, password))
                setResponsePage(DiscoverItemsPage.class);
            else {
                target.add(ComponentUtils.displayBlock(alert));
            }
        }
    };
    this.add(submitBtn);
    this.setDefaultButton(submitBtn);
}
 
开发者ID:citlab,项目名称:Intercloud,代码行数:21,代码来源:LoginPanel.java

示例5: EmailForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public EmailForm(String id, final WebMarkupContainer list, MailMessage m) {
	super(id, new CompoundPropertyModel<>(m));
	this.list = list;
	add(status = new Label("status", Model.of("")));
	add(new Label("subject"));
	add(new Label("recipients"));
	add(new Label("body").setEscapeModelStrings(false));
	add(new DateLabel("inserted"));
	add(new DateLabel("updated"));
	add(new Label("errorCount"));
	add(new Label("lastError"));
	add(reset = new AjaxButton("reset") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onSubmit(AjaxRequestTarget target) {
			getBean(MailMessageDao.class).resetSendingStatus(EmailForm.this.getModelObject().getId());
			target.add(list);
		}
	});
	reset.setEnabled(false);
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:23,代码来源:EmailForm.java

示例6: ConfigForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public ConfigForm(String id, WebMarkupContainer listContainer, Configuration configuration) {
	super(id, new CompoundPropertyModel<>(configuration));
	setOutputMarkupId(true);
	this.listContainer = listContainer;
	valueS = new TextField<>("valueS");
	valueN = new TextField<Long>("valueN") {
		private static final long serialVersionUID = 1L;

		@Override
		protected String[] getInputTypes() {
			return new String[] {"number"};
		}
	};
	valueB = new CheckBox("valueB");
	add(new DateLabel("updated"));
	add(new Label("user.login"));
	add(new TextArea<String>("comment"));
	update(null);

	// attach an ajax validation behavior to all form component's keydown
	// event and throttle it down to once per second
	add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND));
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:24,代码来源:ConfigForm.java

示例7: LdapForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public LdapForm(String id, WebMarkupContainer listContainer, final LdapConfig ldapConfig) {
	super(id, new CompoundPropertyModel<>(ldapConfig));
	setOutputMarkupId(true);
	this.listContainer = listContainer;

	add(new CheckBox("active"));
	add(new DateLabel("inserted"));
	add(new Label("insertedby.login"));
	add(new DateLabel("updated"));
	add(new Label("updatedby.login"));
	add(new CheckBox("addDomainToUserName"));
	add(new TextField<String>("domain"));
	add(new TextArea<String>("comment"));

	// attach an ajax validation behavior to all form component's keydown
	// event and throttle it down to once per second
	add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND));
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:19,代码来源:LdapForm.java

示例8: InstallWizard

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public InstallWizard(String id, String title) {
	super(id, title, new CompoundPropertyModel<>(new InstallationConfig()), true);
	setTitle(Model.of(getModelObject().getAppName()));
	welcomeStep = new WelcomeStep();
	dbStep = new DbStep();
	paramsStep1 = new ParamsStep1();
	paramsStep2 = new ParamsStep2();
	paramsStep3 = new ParamsStep3();
	paramsStep4 = new ParamsStep4();
	installStep = new InstallStep();

	DynamicWizardModel wmodel = new DynamicWizardModel(welcomeStep);
	wmodel.setCancelVisible(false);
	wmodel.setLastVisible(true);
	init(wmodel);
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:17,代码来源:InstallWizard.java

示例9: RoleDetailPanel

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public RoleDetailPanel( String id, Displayable display, final boolean isAdmin )
{
    super( id );
    this.isAdmin = isAdmin;
    this.adminMgr.setAdmin( SecUtils.getSession( this ) );
    this.delAdminMgr.setAdmin( SecUtils.getSession( this ) );
    if ( isAdmin )
    {
        this.objName = GlobalIds.DEL_ADMIN_MGR;
        this.editForm = new RoleDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<>(
            new AdminRole() ) );
    }
    else
    {
        this.objName = GlobalIds.ADMIN_MGR;
        this.editForm = new RoleDetailForm( GlobalIds.EDIT_FIELDS, new CompoundPropertyModel<>( new Role() ) );
    }

    this.display = display;
    add( editForm );
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:22,代码来源:RoleDetailPanel.java

示例10: TagEditorPanel

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public TagEditorPanel(String aId, IModel<TagSet> aTagSet, IModel<Tag> aTag)
{
    super(aId, aTag);
    
    setOutputMarkupId(true);
    setOutputMarkupPlaceholderTag(true);
    
    selectedTagSet = aTagSet;
    selectedTag = aTag;
    
    Form<Tag> form = new Form<>("form", CompoundPropertyModel.of(aTag));
    add(form);
    
    form.add(new TextField<String>("name")
            .add(new TagExistsValidator())
            .setRequired(true));
    form.add(new TextArea<String>("description"));
    
    form.add(new LambdaAjaxButton<>("save", this::actionSave));
    form.add(new LambdaAjaxLink("delete", this::actionDelete)
            .onConfigure(_this -> _this.setVisible(form.getModelObject().getId() != 0)));
    form.add(new LambdaAjaxLink("cancel", this::actionCancel));
}
 
开发者ID:webanno,项目名称:webanno,代码行数:24,代码来源:TagEditorPanel.java

示例11: TagSetImportPanel

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public TagSetImportPanel(String aId, IModel<Project> aModel, IModel<TagSet> aTagSet)
{
    super(aId);
    
    setOutputMarkupId(true);
    setOutputMarkupPlaceholderTag(true);
    
    preferences = Model.of(new Preferences());
    selectedProject = aModel;
    selectedTagSet = aTagSet;
    
    Form<Preferences> form = new Form<>("form", CompoundPropertyModel.of(preferences));
    form.add(new DropDownChoice<>("format", LambdaModel.of(this::supportedFormats)));
    form.add(new CheckBox("overwrite"));
    form.add(fileUpload = new FileUploadField("content", new ListModel<>()));
    fileUpload.setRequired(true);
    form.add(new LambdaAjaxButton<>("import", this::actionImport));
    add(form);
}
 
开发者ID:webanno,项目名称:webanno,代码行数:20,代码来源:TagSetImportPanel.java

示例12: ConfirmationDialog

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
public ConfirmationDialog(String aId, IModel<String> aTitle, IModel<String> aContent)
{
    super(aId);
    
    titleModel = aTitle;
    contentModel = aContent;
    
    setOutputMarkupId(true);
    setInitialWidth(620);
    setInitialHeight(440);
    setResizable(true);
    setWidthUnit("px");
    setHeightUnit("px");
    setCssClassName("w_blue w_flex");
    showUnloadConfirmation(false);
    
    setModel(new CompoundPropertyModel<>(null));
    
    setContent(contentPanel = new ContentPanel(getContentId(), getModel()));
    
    setCloseButtonCallback((_target) -> {
        onCancelInternal(_target);
        return true;
    });
}
 
开发者ID:webanno,项目名称:webanno,代码行数:26,代码来源:ConfirmationDialog.java

示例13: AnnotationFeatureForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
AnnotationFeatureForm(AnnotationDetailEditorPanel aEditorPanel, String id,
    IModel<AnnotatorState> aBModel)
{
    super(id, new CompoundPropertyModel<>(aBModel));
    editorPanel = aEditorPanel;
    add(forwardAnnotationText = createForwardAnnotationTextField());
    add(createForwardAnnotationCheckBox());
    add(createNoAnnotationWarningLabel());
    add(deleteAnnotationDialog = createDeleteDialog());
    add(replaceAnnotationDialog = createReplaceDialog());
    add(createDeleteButton());
    add(createReverseButton());
    add(createClearButton());
    add(relationHint = createRelationHint());
    add(layerSelector = createDefaultAnnotationLayerSelector());
    add(featureEditorPanel = createFeatureEditorPanel());
}
 
开发者ID:webanno,项目名称:webanno,代码行数:18,代码来源:AnnotationFeatureForm.java

示例14: createEditShowInformationComponent

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
private void createEditShowInformationComponent(IModel<ApplicationRelease> model) {

        releaseForm = new Form<>("releaseForm");
        releaseForm.setDefaultModel(new CompoundPropertyModel<ApplicationRelease>(model));

        version = new TextField<>("releaseVersion");
        version.setLabel(new StringResourceModel("portal.release.version.label",null));
        version.add(new PropertyValidator<>());
        releaseForm.add(version);

        description = new TextArea<>("description");
        description.setLabel(new StringResourceModel("portal.release.description.label", null));
        description.add(new PropertyValidator<>());
        releaseForm.add(description);

        middlewareProfileVersion = new TextField<>("middlewareProfileVersion");
        middlewareProfileVersion.setLabel(new StringResourceModel("portal.release.middlewareProfileVersion.label", null));
        middlewareProfileVersion.setEnabled(false);
        middlewareProfileVersion.add(new PropertyValidator<>());
        releaseForm.add(middlewareProfileVersion);

        add(releaseForm);
        createButtons();
        manageButtonsVisibility();
        updateEditableInput();
    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:27,代码来源:ReleaseInformationPanel.java

示例15: createReleaseForm

import org.apache.wicket.model.CompoundPropertyModel; //导入依赖的package包/类
private void createReleaseForm() {

        ApplicationRelease release = new ApplicationRelease();
        if (app != null) {
            release.setApplication(app);
        }

        releaseForm = new Form<>("releaseForm", new CompoundPropertyModel<ApplicationRelease>(release));

        // if no app is selected then show the drop down
        boolean showSelectedApp = (app == null);
        releaseFieldsetPanel = new ReleaseFieldsetPanel("releaseFieldsetPanel", parentPage, app,
                manageApplication, manageApplicationRelease, showSelectedApp);
        releaseForm.add(releaseFieldsetPanel);

        createFormButtons(releaseForm, releaseFieldsetPanel);

		add(releaseForm);

	}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:21,代码来源:ReleaseCreatePanel.java


注:本文中的org.apache.wicket.model.CompoundPropertyModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。