Search in sources :

Example 6 with TransparentWebMarkupContainer

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);
}
Also used : TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer)

Example 7 with TransparentWebMarkupContainer

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;
}
Also used : TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer) Component(org.apache.wicket.Component)

Example 8 with TransparentWebMarkupContainer

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));
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer)

Example 9 with TransparentWebMarkupContainer

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);
}
Also used : TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer) Test(org.junit.Test)

Example 10 with TransparentWebMarkupContainer

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);
}
Also used : TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer)

Aggregations

TransparentWebMarkupContainer (org.apache.wicket.markup.html.TransparentWebMarkupContainer)11 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)5 Component (org.apache.wicket.Component)3 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)3 Label (org.apache.wicket.markup.html.basic.Label)3 CompoundPropertyModel (org.apache.wicket.model.CompoundPropertyModel)2 BootstrapAddButton (org.devgateway.toolkit.forms.wicket.components.form.BootstrapAddButton)2 BootstrapDeleteButton (org.devgateway.toolkit.forms.wicket.components.form.BootstrapDeleteButton)2 LeftMenuPanel (com.evolveum.midpoint.gui.impl.component.menu.LeftMenuPanel)1 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)1 MainPopupDialog (com.evolveum.midpoint.web.component.dialog.MainPopupDialog)1 FeedbackAlerts (com.evolveum.midpoint.web.component.message.FeedbackAlerts)1 VisibleBehaviour (com.evolveum.midpoint.web.component.util.VisibleBehaviour)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 MarkupContainer (org.apache.wicket.MarkupContainer)1 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)1 AttributeAppender (org.apache.wicket.behavior.AttributeAppender)1 ComponentTag (org.apache.wicket.markup.ComponentTag)1 WebComponent (org.apache.wicket.markup.html.WebComponent)1 ExternalImage (org.apache.wicket.markup.html.image.ExternalImage)1