本文整理汇总了Java中org.apache.wicket.markup.repeater.Item.setOutputMarkupId方法的典型用法代码示例。如果您正苦于以下问题:Java Item.setOutputMarkupId方法的具体用法?Java Item.setOutputMarkupId怎么用?Java Item.setOutputMarkupId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.markup.repeater.Item
的用法示例。
在下文中一共展示了Item.setOutputMarkupId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addItemColumns
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void addItemColumns(final Item<QueuedTaskHolder> item, IModel<? extends QueuedTaskHolder> itemModel) {
item.setOutputMarkupId(true);
Component queue = new CoreLabel("queue", BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().queueId())).hideIfEmpty();
item.add(
new TaskStatusPanel("status", BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().status())),
new TaskResultPanel("result", BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().result())),
ConsoleMaintenanceTaskDescriptionPage.linkDescriptor(ReadOnlyModel.of(itemModel))
.link("nameLink")
.setBody(BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().name())),
queue,
new PlaceholderContainer("defaultQueue").condition(Condition.componentVisible(queue)),
new DateLabel("creationDate", BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().creationDate()),
DatePattern.SHORT_DATETIME),
new DateLabel("startDate", BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().startDate()),
DatePattern.SHORT_DATETIME),
new DateLabel("endDate", BindingModel.of(itemModel, CoreJpaMoreBindings.queuedTaskHolder().endDate()),
DatePattern.SHORT_DATETIME));
}
示例2: getTeamListing
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
private DataView<TeamMembership> getTeamListing() {
return new DataView<TeamMembership>("teams", provider = new TeamProvider(user)) {
@Override
protected void populateItem(Item<TeamMembership> item) {
final TeamMembership team = item.getModelObject();
Check<TeamMembership> check = newDeleteCheck(item);
List<Role> roles = new ArrayList<>(Arrays.asList(Role.teamAssignableRoles()));
item.add(check);
DropDownChoice<Role> roleSelector = new DropDownChoice<>("td.role",
new PropertyModel<Role>(team, "role"), roles
);
roleSelector.setNullValid(false);
item.add(roleSelector);
BookmarkablePageLink<TeamEditPage> editTeamLink = new BookmarkablePageLink<>("link.edit.team", TeamEditPage.class, new PageParameters().add("id", team.getTeam().getId()));
editTeamLink.add(new Label("td.teamname", new PropertyModel<>(team.getTeam(), "name")));
item.add(editTeamLink);
item.setOutputMarkupId(true);
}
};
}
示例3: newRowItem
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected Item<T> newRowItem(String id, int index, final IModel<T> model) {
final Item<T> rowItem = new SelectableRowItem<T>(id, index, model);
rowItem.setOutputMarkupId(true);
return rowItem;
}
示例4: newCellItem
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
protected Item<IColumn<T, S>> newCellItem(String id, int index, IModel<IColumn<T, S>> model) {
Item<IColumn<T, S>> cellItem = new Item<>(id, index, model);
cellItem.setOutputMarkupId(true);
return cellItem;
}
示例5: newRowItem
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
protected Item<T> newRowItem(String id, int index, IModel<T> model) {
Item<T> rowItem = new Item<>(id, index, model);
rowItem.setOutputMarkupId(true);
return rowItem;
}
示例6: populateItem
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
@Override
protected void populateItem(final Item<FeatureState> item)
{
editorPanel.getLog().trace("FeatureEditorPanelContent.populateItem("
+ item.getModelObject().feature.getUiName() + ": "
+ item.getModelObject().value + ")");
// Feature editors that allow multiple values may want to update themselves,
// e.g. to add another slot.
item.setOutputMarkupId(true);
final FeatureState featureState = item.getModelObject();
final FeatureEditor frag;
// Look up a suitable editor and instantiate it
FeatureSupport featureSupport = featureSupportRegistry
.getFeatureSupport(featureState.feature);
frag = featureSupport.createEditor("editor", AnnotationFeatureForm.this, editorPanel,
AnnotationFeatureForm.this.getModel(), item.getModel());
if (!featureState.feature.getLayer().isReadonly()) {
AnnotatorState state = getModelObject();
// Whenever it is updating an annotation, it updates automatically when a
// component for the feature lost focus - but updating is for every component
// edited LinkFeatureEditors must be excluded because the auto-update will break
// the ability to add slots. Adding a slot is NOT an annotation action.
if (state.getSelection().getAnnotation().isSet()
&& !(frag instanceof LinkFeatureEditor)) {
addAnnotateActionBehavior(frag);
}
else if (!(frag instanceof LinkFeatureEditor)) {
addRefreshFeaturePanelBehavior(frag);
}
// Add tooltip on label
StringBuilder tooltipTitle = new StringBuilder();
tooltipTitle.append(featureState.feature.getUiName());
if (featureState.feature.getTagset() != null) {
tooltipTitle.append(" (");
tooltipTitle.append(featureState.feature.getTagset().getName());
tooltipTitle.append(')');
}
Component labelComponent = frag.getLabelComponent();
labelComponent.add(new AttributeAppender("style", "cursor: help", ";"));
labelComponent.add(new DescriptionTooltipBehavior(tooltipTitle.toString(),
featureState.feature.getDescription()));
}
else {
frag.getFocusComponent().setEnabled(false);
}
// We need to enable the markup ID here because we use it during the AJAX behavior
// that automatically saves feature editors on change/blur.
// Check addAnnotateActionBehavior.
frag.setOutputMarkupId(true);
item.add(frag);
}
示例7: TeamListPage
import org.apache.wicket.markup.repeater.Item; //导入方法依赖的package包/类
public TeamListPage(final PageParameters pageParameters) {
super(pageParameters);
if (!pageParameters.get("id").isEmpty()) {
project = projectService.getById(pageParameters.get("id").toLong());
if (project == null) {
throw new EntityNotFoundException(Team.class, pageParameters.get("id").toOptionalString());
}
}
Form<Void> form = new Form("form");
provider = new TeamEntityProvider();
DataView<Team> usersView = new DataView<Team>("teams", provider, itemsPerPage) {
@Override
protected void populateItem(Item<Team> item) {
final Team team = item.getModelObject();
item.add(new Check<>("teamCheck", item.getModel(), teamGroup));
BookmarkablePageLink<TeamEditPage> editTeam = new BookmarkablePageLink<>("link.edit.team", TeamEditPage.class, new PageParameters().add("id", team.getId()));
item.add(editTeam.add(new Label("td.teamname", new PropertyModel<>(team, "name"))));
item.add(new Label("td.description", new PropertyModel<>(team, "description")));
item.add(newMembersPanel(team));
Link editButton = new BookmarkablePageLink("button.edit", TeamEditPage.class, new PageParameters().add("id", team.getId()));
item.add(editButton);
item.setOutputMarkupId(true);
}
};
form.add(teamGroup = newCheckGroup());
teamsContainer = new WebMarkupContainer("teamsContainer");
teamGroup.add(teamsContainer.setOutputMarkupId(true));
CheckGroupSelector checkGroupSelector = new CheckGroupSelector("teamGroupSelector", teamGroup);
teamsContainer.add(checkGroupSelector);
teamsContainer.add(usersView);
teamsContainer.add(deleteSelectedButton = newDeleteSelectedButton(teamGroup));
teamsContainer.add(addSelectedButton = addteamButton(teamGroup));
BookmarkablePageLink<TeamEditPage> createTeam = new BookmarkablePageLink<>("link.create.team", TeamEditPage.class);
teamsContainer.add(createTeam);
add(form);
teamsContainer.add(navigator = new BootstrapAjaxPagingNavigator(
"navigatorFoot", usersView));
allProjects = treeNodeService.getAllProjects();
// add confirmation modal for deleting items, and adding team to a project
add(deleteConfirmationModal = newDeleteConfirmationModal());
add(addConfirmationModal = newAddConfirmationModal());
}