本文整理汇总了Java中org.apache.wicket.markup.html.form.TextArea类的典型用法代码示例。如果您正苦于以下问题:Java TextArea类的具体用法?Java TextArea怎么用?Java TextArea使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextArea类属于org.apache.wicket.markup.html.form包,在下文中一共展示了TextArea类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addExcludesPatternFields
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
private void addExcludesPatternFields(StringResourceModel helpMessage,
final List<CommonPathPattern> includesExcludesSuggestions) {
TextArea excludesTa = new TextArea("excludesPattern");
excludesTa.setEnabled(isSystemAdmin());
excludesTa.setOutputMarkupId(true);
add(excludesTa);
add(new HelpBubble("excludesHelp", helpMessage));
//Excludes suggestions
Model<CommonPathPattern> exclude = new Model<>();
DropDownChoice<CommonPathPattern> excludesSuggest = new DropDownChoice<>(
"excludesSuggest", exclude, includesExcludesSuggestions);
if (!includesExcludesSuggestions.isEmpty()) {
excludesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
}
excludesSuggest.add(new UpdatePatternsBehavior(exclude, excludesTa));
excludesSuggest.setEnabled(isSystemAdmin());
add(excludesSuggest);
}
示例2: PostmanConvertPanel
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的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: initLayout
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
protected void initLayout(NonEmptyModel<Boolean> readOnlyModel) {
TextArea<String> description = new TextArea<>(ID_DESCRIPTION,
new PropertyModel<String>(getModel(), SearchFilterType.F_DESCRIPTION.getLocalPart()));
description.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
add(description);
AceEditor clause = new AceEditor(ID_FILTER_CLAUSE, clauseStringModel);
clause.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
add(clause);
AjaxSubmitLink update = new AjaxSubmitLink(ID_BUTTON_UPDATE) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
updateClausePerformed(target);
}
};
update.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
add(update);
Label clauseTooltip = new Label(ID_T_CLAUSE);
clauseTooltip.add(new InfoTooltipBehavior());
add(clauseTooltip);
}
示例4: initLayout
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
private void initLayout() {
WebMarkupContainer objectTypeContainer = new WebMarkupContainer(ID_OBJECT_TYPE_CONTAINER);
Label objectType = new Label(ID_OBJECT_TYPE, new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
final String key = getModelObject().getObjectTypeKey();
return key != null ? getString(key) : null;
}
});
objectTypeContainer.add(objectType);
add(objectTypeContainer);
WebMarkupContainer objectQueryContainer = new WebMarkupContainer(ID_OBJECT_QUERY_CONTAINER);
TextArea objectQuery = new TextArea<>(ID_OBJECT_QUERY, new PropertyModel<>(getModel(), QueryBasedHandlerDto.F_OBJECT_QUERY));
objectQuery.setEnabled(false);
objectQueryContainer.add(objectQuery);
add(objectQueryContainer);
}
示例5: buildTextFields
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
private void buildTextFields() {
this.transformationRuleNameTextField = new TextField<String>("transformationRuleNameTextField", new PropertyModel<String>(this, "transformationRuleName"));
this.transformationRuleNameTextField.setOutputMarkupId(true);
this.layoutForm.add(this.transformationRuleNameTextField);
final List<String> eventTypes = EapEventType.getAllTypeNames();
this.eventTypeDropDownChoice = new DropDownChoice<String>("eventTypeDropDownChoice", new PropertyModel<String>(this, "selectedEventTypeName"), eventTypes);
this.eventTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(final AjaxRequestTarget target) {
BasicTransformationRuleEditorPanel.this.updateOnChangeOfDropDownChoice(target);
}
});
this.layoutForm.add(this.eventTypeDropDownChoice);
this.transformationRuleTextArea = new TextArea<String>("transformationRuleTextArea", new PropertyModel<String>(this, "transformationRule"));
this.transformationRuleTextArea.setOutputMarkupId(true);
this.layoutForm.add(this.transformationRuleTextArea);
}
示例6: AutosizePage
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
public AutosizePage(PageParameters parameters) {
super(parameters);
addBreadCrumbElement(new BreadCrumbElement(new ResourceModel("widgets.menu.autosize"), AutosizePage.linkDescriptor()));
TextArea<String> defaultBehavior = new TextArea<String>("defaultBehavior");
defaultBehavior.add(new AutosizeBehavior());
add(defaultBehavior);
TextArea<String> withMaxHeight = new TextArea<String>("withMaxHeight");
withMaxHeight.add(new AutosizeBehavior());
add(withMaxHeight);
MultiLineLabel multiLineLabel = new MultiLineLabel("multiLineLabel", new ResourceModel("widgets.autosize.more.text"));
multiLineLabel.add(new MoreBehavior());
add(multiLineLabel);
}
示例7: ConfigForm
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的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));
}
示例8: LdapForm
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的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));
}
示例9: TagEditorPanel
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的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));
}
示例10: createEditShowInformationComponent
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的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();
}
示例11: addIncludesPatternFields
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
private void addIncludesPatternFields(StringResourceModel helpMessage,
final List<CommonPathPattern> includesExcludesSuggestions) {
TextArea includesTa = new TextArea("includesPattern");
includesTa.setEnabled(isSystemAdmin());
includesTa.setOutputMarkupId(true);
add(includesTa);
add(new HelpBubble("includesHelp", helpMessage));
Model<CommonPathPattern> include = new Model<>();
DropDownChoice<CommonPathPattern> includesSuggest = new DropDownChoice<>(
"includesSuggest", include, includesExcludesSuggestions);
if (!includesExcludesSuggestions.isEmpty()) {
includesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
}
includesSuggest.add(new UpdatePatternsBehavior(include, includesTa));
if (parent.isCreate()) {
includesSuggest.setDefaultModelObject(CommonPathPattern.ANY);
}
includesSuggest.setEnabled(isSystemAdmin());
add(includesSuggest);
}
示例12: RepoGeneralSettingsPanel
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
public RepoGeneralSettingsPanel(String id) {
super(id);
// Repository description
add(new TextArea("description"));
add(new SchemaHelpBubble("description.help"));
add(new TextArea("notes"));
add(new SchemaHelpBubble("notes.help"));
add(new TextArea("includesPattern"));
add(new SchemaHelpBubble("includesPattern.help"));
add(new TextArea("excludesPattern"));
add(new SchemaHelpBubble("excludesPattern.help"));
}
示例13: RDFManagementPage
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
public RDFManagementPage(PageParameters pageParameters) {
super(pageParameters);
add(newWriteModelButton());
add(newReadModelButton());
add(newOutputModelButton());
sparqlEditor = new TextArea<>("sparqleditor", Model.of(""));
sparqlEditor.setModelObject("SELECT ?s WHERE { ?s a <http://eu.uqasar.model.user/User> }");
add(sparqlEditor);
add(newExecSparqlQueryButton());
queryResultLabel = new Label("queryResultLabel", Model.of(""));
queryResultLabel.setOutputMarkupId(true);
add(queryResultLabel);
}
示例14: JsonDiffPanel
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
public JsonDiffPanel(
final BaseModal<String> modal,
final IModel<String> first,
final IModel<String> second,
final PageReference pageRef) {
super(modal, pageRef);
this.second = second;
this.first = first;
TextArea<String> jsonEditorInfoDefArea1 = new TextArea<>("jsonEditorInfo1", this.first);
TextArea<String> jsonEditorInfoDefArea2 = new TextArea<>("jsonEditorInfo2", this.second);
jsonEditorInfoDefArea1.setMarkupId("jsonEditorInfo1").setOutputMarkupPlaceholderTag(true);
jsonEditorInfoDefArea2.setMarkupId("jsonEditorInfo2").setOutputMarkupPlaceholderTag(true);
add(jsonEditorInfoDefArea1);
add(jsonEditorInfoDefArea2);
}
示例15: TextAreaControl
import org.apache.wicket.markup.html.form.TextArea; //导入依赖的package包/类
public TextAreaControl(String id, IModel<String> model) {
super(id, model);
textArea = new TextArea<String>("field", new DelegateModel<String>(this)) {
@Override
public boolean isRequired() {
return TextAreaControl.this.isRequired();
}
};
add(textArea);
textArea.setType(String.class);
textArea.setOutputMarkupId(true);
textArea.add(new AttributeModifier("rows", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return "" + rows;
}
}));
}