本文整理匯總了Java中org.apache.wicket.markup.html.WebMarkupContainer.setOutputMarkupId方法的典型用法代碼示例。如果您正苦於以下問題:Java WebMarkupContainer.setOutputMarkupId方法的具體用法?Java WebMarkupContainer.setOutputMarkupId怎麽用?Java WebMarkupContainer.setOutputMarkupId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.markup.html.WebMarkupContainer
的用法示例。
在下文中一共展示了WebMarkupContainer.setOutputMarkupId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: newSuggestionItem
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private Component newSuggestionItem(String itemId, InputCompletion suggestion) {
WebMarkupContainer item = new WebMarkupContainer(itemId);
WebMarkupContainer link = new WebMarkupContainer("link");
Range matchRange = suggestion.getMatchRange();
String label = suggestion.getLabel();
if (matchRange != null) {
String prefix = StringEscapeUtils.escapeHtml4(label.substring(0, matchRange.getFrom()));
String suffix = StringEscapeUtils.escapeHtml4(label.substring(matchRange.getTo()));
String matched = StringEscapeUtils.escapeHtml4(label.substring(matchRange.getFrom(), matchRange.getTo()));
link.add(new Label("label", prefix + "<b>" + matched + "</b>" + suffix).setEscapeModelStrings(false));
} else {
link.add(new Label("label", label));
}
item.add(link);
if (suggestion.getDescription() != null)
item.add(new Label("description", suggestion.getDescription()));
else
item.add(new Label("description").setVisible(false));
item.add(AttributeAppender.append("data-content", suggestion.complete(inputStatus).getContent()));
item.add(AttributeAppender.append("data-caret", suggestion.getCaret()));
item.setOutputMarkupId(true);
return item;
}
示例2: newAddReplyContainer
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private WebMarkupContainer newAddReplyContainer() {
WebMarkupContainer addReplyContainer = new Fragment("addReply", "addReplyFrag", this) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(SecurityUtils.getUser() != null);
}
};
addReplyContainer.setOutputMarkupId(true);
addReplyContainer.add(new AjaxLink<Void>("reply") {
@Override
public void onClick(AjaxRequestTarget target) {
onAddReply(target, false, null);
}
});
return addReplyContainer;
}
示例3: newSinceChangesRow
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private Component newSinceChangesRow(String id, Date sinceDate) {
WebMarkupContainer row = new WebMarkupContainer(id);
row.setOutputMarkupId(true);
row.add(AttributeAppender.append("class", " non-discussion"));
WebMarkupContainer avatarColumn = new WebMarkupContainer("avatar");
avatarColumn.add(new WebMarkupContainer("avatar"));
row.add(avatarColumn);
WebMarkupContainer contentColumn = new Fragment("content", "sinceChangesRowContentFrag", this);
contentColumn.add(new SinceChangesLink("sinceChanges", requestModel, sinceDate));
row.add(contentColumn);
row.add(AttributeAppender.append("class", "since-changes"));
return row;
}
示例4: AddCapabilityDialog
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
protected AddCapabilityDialog(String id, final IModel<CapabilityStepDto> capabilityModel) {
super(id);
model = new LoadableModel<List<CapabilityDto<CapabilityType>>>() {
@Override
protected List<CapabilityDto<CapabilityType>> load() {
return loadModel(capabilityModel);
}
};
setTitle(createStringResource("addCapabilityDialog.title"));
showUnloadConfirmation(false);
setCssClassName(ModalWindow.CSS_CLASS_GRAY);
setCookieName(AddCapabilityDialog.class.getSimpleName() + ((int) (Math.random() * 100)));
setResizable(false);
setInitialWidth(500);
setInitialHeight(500);
setWidthUnit("px");
WebMarkupContainer content = new WebMarkupContainer(getContentId());
content.setOutputMarkupId(true);
setContent(content);
}
示例5: initLayout
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initLayout(IModel<String> title, IModel<String> data){
WebMarkupContainer container = new WebMarkupContainer(ID_ACE_EDITOR_CONTAINER);
container.setOutputMarkupId(true);
add(container);
AceEditorPanel aceEditorPanel = new AceEditorPanel(ID_ACE_EDITOR_PANEL, title, data);
aceEditorPanel.getEditor().setReadonly(true);
aceEditorPanel.setOutputMarkupId(true);
container.add(aceEditorPanel);
AjaxButton back = new AjaxButton(ID_BUTTON_BACK, createStringResource("PageBase.button.back")) {
@Override
public void onClick(AjaxRequestTarget target) {
redirectBack();
}
};
add(back);
}
示例6: createNavigation
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private WebMarkupContainer createNavigation(String id) {
final WebMarkupContainer container = new WebMarkupContainer(id);
container.setOutputMarkupId(true);
container.add(new BreadCrumbPanel("breadcrumbs", getModel()));
container.add(new TopLinksPanel("permalink", new PermaLinkModel(getPageClass(), getModel()), getTitleModel()) {
@Override
protected void onChange(AjaxRequestTarget target) {
if (target != null) {
target.add(container);
}
}
});
return container;
}
示例7: addRow
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private WebMarkupContainer addRow(final RepeatingView rows, Serializable element) {
final WebMarkupContainer row = new WebMarkupContainer(rows.newChildId());
row.setOutputMarkupId(true);
rows.add(row);
RepeatingView columns = new RepeatingView("properties");
row.add(columns);
for (PropertyContext<Serializable> propertyContext: propertyContexts) {
WebMarkupContainer column = new WebMarkupContainer(columns.newChildId());
column.add(AttributeAppender.append("class", " " + propertyContext.getPropertyName()));
columns.add(column);
Serializable propertyValue = (Serializable) propertyContext.getPropertyValue(element);
PropertyEditor<?> propertyEditor = propertyContext.renderForEdit("propertyEditor", Model.of(propertyValue));
column.add(propertyEditor);
column.add(new FencedFeedbackPanel("feedback", propertyEditor));
}
row.add(new AjaxButton("deleteElement") {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
target.appendJavaScript($(row).chain("remove").get());
rows.remove(row);
if (rows.size() == 0) {
WebMarkupContainer table = (WebMarkupContainer) ConcreteListPropertyEditor.this.get("listEditor");
target.add(table.get("noElementsRow"));
}
send(ConcreteListPropertyEditor.this, Broadcast.BUBBLE, new EditorChanged(target));
}
}.setDefaultFormProcessing(false));
return row;
}
示例8: onInitialize
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
@Override
protected void onInitialize() {
super.onInitialize();
String title = exception.getClass().getSimpleName();
String suffixToRemove = "Exception";
if (title.endsWith(suffixToRemove))
title = title.substring(0, title.length()-suffixToRemove.length());
title = WordUtils.capitalizeFully(WordUtils.uncamel(title));
WebMarkupContainer container = new WebMarkupContainer("error");
container.setOutputMarkupId(true);
add(container);
container.add(new Label("title", title));
container.add(new Label("description", exception.getMessage()));
container.add(new ViewStateAwarePageLink<Void>("dashboard", ProjectListPage.class));
container.add(new AjaxLink<Void>("showDetail") {
@Override
public void onClick(AjaxRequestTarget target) {
Fragment fragment = new Fragment("detail", "detailFrag", ExpectedExceptionPage.this);
fragment.add(new MultilineLabel("body", Strings.toString(exception)));
container.replace(fragment);
target.add(container);
setVisible(false);
}
});
container.add(new WebMarkupContainer("detail"));
}
示例9: addSeedUrlsList
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void addSeedUrlsList() {
seedUrlsTable = new WebMarkupContainer("seedUrlsTable");
seedUrlsTable.setOutputMarkupId(true);
RefreshingView<SeedUrl> seedUrls = new RefreshingView<SeedUrl>("seedUrls") {
@Override
protected Iterator<IModel<SeedUrl>> getItemModels() {
return new CpmIteratorAdapter<SeedUrl>(getModelObject().getSeedUrls());
}
@Override
protected void populateItem(Item<SeedUrl> item) {
item.add(new Label("url"));
item.add(new AjaxLink<SeedUrl>("delete", item.getModel()) {
@Override
public void onClick(AjaxRequestTarget target) {
deleteSeedUrl(getModelObject());
target.add(seedUrlsTable);
}
});
}
};
seedUrlsTable.add(seedUrls);
add(seedUrlsTable);
}
示例10: createResourcesTable
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private WebMarkupContainer createResourcesTable(String id, final ResourcesListView resourceListing) {
final WebMarkupContainer resourceListContainer = new WebMarkupContainer(id) {
@Override
protected void onConfigure() {
setVisible(resourceListing.getPageCount() > 0);
}
};
//add the actual listing
resourceListContainer.add(resourceListing);
resourceListContainer.setOutputMarkupId(true);
return resourceListContainer;
}
示例11: InstancesPage
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
public InstancesPage() {
instancesTable = new WebMarkupContainer("instancesTable");
instancesTable.setOutputMarkupId(true);
instancesTable.add(new AjaxSelfUpdatingTimerBehavior(UPDATE_TIMEOUT));
instancePanel = new InstancePanel("instanceForm");
RefreshingView<NutchInstance> instances = refreshingView();
instancesTable.add(instances);
add(instancesTable);
add(instancePanel);
add(addInstanceButton());
}
示例12: initLayout
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initLayout() {
setOutputMarkupId(true);
WebMarkupContainer messagesPanel = new WebMarkupContainer(ID_MESSAGES_PANEL);
messagesPanel.setOutputMarkupId(true);
add(messagesPanel);
ListView<ConnectorStruct> connectorView = new ListView<ConnectorStruct>(ID_CONNECTOR_MESSAGES_PANEL, connectorResourceResults) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<ConnectorStruct> item) {
Label connectorNameLabel = new Label(ID_CONNECTOR_NAME, item.getModelObject().connectorName);
item.add(connectorNameLabel);
RepeatingView connectorResultView = new RepeatingView(ID_CONNECTOR_MESSAGES);
List<OpResult> resultsDto = item.getModelObject().connectorResultsDto;
if (resultsDto != null) {
initResultsPanel(connectorResultView, resultsDto, parentPage);
}
item.add(connectorResultView);
}
};
messagesPanel.add(connectorView);
RepeatingView resultView = new RepeatingView(ID_RESOURCE_MESSAGES);
if (modelResourceResults.getObject() != null) {
initResultsPanel(resultView, modelResourceResults.getObject(), parentPage);
}
resultView.setOutputMarkupId(true);
messagesPanel.add(resultView);
}
示例13: FacetValuesPanel
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
/**
* Creates a new panel with selectable values for a single facet
*
* @param id component id
* @param model facet field model for this panel
* @param selectionModel model holding the global query/facet selection
* @param subListSize if large than 0, multiple lists will be generated each
* with a maximum size of this value
*/
public FacetValuesPanel(String id, final IModel<FacetField> model, final IModel<QueryFacetsSelection> selectionModel, int subListSize) {
super(id, model);
this.selectionModel = selectionModel;
this.subListSize = subListSize;
// shared model that holds the string for filtering the values (quick search)
filterModel = new Model<FieldValuesFilter>(new NameAndCountFieldValuesFilter());
// create a form with an input bound to the filter model
add(createFilterForm("filter"));
// create a container for values to allow for AJAX updates when filtering
valuesContainer = new WebMarkupContainer("valuesContainer");
valuesContainer.setOutputMarkupId(true);
add(valuesContainer);
// create a view for the actual values
valuesContainer.add(createValuesView("valuesList"));
// create a link for showing all values
valuesContainer.add(createAllValuesLink("allFacetValuesLink"));
// create a popup window for all facet values
valuesWindow = createAllValuesWindow("allValues");
add(valuesWindow);
fieldNameModel = new PropertyModel<>(model, "name");
}
示例14: SynchronizationActionEditorDialog
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
public SynchronizationActionEditorDialog(String id, final IModel<SynchronizationActionType> action){
super(id);
inputModel = action;
model = new LoadableModel<SynchronizationActionTypeDto>(false) {
@Override
protected SynchronizationActionTypeDto load() {
if(action != null){
return new SynchronizationActionTypeDto(action.getObject());
} else {
return new SynchronizationActionTypeDto(null);
}
}
};
setOutputMarkupId(true);
setTitle(createStringResource("SynchronizationActionEditorDialog.label"));
showUnloadConfirmation(false);
setCssClassName(ModalWindow.CSS_CLASS_GRAY);
setCookieName(SynchronizationActionEditorDialog.class.getSimpleName() + ((int) (Math.random() * 100)));
setInitialWidth(600);
setInitialHeight(400);
setWidthUnit("px");
WebMarkupContainer content = new WebMarkupContainer(getContentId());
content.setOutputMarkupId(true);
setContent(content);
}
示例15: initLayout
import org.apache.wicket.markup.html.WebMarkupContainer; //導入方法依賴的package包/類
private void initLayout(final IModel<TaskDto> taskDtoModel) {
final PropertyModel<List<ProcessInstanceDto>> requestsModel = new PropertyModel<>(taskDtoModel, TaskDto.F_WORKFLOW_REQUESTS);
final ISortableDataProvider<ProcessInstanceDto, String> requestsProvider = new ListDataProvider<>(this, requestsModel);
processInstancesPanel = new ProcessInstancesPanel(ID_REQUESTS, requestsProvider, null, 10, ProcessInstancesPanel.View.TASKS_FOR_PROCESS, null);
processInstancesPanel.setOutputMarkupId(true);
add(processInstancesPanel);
add(WebComponentUtil.createHelp(ID_REQUESTS_HELP));
changesContainer = new WebMarkupContainer(ID_CHANGES_CONTAINER);
for (int i = 1; i <= CHANGES_NUMBER; i++) {
final int index = i;
final String changesId = ID_CHANGES_PREFIX + i;
final String changesContentId = changesId + ID_CHANGES_CONTENT_SUFFIX;
final WebMarkupContainer changes = new WebMarkupContainer(changesId);
final IModel<TaskChangesDto> changesModel = new AbstractReadOnlyModel<TaskChangesDto>() {
@Override
public TaskChangesDto getObject() {
return taskDtoModel.getObject().getChangesForIndex(index);
}
};
final TaskChangesPanel changesPanel = new TaskChangesPanel(changesContentId, changesModel);
changes.add(changesPanel);
changes.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return changesModel.getObject() != null;
}
});
changesContainer.add(changes);
}
changesContainer.setOutputMarkupId(true);
add(changesContainer);
}