本文整理匯總了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);
}
示例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.";
}
示例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"));
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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);
}
示例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 );
}
示例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));
}
示例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);
}
示例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;
});
}
示例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());
}
示例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();
}
示例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);
}