本文整理匯總了Java中org.apache.wicket.markup.html.list.ListView.setOutputMarkupId方法的典型用法代碼示例。如果您正苦於以下問題:Java ListView.setOutputMarkupId方法的具體用法?Java ListView.setOutputMarkupId怎麽用?Java ListView.setOutputMarkupId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.markup.html.list.ListView
的用法示例。
在下文中一共展示了ListView.setOutputMarkupId方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initLayout
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void initLayout() {
setOutputMarkupId(true);
ListView<PrismObject<R>> list = new ListView<PrismObject<R>>(ID_LIST, availableRoles) {
@Override
protected void populateItem(ListItem<PrismObject<R>> item) {
item.add(createRoleLink(ID_ITEM, item.getModel()));
}
};
list.setOutputMarkupId(true);
add(list);
AjaxLink<String> buttonReset = new AjaxLink<String>(ID_BUTTON_RESET) {
@Override
public void onClick(AjaxRequestTarget target) {
reset();
target.add(SimpleRoleSelector.this);
}
};
buttonReset.setBody(createStringResource("SimpleRoleSelector.reset"));
add(buttonReset);
}
示例2: addPrivilegesPanel
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void addPrivilegesPanel(WebMarkupContainer body){
privilegesNames = getPrivilegesNamesList();
ListView<String> privilegesListComponent = new ListView<String>(ID_PRIVILEGES_LIST, privilegesNames){
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<String> item) {
Label privilageNameLabel = new Label(ID_PRIVILEGE, item.getModel());
item.add(privilageNameLabel);
}
};
privilegesListComponent.setOutputMarkupId(true);
privilegesListComponent.add(new VisibleEnableBehaviour(){
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible(){
if (!UserDtoStatus.ADD.equals(getModelObject().getStatus())){
return true;
}
return false;
}
});
body.addOrReplace(privilegesListComponent);
}
示例3: ProgressesPanel
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
public ProgressesPanel(final String id, final Date lastUpdate, final List<ProgressBean> progressBeans) {
super(id);
add(new Label("lastUpdate", SyncopeConsoleSession.get().getDateFormat().format(lastUpdate)));
ListView<ProgressBean> progresses = new ListView<ProgressBean>("progresses", progressBeans) {
private static final long serialVersionUID = -9180479401817023838L;
@Override
protected void populateItem(final ListItem<ProgressBean> item) {
item.add(new ProgressPanel("progress", item.getModelObject()));
}
};
progresses.setOutputMarkupId(true);
add(progresses);
}
示例4: createParameterPanel
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private WebMarkupContainer createParameterPanel(final IModel<JasperReportParameterDto> parameterModel) {
WebMarkupContainer paramPanel = new WebMarkupContainer("paramPanel");
paramPanel.setOutputMarkupId(true);
String paramValue = new PropertyModel<String>(parameterModel, "name").getObject();
StringResourceModel paramDisplay = PageBase.createStringResourceStatic(RunReportPopupPanel.this, "runReportPopupContent.param.name." + paramValue, new Object[]{});
paramPanel.add(new Label("name", paramDisplay)); // use display name rather than property name
String paramClass = new PropertyModel<String>(parameterModel, "nestedTypeAsString").getObject();
if (StringUtils.isBlank(paramClass)) {
paramClass = new PropertyModel<String>(parameterModel, "typeAsString").getObject();
}
paramClass = paramClass == null ? "" : paramClass.substring(paramClass.lastIndexOf(".") + 1);
paramPanel.add(new Label("type", paramClass));
ListView<JasperReportValueDto> listView = new ListView<JasperReportValueDto>(ID_VALUE_LIST, new PropertyModel<>(parameterModel, "value")) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<JasperReportValueDto> item) {
item.add(createInputMarkup(item.getModel(), parameterModel.getObject()));
}
};
listView.setOutputMarkupId(true);
paramPanel.add(listView);
return paramPanel;
}
示例5: initContexts
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void initContexts(WebMarkupContainer operationContent, final IModel<OpResult> model, Page parentPage) {
Label contextsLabel = new Label("contextsLabel", parentPage.getString("FeedbackAlertMessageDetails.contexts"));
contextsLabel.setOutputMarkupId(true);
contextsLabel.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return CollectionUtils.isNotEmpty(model.getObject().getContexts());
}
});
operationContent.add(contextsLabel);
ListView<Context> contexts = new ListView<Context>("contexts", createContextsModel(model)) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<Context> item) {
item.add(new Label("contextName", new PropertyModel<Object>(item.getModel(), "name")));
item.add(new Label("contextValue", new PropertyModel<Object>(item.getModel(), "value")));
}
};
contexts.setOutputMarkupId(true);
contexts.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return CollectionUtils.isNotEmpty(model.getObject().getContexts());
}
});
operationContent.add(contexts);
}
示例6: createParameterPanel
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private WebMarkupContainer createParameterPanel(final IModel<JasperReportParameterDto> parameterModel) {
WebMarkupContainer paramPanel = new WebMarkupContainer("paramPanel");
paramPanel.setOutputMarkupId(true);
String paramValue = new PropertyModel<String>(parameterModel, "name").getObject();
StringResourceModel paramDisplay = PageBase.createStringResourceStatic(RunReportPopupPanel.this, "runReportPopupContent.param.name." + paramValue, new Object[]{});
paramPanel.add(new Label("name", paramDisplay)); // use display name rather than property name
String paramClass = new PropertyModel<String>(parameterModel, "nestedTypeAsString").getObject();
if (StringUtils.isBlank(paramClass)) {
paramClass = new PropertyModel<String>(parameterModel, "typeAsString").getObject();
}
paramClass = paramClass == null ? "" : paramClass.substring(paramClass.lastIndexOf(".") + 1);
paramPanel.add(new Label("type", paramClass));
ListView<JasperReportValueDto> listView = new ListView<JasperReportValueDto>(ID_VALUE_LIST, new PropertyModel<>(parameterModel, "value")) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<JasperReportValueDto> item) {
item.add(createInputMarkup(item.getModel(), parameterModel.getObject()));
}
};
listView.setOutputMarkupId(true);
paramPanel.add(listView);
return paramPanel;
}
示例7: initContexts
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void initContexts(WebMarkupContainer operationContent, final IModel<OpResult> model, Page parentPage) {
Label contextsLabel = new Label("contextsLabel", parentPage.getString("FeedbackAlertMessageDetails.contexts"));
contextsLabel.setOutputMarkupId(true);
contextsLabel.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return CollectionUtils.isNotEmpty(model.getObject().getContexts());
}
});
operationContent.add(contextsLabel);
ListView<Context> contexts = new ListView<Context>("contexts", createContextsModel(model)) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<Context> item) {
item.add(new Label("contextName", new PropertyModel<Object>(item.getModel(), "name")));
item.add(new Label("contextValue", new PropertyModel<Object>(item.getModel(), "value")));
}
};
contexts.setOutputMarkupId(true);
contexts.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return CollectionUtils.isNotEmpty(model.getObject().getContexts());
}
});
operationContent.add(contexts);
}
示例8: TopicoStep
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
public TopicoStep(IDynamicWizardStep previous) {
super(previous,"Escolha o Tópico","CLique no tópico a mover");
setComplete(false);
ListView<Topico> topicos = new ListView<Topico>("topicos",
new ModeloListaTopicosDeForum(info.getIdComunidadeOrigem(), info.getIdForumOrigem())) {
private static final long serialVersionUID = -5113198906301138306L;
@Override
protected void populateItem(final ListItem<Topico> item) {
Link<Void> linkTopico = new AjaxFallbackLink<Void>(
"link_topico") {
private static final long serialVersionUID = 2729459814700718807L;
@Override
public void onClick(AjaxRequestTarget target) {
info.setIdTopico(item.getModelObject().getId());
info.setNomeTopico(item.getModelObject().getAssunto());
setComplete(true);
}
};
Label nomeTopico = new Label("nome_topico", item.getModelObject().toString());
linkTopico.setOutputMarkupId(true);
linkTopico.add(nomeTopico);
item.add(linkTopico);
}
};
topicos.setOutputMarkupId(true);
add(topicos);
}
示例9: ComunidadeDestinoStep
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
public ComunidadeDestinoStep(IDynamicWizardStep previousStep) {
super(previousStep,"Escolha a Comunidade de Destino","Clique na comunidade para onde o tópico será movido");
ListView<Group> comunidades = new ListView<Group>("comunidades",
new ModeloListaComunidadesDestino(info.getIdUsuario(),info.getIdComunidadeOrigem())) {
private static final long serialVersionUID = -5113198906301138306L;
@Override
protected void populateItem(final ListItem<Group> item) {
Link<Void> linkComunidade = new AjaxFallbackLink<Void>(
"link_comunidade") {
private static final long serialVersionUID = 2729459814700718807L;
@Override
public void onClick(AjaxRequestTarget target) {
Group comunidade = item.getModelObject();
info.setIdComunidadeDestino(comunidade.getGroupId());
info.setUrlComunidadeDestino(comunidade.getFriendlyURL());
info.setNomeComunidadeDestino(comunidade.getName());
setComplete(true);
}
};
Label nomeComunidade = new Label("nome_comunidade", item.getModelObject().getName());
linkComunidade.setOutputMarkupId(true);
linkComunidade.add(nomeComunidade);
item.add(linkComunidade);
}
};
comunidades.setOutputMarkupId(true);
add(comunidades);
}
示例10: initLayout
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void initLayout(final boolean nullValid, final NonEmptyModel<Boolean> readOnlyModel) {
WebMarkupContainer placeholderContainer = new WebMarkupContainer(ID_PLACEHOLDER_CONTAINER);
placeholderContainer.setOutputMarkupPlaceholderTag(true);
placeholderContainer.setOutputMarkupPlaceholderTag(true);
placeholderContainer.add(new VisibleEnableBehaviour(){
@Override
public boolean isVisible() {
return getModel().getObject().isEmpty();
}
});
add(placeholderContainer);
AjaxLink placeholderAdd = new AjaxLink(ID_PLACEHOLDER_ADD) {
@Override
public void onClick(AjaxRequestTarget target) {
addValuePerformed(target);
}
};
placeholderAdd.add(new AttributeAppender("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
if (buttonsDisabled()) {
return " " + CSS_DISABLED;
}
return "";
}
}));
placeholderAdd.setOutputMarkupId(true);
placeholderAdd.setOutputMarkupPlaceholderTag(true);
placeholderAdd.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
placeholderContainer.add(placeholderAdd);
ListView repeater = new ListView<T>(ID_REPEATER, getModel()){
@Override
protected void populateItem(final ListItem<T> item) {
DropDownChoice choice = new DropDownChoice<>(ID_INPUT, createDropDownItemModel(item.getModel()),
createChoiceList(), createRenderer());
choice.setNullValid(nullValid);
choice.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
item.add(choice);
WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
item.add(buttonGroup);
initButtons(buttonGroup, item, readOnlyModel);
}
};
repeater.setOutputMarkupId(true);
repeater.setOutputMarkupPlaceholderTag(true);
repeater.add(new VisibleEnableBehaviour(){
@Override
public boolean isVisible() {
return !getModel().getObject().isEmpty();
}
});
add(repeater);
}
示例11: initLayout
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void initLayout(final boolean inputEnabled, final boolean showPlaceholder, final NonEmptyModel<Boolean> readOnlyModel) {
WebMarkupContainer placeholderContainer = new WebMarkupContainer(ID_PLACEHOLDER_CONTAINER);
placeholderContainer.setOutputMarkupPlaceholderTag(true);
placeholderContainer.setOutputMarkupPlaceholderTag(true);
placeholderContainer.add(new VisibleEnableBehaviour(){
@Override
public boolean isVisible() {
return showPlaceholder && (getModel().getObject() == null || getModel().getObject().isEmpty());
}
});
add(placeholderContainer);
AjaxLink placeholderAdd = new AjaxLink(ID_PLACEHOLDER_ADD) {
@Override
public void onClick(AjaxRequestTarget target) {
addValuePerformed(target);
}
};
placeholderAdd.add(new AttributeAppender("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
if (buttonsDisabled()) {
return " " + CSS_DISABLED;
}
return "";
}
}));
placeholderAdd.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
placeholderAdd.setOutputMarkupId(true);
placeholderAdd.setOutputMarkupPlaceholderTag(true);
placeholderContainer.add(placeholderAdd);
ListView repeater = new ListView<T>(ID_REPEATER, getModel()) {
@Override
protected void populateItem(final ListItem<T> item) {
TextField text = new TextField<>(ID_TEXT, createTextModel(item.getModel()));
text.add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
text.add(AttributeAppender.replace("placeholder", createEmptyItemPlaceholder()));
if (selectedModel != null && item.getModelObject() == selectedModel.getObject()) {
text.add(AttributeAppender.append("style", "background-color: #FFFFD0;")); // TODO color constant
}
if (!inputEnabled) {
text.add(new AttributeModifier("disabled", "disabled"));
}
item.add(text);
WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
item.add(buttonGroup);
initButtons(buttonGroup, item, readOnlyModel);
}
};
repeater.setOutputMarkupId(true);
repeater.setOutputMarkupPlaceholderTag(true);
repeater.add(new VisibleEnableBehaviour(){
@Override
public boolean isVisible() {
return getModel().getObject() != null && !getModel().getObject().isEmpty();
}
});
add(repeater);
}
示例12: initLayout
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
public void initLayout(WebMarkupContainer content) {
Form form = new Form(ID_MAIN_FORM);
form.setOutputMarkupId(true);
content.add(form);
ListView repeater = new ListView<PropertyLimitationsTypeDto>(ID_REPEATER, model){
@Override
protected void populateItem(final ListItem<PropertyLimitationsTypeDto> item){
WebMarkupContainer linkContainer = new WebMarkupContainer(ID_LIMITATIONS_LINK);
linkContainer.setOutputMarkupId(true);
linkContainer.add(new AttributeModifier("href", createCollapseItemId(item, true)));
item.add(linkContainer);
Label linkLabel = new Label(ID_LIMITATIONS_LABEL, createLimitationsLabelModel(item));
linkContainer.add(linkLabel);
AjaxLink delete = new AjaxLink(ID_LIMITATION_DELETE) {
@Override
public void onClick(AjaxRequestTarget target) {
deleteLimitationPerformed(target, item);
}
};
delete.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
linkContainer.add(delete);
WebMarkupContainer limitationBody = new WebMarkupContainer(ID_BODY);
limitationBody.setOutputMarkupId(true);
limitationBody.setMarkupId(createCollapseItemId(item, false).getObject());
if (changeState != ChangeState.SKIP) {
limitationBody.add(new AttributeModifier("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
if (changeState == ChangeState.FIRST && item.getIndex() == 0) {
return "panel-collapse collapse in";
} else if (changeState == ChangeState.LAST && item.getIndex() == (getModelObject().size()-1)) {
return "panel-collapse collapse in";
} else {
return "panel-collapse collapse";
}
}
}));
}
limitationBody.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
item.add(limitationBody);
initLimitationBody(limitationBody, item);
}
};
repeater.setOutputMarkupId(true);
form.add(repeater);
initButtons(form);
}
示例13: createInheritedSpan
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
private void createInheritedSpan(){
WebMarkupContainer inheritedSpan = new WebMarkupContainer("inheritedSpan");
inheritedSpan.setOutputMarkupId(true);
final String inheritedSpanId = inheritedSpan.getMarkupId();
add(inheritedSpan);
AbstractReadOnlyModel<List<? extends ListOptionSerialized>> inheritedRestrictedToolsModel = new AbstractReadOnlyModel<List<? extends ListOptionSerialized>>(){
private static final long serialVersionUID = 1L;
@Override
public List<? extends ListOptionSerialized> getObject() {
return new ArrayList<ListOptionSerialized>();
}
};
final ListView<ListOptionSerialized> inheritedListView = new ListView<ListOptionSerialized>("inheritedRestrictedTools",inheritedRestrictedToolsModel){
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<ListOptionSerialized> item) {
ListOptionSerialized tool = (ListOptionSerialized) item.getModelObject();
Label name = new Label("name", tool.getName());
item.add(name);
}
};
inheritedListView.setOutputMarkupId(true);
inheritedSpan.add(inheritedListView);
AjaxLink<Void> closeInheritedSpanLink = new AjaxLink("closeInheritedSpanLink"){
@Override
public void onClick(AjaxRequestTarget arg0) {
}
};
inheritedSpan.add(closeInheritedSpanLink);
Label inheritedNodeTitle = new Label("inheritedNodeTitle", "");
inheritedSpan.add(inheritedNodeTitle);
Label noInheritedToolsLabel = new Label("noToolsInherited", new StringResourceModel("inheritedNothing", null));
inheritedSpan.add(noInheritedToolsLabel);
}
示例14: initLayout
import org.apache.wicket.markup.html.list.ListView; //導入方法依賴的package包/類
public void initLayout(WebMarkupContainer content) {
Form form = new com.evolveum.midpoint.web.component.form.Form(ID_MAIN_FORM);
form.setOutputMarkupId(true);
content.add(form);
ListView repeater = new ListView<PropertyLimitationsTypeDto>(ID_REPEATER, model){
@Override
protected void populateItem(final ListItem<PropertyLimitationsTypeDto> item){
WebMarkupContainer linkContainer = new WebMarkupContainer(ID_LIMITATIONS_LINK);
linkContainer.setOutputMarkupId(true);
linkContainer.add(new AttributeModifier("href", createCollapseItemId(item, true)));
item.add(linkContainer);
Label linkLabel = new Label(ID_LIMITATIONS_LABEL, createLimitationsLabelModel(item));
linkContainer.add(linkLabel);
AjaxLink delete = new AjaxLink(ID_LIMITATION_DELETE) {
@Override
public void onClick(AjaxRequestTarget target) {
deleteLimitationPerformed(target, item);
}
};
delete.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
linkContainer.add(delete);
WebMarkupContainer limitationBody = new WebMarkupContainer(ID_BODY);
limitationBody.setOutputMarkupId(true);
limitationBody.setMarkupId(createCollapseItemId(item, false).getObject());
if (changeState != ChangeState.SKIP) {
limitationBody.add(new AttributeModifier("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
if (changeState == ChangeState.FIRST && item.getIndex() == 0) {
return "panel-collapse collapse in";
} else if (changeState == ChangeState.LAST && item.getIndex() == (getModelObject().size()-1)) {
return "panel-collapse collapse in";
} else {
return "panel-collapse collapse";
}
}
}));
}
limitationBody.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
item.add(limitationBody);
initLimitationBody(limitationBody, item);
}
};
repeater.setOutputMarkupId(true);
form.add(repeater);
initButtons(form);
}