本文整理汇总了Java中org.apache.wicket.markup.repeater.Item.getModel方法的典型用法代码示例。如果您正苦于以下问题:Java Item.getModel方法的具体用法?Java Item.getModel怎么用?Java Item.getModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.repeater.Item
的用法示例。
在下文中一共展示了Item.getModel方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: populateItem
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateItem(Item<Count> item) {
//model for actual value
final PropertyModel<String> valueModel = new PropertyModel<>(item.getModel(), "name");
//checkbox
final Component selector = createValueCheckbox("selector", valueModel.getObject());
item.add(selector);
//label
item.add(new WebMarkupContainer("label")
//child label
.add(new FieldValueLabel("name", valueModel, fieldNameModel))
//count label
.add(new Label("count", new PropertyModel<String>(item.getModel(), "count")))
//reference to checkbox
.add(new AttributeModifier("for", selector.getMarkupId()))
.add(new AttributeAppender("class", valueModel, " "))
);
//description as tooltip (title)
final IModel<FieldValueDescriptor> descriptorModel = new MapValueModel<>(descriptorsModel, valueModel);
final IModel<String> descriptionModel = new PropertyModel<>(descriptorModel, "description");
item.add(new AttributeModifier("title", descriptionModel));
}
示例2: addItemColumns
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void addItemColumns(Item<QueuedTaskHolder> item, IModel<? extends QueuedTaskHolder> itemModel) {
IModel<QueuedTaskHolder> queuedTaskHolderModel = item.getModel();
TaskResultPanel result = new TaskResultPanel("result", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().result())).hideIfEmpty();
NotTreatedObjectsPanel notTreatedObjectsPanel = new NotTreatedObjectsPanel("notTreatedObjectsPanel",
new TaskBatchReportBeanModel<>(ShowcaseBatchReportBean.class, queuedTaskHolderModel));
EnclosureContainer notTreatedObjects = new EnclosureContainer("notTreatedObjects")
.condition(Condition.componentVisible(notTreatedObjectsPanel));
BootstrapPopoverOptions popoverOptions = new BootstrapPopoverOptions();
popoverOptions.setTitleModel(new ResourceModel("tasks.list.notTreatedObjects"));
popoverOptions.setContentComponent(notTreatedObjectsPanel);
popoverOptions.setHtml(true);
notTreatedObjects.add(new BootstrapPopoverBehavior(popoverOptions));
item.add(notTreatedObjectsPanel, notTreatedObjects);
item.add(
new CoreLabel("queueId", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().queueId())).showPlaceholder(new ResourceModel("tasks.queue.default")),
new CoreLabel("type", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().taskType())).showPlaceholder(),
new CoreLabel("name", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().name())).showPlaceholder(),
new TaskStatusPanel("status", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().status())).hideIfEmpty(), //.add(new EnclosureBehavior().model(statusModel)),
result,
new DefaultPlaceholderPanel("resultPlaceholder").condition(Condition.componentVisible(result)),
new DateLabel("creationDate", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().creationDate()), DatePattern.SHORT_DATETIME).showPlaceholder(),
new DateLabel("startDate", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().startDate()), DatePattern.SHORT_DATETIME).showPlaceholder(),
new DateLabel("endDate", BindingModel.of(queuedTaskHolderModel, CoreJpaMoreBindings.queuedTaskHolder().endDate()), DatePattern.SHORT_DATETIME).showPlaceholder()
);
}
示例3: newShareCheck
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private Check<User> newShareCheck(final Item<User> item) {
return new Check<User>("userCheck", item.getModel(), userGroup) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(!Objects.equals(item.getModelObject().getId(), UQSession.get().getLoggedInUser().getId()));
}
};
}
示例4: getListing
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private DataView<T> getListing() {
return new DataView<T>("data", getMetaDataProvider(this.clazz)) {
@Override
protected void populateItem(Item<T> item) {
Check<T> check = new Check<>("check", item.getModel(), checkGroup);
item.add(check);
TextField nameField = new TextField("name", new PropertyModel(item.
getModel(), "name"));
item.
add(new InputBeanValidationBorder<>("nameValidationBorder", nameField));
item.add(newIsInUseIndicator("inUse", item.getModelObject()));
}
};
}
示例5: newDeleteCheck
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private Check<TeamMembership> newDeleteCheck(final Item<TeamMembership> item) {
Check<TeamMembership> check = new Check<TeamMembership>("memberCheck", item.getModel(), teamGroup) {
@Override
protected void onConfigure() {
super.onConfigure();
// TODO when to hide or disable team delete checkbox?
}
};
return check;
}
示例6: newDeleteCheck
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private Check<User> newDeleteCheck(final Item<User> item) {
return new Check<User>("userCheck", item.getModel(), userGroup) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(!Objects.equals(item.getModelObject().getId(), UQSession.get().getLoggedInUser().getId()));
}
};
}
示例7: newDeleteCheck
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private Check<Company> newDeleteCheck(final Item<Company> item) {
return new Check<Company>("companyCheck", item.getModel(), companyGroup) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(!Objects.equals(item.getModelObject().getId(), UQSession.get().getLoggedInUser().getId()));
}
};
}
示例8: newDeleteCheck
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private Check<TeamMembership> newDeleteCheck(final Item<TeamMembership> item) {
return new Check<>("teamCheck", item.getModel(), teamGroup);
}