本文整理汇总了Java中org.apache.wicket.markup.html.form.TextArea.setLabel方法的典型用法代码示例。如果您正苦于以下问题:Java TextArea.setLabel方法的具体用法?Java TextArea.setLabel怎么用?Java TextArea.setLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.html.form.TextArea
的用法示例。
在下文中一共展示了TextArea.setLabel方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WidgetTextArea
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
public WidgetTextArea(String id, Map<String, Object> object, FieldController widget, Map<String, Object> components) {
super(id);
this.widget = widget;
Label label = new Label("label", this.widget.getTextArea().label());
add(label);
TextArea<?> textArea = (TextArea<?>) components.get(widget.getName());
add(textArea);
textArea.setLabel(new Model<String>(this.widget.getTextArea().label()));
if (this.widget.getNotNull() != null) {
textArea.setRequired(true);
}
InputFeedback feedback = new InputFeedback("feedback", textArea);
add(feedback);
}
示例2: initBasicComponents
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
protected void initBasicComponents() {
add(new Label("subject", getString("ActionContributor.Run.destination.subject")));
TextField<String> subjectField = new TextField<String>("subjectField", new PropertyModel<String>(destination,
"mailSubject"));
subjectField.setLabel(new Model<String>(getString("ActionContributor.Run.destination.subject")));
add(subjectField);
add(new Label("body", getString("ActionContributor.Run.destination.body")));
TextArea<String> bodyArea = new TextArea<String>("bodyArea", new PropertyModel<String>(destination, "mailBody"));
bodyArea.setLabel(new Model<String>(getString("ActionContributor.Run.destination.body")));
add(bodyArea);
add(new Label("to", getString("ActionContributor.Run.destination.to")));
addTableLinks();
provider = new RecipientDataProvider((SmtpDestination) destination);
recipientsPanel = new RecipientsPanel("recipientsPanel", provider);
add(recipientsPanel);
}
示例3: init
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void init() {
// Scheduler Batch is shown only for NEXT REPORTS
if (!ReportConstants.NEXT.equals(schedulerJob.getReport().getType())) {
return;
}
Label parameter = new Label("parameter", getString("ActionContributor.Run.batch.parameter"));
add(parameter);
ro.nextreports.engine.Report report = NextUtil.getNextReport(storageService.getSettings(), schedulerJob.getReport());
Map<String, QueryParameter> paramMap = ParameterUtil.getUsedNotHiddenParametersMap(report);
List<String> parameters = new ArrayList<String>();
for (QueryParameter qp : paramMap.values()) {
if (qp.getSelection().equals(QueryParameter.SINGLE_SELECTION) && (qp.getSource() != null)) {
parameters.add(qp.getName());
}
}
parameterChoice = new DropDownChoice<String>("parameterChoice",
new PropertyModel<String>(schedulerJob, "batchDefinition.parameter"), parameters);
parameterChoice.setNullValid(true);
add(parameterChoice);
add(new Label("dataQuery", getString("ActionContributor.Run.batch.dataQuery")));
TextArea<String> dataQueryArea = new TextArea<String>("dataQueryArea", new PropertyModel<String>(schedulerJob, "batchDefinition.dataQuery"));
dataQueryArea.setLabel(new Model<String>(getString("ActionContributor.Run.batch.dataQuery")));
add(dataQueryArea);
add(new Label("infoDynamic", getString("ActionContributor.Run.batch.dynamic")));
add(new Label("infoDependent", getString("ActionContributor.Run.batch.dependent")));
}
示例4: initLayout
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize,
String textSize, boolean required, int rowNumber) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
textWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(textWrapper);
TextArea text = new TextArea<>(ID_TEXT, getModel());
text.add(new AttributeModifier("rows", rowNumber));
text.setOutputMarkupId(true);
text.setRequired(required);
text.setLabel(label);
text.add(AttributeAppender.replace("placeholder", label));
textWrapper.add(text);
}
示例5: createAppForm
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void createAppForm() {
appForm = new Form<>("appForm", new CompoundPropertyModel<>(new FirstApplicationReleaseInfos()));
TextField<String> appLabel = new TextField<>("appLabel");
appLabel.setLabel(WicketUtils.getStringResourceModel(this, "portal.application.label.label"));
appLabel.add(new AbstractValidator<String>() {
@Override
protected void onValidate(IValidatable<String> iValidatable) {
if(!parentPage.isApplicationLabelUnique(iValidatable.getValue())) {
error(iValidatable);
}
}
@Override
protected String resourceKey() {
return "portal.application.label.non.unique";
}
@Override
protected Map<String, Object> variablesMap(IValidatable<String> stringIValidatable) {
Map<String, Object> map = super.variablesMap(stringIValidatable);
map.put("label", stringIValidatable.getValue());
return map;
}
});
appLabel.add(new PropertyValidator<>());
appForm.add(appLabel);
TextField<String> appCode = new TextField<>("appCode");
appCode.setLabel(WicketUtils.getStringResourceModel(this, "portal.application.code.label"));
appCode.add(new PropertyValidator<>());
appForm.add(appCode);
TextArea<String> appDescription = new TextArea<>("appDescription");
appDescription.setLabel(WicketUtils.getStringResourceModel(this, "portal.application.description.label"));
appDescription.add(new PropertyValidator<>());
appForm.add(appDescription);
RadioGroup<Boolean> appVisibility = new RadioGroup<>("appPublic");
appVisibility.add(new Radio<Boolean>("appVisibilityRadioGroup-public", new Model<>(Boolean.TRUE)));
appVisibility.add(new Radio<Boolean>("appVisibilityRadioGroup-private", new Model<>(Boolean.FALSE)));
appVisibility.add(new PropertyValidator<>());
appForm.add(appVisibility);
appForm.add(new CacheActivatedImage("imageHelp.visibilityField", new ResourceModel("image.help").getObject()));
TextField<String> members = new TextField<>("members");
members.add(new PropertyValidator<>());
appForm.add(members);
appForm.add(new CacheActivatedImage("imageHelp.membersField", new ResourceModel("image.help").getObject()));
releaseFiedsetPanel = new ReleaseFieldsetPanel("releaseFieldsetPanel", parentPage, manageApplicationRelease);
appForm.add(releaseFiedsetPanel);
createFormButtons(appForm);
// set default visibility to private
appForm.getModelObject().setAppPublic(Boolean.FALSE);
add(appForm);
}
示例6: initLayout
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize,
String textSize, boolean required, int rowNumber) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
textWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(textWrapper);
TextArea text = new TextArea<>(ID_TEXT, getModel());
text.add(new AttributeModifier("rows", rowNumber));
text.setOutputMarkupId(true);
text.setRequired(required);
text.setLabel(label);
text.add(AttributeAppender.replace("placeholder", label));
textWrapper.add(text);
}
示例7: createBody
import org.apache.wicket.markup.html.form.TextArea; //导入方法依赖的package包/类
@Override
protected Component createBody(String wicketId) {
DelegatedMarkupPanel body = new DelegatedMarkupPanel(wicketId, UserGroupFormPopupPanel.class);
userGroupForm = new Form<UserGroup>("form", getModel());
body.add(userGroupForm);
TextField<String> nameField = new RequiredTextField<String>("name", BindingModel.of(userGroupForm.getModel(),
Binding.userGroup().name()));
nameField.setLabel(new ResourceModel("administration.usergroup.field.name"));
userGroupForm.add(nameField);
TextArea<String> descriptionField = new TextArea<String>("description", BindingModel.of(userGroupForm.getModel(),
Binding.userGroup().description()));
descriptionField.setLabel(new ResourceModel("administration.usergroup.field.description"));
userGroupForm.add(descriptionField);
final CheckGroup<Authority> authorityCheckGroup = new CheckGroup<Authority>("authoritiesGroup",
BindingModel.of(userGroupForm.getModel(), Binding.userGroup().authorities()), Suppliers2.<Authority>hashSet());
userGroupForm.add(authorityCheckGroup);
ListView<Authority> authoritiesListView = new ListView<Authority>("authorities",
Model.ofList(authorityUtils.getPublicAuthorities())) {
private static final long serialVersionUID = -7557232825932251026L;
@Override
protected void populateItem(ListItem<Authority> item) {
Authority authority = item.getModelObject();
Check<Authority> authorityCheck = new Check<Authority>("authorityCheck",
new GenericEntityModel<Long, Authority>(authority));
authorityCheck.setLabel(new ResourceModel("administration.usergroup.authority." + authority.getName()));
authorityCheckGroup.add(authorityCheck);
item.add(authorityCheck);
}
};
authorityCheckGroup.add(authoritiesListView);
return body;
}