当前位置: 首页>>代码示例>>Java>>正文


Java MarkupContainer.visitChildren方法代码示例

本文整理汇总了Java中org.apache.wicket.MarkupContainer.visitChildren方法的典型用法代码示例。如果您正苦于以下问题:Java MarkupContainer.visitChildren方法的具体用法?Java MarkupContainer.visitChildren怎么用?Java MarkupContainer.visitChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.MarkupContainer的用法示例。


在下文中一共展示了MarkupContainer.visitChildren方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isHiddenByModalContainer

import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
protected boolean isHiddenByModalContainer() {
    final MarkupContainer markupContainer = getContext().getMarkupContainer();
    final ModalContainer parentModalContainer = markupContainer.findParent(ModalContainer.class);
    if (parentModalContainer != null && !parentModalContainer.isShowing()) {
        //this modal container is not showing this component currently
        return true;
    }
    final Boolean showingChildModalContainerFound = markupContainer.visitChildren(ModalContainer.class,
            new IVisitor<ModalContainer, Boolean>() {
                @Override
                public void component(final ModalContainer object, final IVisit<Boolean> visit) {
                    if (object.isShowing()) {
                        //a child modal container is blocking this component currently
                        visit.stop(true);
                    }
                }
            });
    return showingChildModalContainerFound != null && showingChildModalContainerFound;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:20,代码来源:AModelHtmlElement.java

示例2: updateAllComponents

import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
private void updateAllComponents(final Component component) {
    final AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
    final Form<?> form = Components.findForm(component);
    if (target != null && form != null) {
        final MarkupContainer root = (MarkupContainer) Components.findRoot(form);
        try {
            root.visitChildren(new IVisitor<Component, Void>() {
                @Override
                public void component(final Component object, final IVisit<Void> visit) {
                    if (object instanceof Form || object instanceof TabbedPanel
                            || object instanceof ModalContainer) {
                        target.add(object);
                    }
                    if (!object.isVisible()) {
                        final List<ModelComponentBehavior> modelComponentBehaviors = object
                                .getBehaviors(ModelComponentBehavior.class);
                        for (final ModelComponentBehavior behavior : modelComponentBehaviors) {
                            //update visibility manually since onConfigure() will be skipped
                            behavior.onConfigure(object);
                        }
                    }
                }
            });
        } catch (final Throwable t) {
            if (t.getMessage().contains("longer be added")) {
                if (LOG.isDebugEnabled()) {
                    LOG.warn(FROZEN_COMPONENTS_LOG_MESSAGE, Throwables.getFullStackTrace(t));
                } else if (LOG.isWarnEnabled()) {
                    LOG.warn(FROZEN_COMPONENTS_LOG_MESSAGE, Throwables.concatMessages(t));
                }
            } else {
                throw t;
            }
        }
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:37,代码来源:SessionGuiService.java

示例3: findChildComponent

import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public static <T extends Component> T findChildComponent(final Class<T> componentType,
        final MarkupContainer fromComponent) {
    return fromComponent.visitChildren(componentType, new IVisitor<T, T>() {
        @Override
        public void component(final T object, final IVisit<T> visit) {
            visit.stop(object);
        }
    });
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:10,代码来源:Components.java

示例4: loadChildren

import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public static void loadChildren(MarkupContainer container) {
    container.visitChildren(FormComponent.class, new IVisitor<FormComponent, Void>() {
        @Override
        public void component(FormComponent formComponent, IVisit iVisit) {
            if (isPersistent(formComponent)) {
                load(formComponent);
            }
        }
    });
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:11,代码来源:ComponentPersister.java

示例5: saveChildren

import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
public static void saveChildren(MarkupContainer container) {
    container.visitChildren(FormComponent.class, new IVisitor<FormComponent, Void>() {
        @Override
        public void component(FormComponent formComponent, IVisit iVisit) {
            if (isPersistent(formComponent)) {
                save(formComponent);
            }
        }
    });
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:11,代码来源:ComponentPersister.java

示例6: disableAll

import org.apache.wicket.MarkupContainer; //导入方法依赖的package包/类
private static void disableAll(MarkupContainer container) {
    container.setEnabled(false);
    container.visitChildren(new SetEnableVisitor(false));
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:5,代码来源:WicketAddonsImpl.java


注:本文中的org.apache.wicket.MarkupContainer.visitChildren方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。