use of org.apache.wicket.markup.html.TransparentWebMarkupContainer in project ocvn by devgateway.
the class Homepage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
TransparentWebMarkupContainer manageUsersPanel = new TransparentWebMarkupContainer("manageUsers");
MetaDataRoleAuthorizationStrategy.authorize(manageUsersPanel, Component.RENDER, SecurityConstants.Roles.ROLE_ADMIN);
add(manageUsersPanel);
}
use of org.apache.wicket.markup.html.TransparentWebMarkupContainer in project wicket by apache.
the class AutoLinkResolver method resolveAutomaticLink.
/**
* Resolves the given tag's page class and page parameters by parsing the tag component name and
* then searching for a page class at the absolute or relative URL specified by the href
* attribute of the tag.
* <p>
* None html references are treated similar.
*
* @param pathInfo
* The container where the link is
* @param tag
* the component tag
* @return A BookmarkablePageLink<?> to handle the href
*/
private Component resolveAutomaticLink(final PathInfo pathInfo, final ComponentTag tag) {
final String componentId = tag.getId();
// get the tag name, which is something like 'a' or 'script'
final String tagName = tag.getName();
// tag, which must have a associated Component.
if (tag.getId() == null) {
tag.setAutoComponentTag(true);
}
// now get the resolver delegate
IAutolinkResolverDelegate autolinkResolverDelegate = tagNameToAutolinkResolverDelegates.get(tagName);
Component autoComponent = null;
if (autolinkResolverDelegate != null) {
autoComponent = autolinkResolverDelegate.newAutoComponent(componentId, pathInfo);
}
if (autoComponent == null) {
// resolving didn't have the desired result or there was no delegate
// found; fallback on the default resolving which is a simple
// component that leaves the tag unchanged
autoComponent = new TransparentWebMarkupContainer(componentId);
}
return autoComponent;
}
use of org.apache.wicket.markup.html.TransparentWebMarkupContainer in project wicket by apache.
the class HomePage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
add(new AjaxLink<Void>("link") {
@Override
public void onClick(AjaxRequestTarget target) {
target.add(getPage().get("special"));
}
});
WebMarkupContainer mc1 = new TransparentWebMarkupContainer("mc1");
add(mc1);
mc1.add(new WebMarkupContainer("special"));
WebMarkupContainer mc2 = new WebMarkupContainer("mc2");
add(mc2);
WebMarkupContainer mc3 = new ComponentResolvingWebMarkupContainer("mc3", HomePage.this);
mc2.add(mc3);
add(new WebMarkupContainer("special").setOutputMarkupId(true));
}
use of org.apache.wicket.markup.html.TransparentWebMarkupContainer in project wicket by apache.
the class ComponentQueueingTest method queueInsideTransparentContainer.
@Test
public void queueInsideTransparentContainer() throws Exception {
TestPage page = new TestPage();
page.setPageMarkup("<div wicket:id='transparentContainer'>" + " <div wicket:id='container'>" + " <div wicket:id='child'>" + " </div>" + " </div>" + "</div>");
page.add(new TransparentWebMarkupContainer("transparentContainer"));
page.add(new WebMarkupContainer("container"));
page.queue(new WebMarkupContainer("child"));
tester.startPage(page);
}
use of org.apache.wicket.markup.html.TransparentWebMarkupContainer in project oc-explorer by devgateway.
the class Homepage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
TransparentWebMarkupContainer manageUsersPanel = new TransparentWebMarkupContainer("manageUsers");
MetaDataRoleAuthorizationStrategy.authorize(manageUsersPanel, Component.RENDER, SecurityConstants.Roles.ROLE_ADMIN);
add(manageUsersPanel);
}
Aggregations