本文整理汇总了Java中org.apache.wicket.MarkupContainer.add方法的典型用法代码示例。如果您正苦于以下问题:Java MarkupContainer.add方法的具体用法?Java MarkupContainer.add怎么用?Java MarkupContainer.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.MarkupContainer
的用法示例。
在下文中一共展示了MarkupContainer.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createOriginalContextContainer
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public MarkupContainer createOriginalContextContainer(final String id) {
// get landing page from document
final SolrFieldStringModel valueModel = new SolrFieldStringModel(getModel(), FacetConstants.FIELD_LANDINGPAGE);
// wrap in model that transforms handle links
final IModel<String> landingPageHrefModel = new HandleLinkModel(valueModel);
//create container
final MarkupContainer originalContext = new WebMarkupContainer(id) {
@Override
protected void onConfigure() {
setVisible(landingPageHrefModel.getObject() != null);
}
};
// add landing page link
originalContext.add(new ExternalLink("landingPage", landingPageHrefModel));
return originalContext;
}
示例2: addMenuElement
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
protected void addMenuElement(MarkupContainer menuContainer,
Class<? extends Page> selectedPageClass,
String name,
Class<? extends Page> pageClass,
PageParameters parameters,
boolean isVisible) {
BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(name + "MenuLink", pageClass, parameters);
link.setVisible(isVisible && isPageAccessible(pageClass));
MarkupContainer container = new WebMarkupContainer(name + "MenuLinkContainer");
if (pageClass.equals(selectedPageClass)) {
container.add(new ClassAttributeAppender("active"));
}
container.add(link);
menuContainer.add(container);
}
示例3: addSummaryPanel
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public static void addSummaryPanel(MarkupContainer parentComponent, PrismObject<FocusType> focus, ObjectWrapper<FocusType> focusWrapper, String id, ModelServiceLocator serviceLocator) {
if (focus.getCompileTimeClass().equals(UserType.class)) {
parentComponent.add(new UserSummaryPanel(id,
new Model<ObjectWrapper<UserType>>((ObjectWrapper) focusWrapper), serviceLocator));
} else if (focus.getCompileTimeClass().equals(RoleType.class)) {
parentComponent.add(new RoleSummaryPanel(id,
new Model<ObjectWrapper<RoleType>>((ObjectWrapper) focusWrapper), serviceLocator));
} else if (focus.getCompileTimeClass().equals(OrgType.class)) {
parentComponent.add(new OrgSummaryPanel(id,
new Model<ObjectWrapper<OrgType>>((ObjectWrapper) focusWrapper), serviceLocator));
} else if (focus.getCompileTimeClass().equals(ServiceType.class)) {
parentComponent.add(new ServiceSummaryPanel(id,
new Model<ObjectWrapper<ServiceType>>((ObjectWrapper) focusWrapper), serviceLocator));
}
}
示例4: AdvancedSearchOptionsPanel
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public AdvancedSearchOptionsPanel(String id, IModel<QueryFacetsSelection> model) {
super(id, model);
optionsForm = new Form("options");
final CheckBox selectionType = new CheckBox("selectionType", new Model(filterQuerySelectionType));
selectionType.add(new OnChangeAjaxBehavior(){
@Override
protected void onUpdate(AjaxRequestTarget target) {
filterQuerySelectionType = !filterQuerySelectionType;
WebSession.get().setAttribute(SELECTION_TYPE_ATTRIBUTE_NAME, filterQuerySelectionType);
}
});
optionsForm.add(selectionType);
final CheckBox fcsCheck = createFieldNotEmptyOption("fcs", FacetConstants.FIELD_SEARCH_SERVICE);
optionsForm.add(fcsCheck);
final MarkupContainer collectionsSection = new WebMarkupContainer("collectionsSection");
final CheckBox collectionCheck = createFieldNotEmptyOption("collection", FacetConstants.FIELD_HAS_PART_COUNT);
collectionsSection.add(collectionCheck);
collectionsSection.setVisible(config.isProcessHierarchies());
optionsForm.add(collectionsSection);
optionsForm.add(indicatorAppender);
add(optionsForm);
}
示例5: add
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public NavTabsPanel add(ITabFactory factory) {
boolean first = tabsContentsRepeatingView.size() == 0;
MarkupContainer tab = new WebMarkupContainer(tabsRepeatingView.newChildId());
Component content = factory.createContent(tabsContentsRepeatingView.newChildId());
if (first) {
Behavior activeBehavior = new ClassAttributeAppender("active");
tab.add(activeBehavior);
content.add(activeBehavior);
}
tabsRepeatingView.add(
tab
.add(
new BlankLink("link")
.add(factory.createLabel("label"))
.add(new AttributeModifier("href", "#" + content.getMarkupId()))
)
.add(new BootstrapTabBehavior())
);
tabsContentsRepeatingView.add(
content
.setOutputMarkupId(true)
);
return this;
}
示例6: addTopProperty
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
protected void addTopProperty(MarkupContainer table, String headerComponentId, Component dataComponent) {
table.add(
createHeaderComponent(headerComponentId)
.add(new ClassAttributeAppender(CLASS_TABLE_TOP_LEFT)),
dataComponent
.add(new ClassAttributeAppender(CLASS_TABLE_TOP_RIGHT))
);
}
示例7: addBottomProperty
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
protected void addBottomProperty(MarkupContainer table, String headerComponentId, Component dataComponent) {
table.add(
createHeaderComponent(headerComponentId)
.add(new ClassAttributeAppender(CLASS_TABLE_BOTTOM_LEFT)),
dataComponent
.add(new ClassAttributeAppender(CLASS_TABLE_BOTTOM_RIGHT))
);
}
示例8: newPomEditContainer
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
private Component newPomEditContainer() {
MarkupContainer pomEditContainer = new WebMarkupContainer("pomEditContainer");
pomEditContainer.setOutputMarkupPlaceholderTag(true);
pomEditContainer.add(newGeneratePomCheckBox());
pomEditContainer.add(newPomEditorPanel());
return pomEditContainer;
}
示例9: RemoteRepoImportPanel
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public RemoteRepoImportPanel(CachingDescriptorHelper cachingDescriptorHelper) {
setWidth(740);
add(new CssClass("import-remote-repos"));
Form loadForm = new SecureForm("loadForm");
add(loadForm);
MarkupContainer loadBorder = new TitledBorder("loadBorder");
loadForm.add(loadBorder);
loadBorder.add(new HelpBubble("urlHelp",
"Enter the base URL of another Artifactory server you want to import repository definitions from."));
FormComponent<String> urlTextField = new TextField<>("url", new PropertyModel<String>(this, "url"));
urlTextField.add(new UriValidator("http", "https"));
setPersistent(urlTextField);
urlTextField.setOutputMarkupId(true);
urlTextField.setRequired(true);
urlTextField.setDefaultModelObject("http://repo.jfrog.org/artifactory");
loadBorder.add(urlTextField);
loadBorder.add(getLoadButton(loadForm));
Form listForm = new SecureForm("listForm");
add(listForm);
MarkupContainer listBorder = new TitledBorder("listBorder");
listForm.add(listBorder);
createRepositoryList(listBorder);
add(new ModalCloseLink("cancel"));
//Submit button
importButton = getImportButton(cachingDescriptorHelper, listForm);
importButton.setOutputMarkupId(true);
add(importButton);
listForm.add(new DefaultButtonBehavior(importButton));
}
示例10: createRepositoryList
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
/**
* Constructs the repository list
*
* @param listBorder Border to add the list to
*/
private void createRepositoryList(MarkupContainer listBorder) {
provider = new RepoDataProvider();
repoTable = new SortableTable<>("repoTable", getColumns(), provider, 10);
repoTable.setOutputMarkupId(true);
listBorder.add(repoTable);
}
示例11: addLayoutField
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
private TextField<String> addLayoutField(String id, MarkupContainer titledBorder, boolean required,
boolean disableFields, IValidator<String>... validators) {
TextField<String> textField = new ReadOnlyOnDisabledTextField<>(id);
textField.setRequired(required).setOutputMarkupId(true).setEnabled(!disableFields);
textField.add(validators);
titledBorder.add(textField);
titledBorder.add(new SchemaHelpBubble(id + ".help"));
return textField;
}
示例12: addPlaceHolders
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
private void addPlaceHolders() {
MarkupContainer jnlpLinksBorder = new PlaceHolder("jnlpLinksBorder");
jnlpLinksBorder.add(new PlaceHolder("webstart"));
jnlpLinksBorder.add(new PlaceHolder("applet"));
add(jnlpLinksBorder);
MarkupContainer scriptSnippetBorder = new PlaceHolder("scriptSnippetBorder");
scriptSnippetBorder.add(new PlaceHolder("scriptSnippet"));
add(scriptSnippetBorder);
}
示例13: BaseLogoPanel
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public BaseLogoPanel(String id) {
super(id);
setOutputMarkupId(true);
final Class<? extends Page> pageClass = getLinkPage();
MarkupContainer link = newLink(pageClass);
link.add(new ExternalImage("logoImage", new PropertyModel(this, "logoUrl")));
link.add(new CssClass(new CssModel()));
add(link);
add(new CssClass("app-logo"));
}
示例14: populateItem
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
@Override
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel) {
MarkupContainer panel = new TextFieldPanel(componentId, rowModel);
cellItem.add(new CssClass("TextFieldColumn"));
cellItem.add(panel);
T rowObject = rowModel.getObject();
PropertyModel<String> model = newPropertyModel(rowObject);
FormComponent textField = newTextField(TextFieldPanel.TEXTFIELD_ID, model, rowObject);
panel.add(textField);
}
示例15: addBorderLayout
import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public void addBorderLayout(MarkupContainer container)
{
SplitterBehavior vertical = new SplitterBehavior("#vertical", new SplitterAdapter());
vertical.setOption("panes", this.getVerticalPanes()).setOption("orientation", "'vertical'");
container.add(vertical);
SplitterBehavior horizontal = new SplitterBehavior("#horizontal", new SplitterAdapter());
horizontal.setOption("panes", this.getHorizontalPanes());
container.add(horizontal);
}