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


Java MarkupContainer类代码示例

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


MarkupContainer类属于org.apache.wicket包,在下文中一共展示了MarkupContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:21,代码来源:RecordLicenseInfoPanel.java

示例3: newCell

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
/**
 * @see IColumn#newCell(MarkupContainer, String, TreeNode, int)
 */
public Component newCell(MarkupContainer parent, String id, TreeNode node, int level)
{
	if(!((NodeModel) ((DefaultMutableTreeNode) node).getUserObject()).isNodeEditable()){
		return new EditablePanelEmpty(id);
	}
	
	if(DelegatedAccessConstants.TYPE_ACCESS_SHOPPING_PERIOD_USER == userType){
		if(!((NodeModel) ((DefaultMutableTreeNode) node).getUserObject()).getNodeShoppingPeriodAdmin()){
			return new EditablePanelEmpty(id);
		}
	}
	
	if(((NodeModel) ((DefaultMutableTreeNode) node).getUserObject()).isDirectAccess()){
		return new EditablePanelList(id, new PropertyModel(node, getPropertyExpression()), (NodeModel) ((DefaultMutableTreeNode) node).getUserObject(), node, userType, fieldType);
	}else{
		return new EditablePanelListInherited(id, new PropertyModel(node, getPropertyExpression()), (NodeModel) ((DefaultMutableTreeNode) node).getUserObject(), node, userType, fieldType);
	}
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:22,代码来源:PropertyEditableColumnList.java

示例4: newCell

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
/**
 * @see IColumn#newCell(MarkupContainer, String, TreeNode, int)
 */
public Component newCell(MarkupContainer parent, String id, TreeNode node, int level)
{
	if(!((NodeModel) ((DefaultMutableTreeNode) node).getUserObject()).isNodeEditable()){
		return new EditablePanelEmpty(id);
	}

	if(DelegatedAccessConstants.TYPE_ACCESS_SHOPPING_PERIOD_USER == userType){
		if(!((NodeModel) ((DefaultMutableTreeNode) node).getUserObject()).getNodeShoppingPeriodAdmin()){
			return new EditablePanelEmpty(id);
		}
	}
	
	if(((NodeModel) ((DefaultMutableTreeNode) node).getUserObject()).isDirectAccess()){
		return new EditablePanelAdvancedOptions(id, new PropertyModel(node, getPropertyExpression()), (NodeModel) ((DefaultMutableTreeNode) node).getUserObject(), node, userType);
	}else{
		return new EditablePanelAdvancedOptionsText(id, new PropertyModel(node, getPropertyExpression()), (NodeModel) ((DefaultMutableTreeNode) node).getUserObject(), node, userType);
	}
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:22,代码来源:PropertyEditableColumnAdvancedOptions.java

示例5: getFeedbackPanel

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
@Override
public FeedbackPanel getFeedbackPanel(String id, int level, MarkupContainer component) {
	return new ErrorLevelFeedbackPanel(id, level) {
		private static final long serialVersionUID = 4843857703266180362L;
		
		private boolean visible = false;
		
		@Override
		public boolean isVisible() {
			return visible;
		}
		
		@Override
		protected void onConfigure() {
			// cf WICKET-4536 : ceci dit, même après mise à jour, on a encore eu des cas avec le problème
			// du coup, on laisse comme ça
			super.onConfigure();
			
			visible = anyMessage(level);
		}
	};
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:23,代码来源:AnimatedGlobalFeedbackPanel.java

示例6: getDeleteLink

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
protected MarkupContainer getDeleteLink(String id, final IModel<? extends T> itemModel) {
	return AjaxConfirmLink.<T>build()
			.title(getDeleteConfirmationTitleModel(itemModel))
			.content(getDeleteConfirmationTextModel(itemModel))
			.yes(getDeleteConfirmationYesLabelModel(itemModel))
			.no(getDeleteConfirmationNoLabelModel(itemModel))
			.onClick(new AbstractAjaxAction() {
				private static final long serialVersionUID = 1L;
				@Override
				public void execute(AjaxRequestTarget target) {
					try {
						doDeleteItem(itemModel);
						Session.get().success(getString("common.delete.success"));
					} catch (Exception e) {
						Session.get().error(getString("common.delete.error"));
					}
					target.add(getPage());
					dataProvider.detach();
					FeedbackUtils.refreshFeedback(target, getPage());
				}
			})
			.create(id, ReadOnlyModel.of(itemModel));
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:24,代码来源:AbstractGenericItemListPanel.java

示例7: onAjaxEvent

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
protected void onAjaxEvent(AjaxRequestTarget target) {
	// update the container (parent) of the pageable, this assumes that
	// the pageable is a component, and that it is a child of a web
	// markup container.
	
	Component container = ((Component)getPageable());
	// no need for a nullcheck as there is bound to be a non-repeater
	// somewhere higher in the hierarchy
	while (container instanceof AbstractRepeater) {
		container = container.getParent();
	}
	target.add(container);
	
	// in case the navigator is not contained by the container, we have
	// to add it to the response
	if (((MarkupContainer)container).contains(this, true) == false) {
		target.add(this);
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:20,代码来源:HideableAjaxPagingNavigator.java

示例8: SuccessFragment

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
public SuccessFragment(String id, String markupId, MarkupContainer markupProvider, User user) {
    super(id, markupId, markupProvider);
    this.user = user;
    this.provider = markupProvider;

    BookmarkablePageLink<LoginPage> loginLink = new BookmarkablePageLink<>("login", LoginPage.class);
    loginLink.
            add(new Label("loginlabel", new StringResourceModel("label.success.loginlink", provider, null, new Object[]{secondsToRedirect})));
    addOrReplace(loginLink);

    if (user.getSource() == LDAP) {
        addOrReplace(new Label("message", new StringResourceModel("label.success.ldap", provider, null, new Object[]{this.user.
            getFullName(), this.user.getUserName()})).
                setEscapeModelStrings(false));
    } else {
        addOrReplace(new Label("message", new StringResourceModel("label.success", provider, null, new Object[]{this.user.
            getFullName(), this.user.getMail()})).
                setEscapeModelStrings(false));
    }
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:21,代码来源:ConfirmRegistrationPage.java

示例9: ResendRegistrationLinkFragment

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
public ResendRegistrationLinkFragment(
		final MarkupContainer markupProvider, final String email) {
	super("info", "resendRegistrationInfo", markupProvider);

	// add register link
	PageParameters parameters = new PageParameters();
	parameters.add("email", email);
	add(new Link<Void>("resendRegistrationLink") {

		private static final long serialVersionUID = -5958845052833917370L;

		@Override
		public void onClick() {
			resendRegistrationConfirmationEmail(email);
		}

	});
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:19,代码来源:InfoPage.java

示例10: findComponent

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
public static <T extends Component> T findComponent(final Class<T> componentType, final Component fromComponent) {
    if (componentType.isAssignableFrom(fromComponent.getClass())) {
        return (T) fromComponent;
    }
    final T parentComponent = fromComponent.findParent(componentType);
    if (parentComponent != null) {
        return parentComponent;
    }
    if (fromComponent instanceof MarkupContainer) {
        final MarkupContainer markupContainer = (MarkupContainer) fromComponent;
        final T childComponent = findChildComponent(componentType, markupContainer);
        if (childComponent != null) {
            return childComponent;
        }
    }
    return (T) null;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:18,代码来源:Components.java

示例11: respond

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
@Override
protected void respond(AjaxRequestTarget target) {
	int fromList = RequestCycle.get().getRequest().getPostParameters()
			.getParameterValue("fromList").toInt();
	int fromItem = RequestCycle.get().getRequest().getPostParameters()
			.getParameterValue("fromItem").toInt();
	int toList = RequestCycle.get().getRequest().getPostParameters()
			.getParameterValue("toList").toInt();
	int toItem = RequestCycle.get().getRequest().getPostParameters()
			.getParameterValue("toItem").toInt();
	if (fromList != toList || fromItem != toItem) {
		onSort(target, new SortPosition(fromList, fromItem), new SortPosition(toList, toItem));
		String script = String.format("gitplex.server.form.markDirty($('#%s').closest('form.leave-confirm'));", 
				getComponent().getMarkupId(true));
		target.appendJavaScript(script);
		
		for (Component each: target.getComponents()) {
			if (each == getComponent()) {
				target.appendJavaScript(getSortScript());
				break;
			}
			MarkupContainer container = (MarkupContainer) each;
			if (container.contains(getComponent(), true)) {
				target.appendJavaScript(getSortScript());
				break;
			}
		}
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:30,代码来源:SortBehavior.java

示例12: getMarkupResourceStream

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
public IResourceStream getMarkupResourceStream(
		MarkupContainer container, Class<?> containerClass) {
	String html = 
			"<wicket:panel>" +
			"	<input type='checkbox' wicket:id='checkbox'></input>" +
			"</wicket:panel>";
	return new StringResourceStream(html);
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:SelectionColumn.java

示例13: getMarkupResourceStream

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
@Override
public final IResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> containerClass) {
    if (CmsPage.class.isAssignableFrom(containerClass) && containerClass != CmsPage.class) {
        DSLContext context = Spring.getBean(DSLContext.class);
        PageTable pageTable = Tables.PAGE.as("pageTable");
        PagePojo page = context.select(pageTable.fields()).from(pageTable).where(pageTable.PAGE_ID.eq(getPageUUID())).fetchOneInto(PagePojo.class);
        String html = page.getHtml();
        StringResourceStream stream = new StringResourceStream("page_" + page.getPageId(), html);
        return stream;
    } else {
        DefaultMarkupResourceStreamProvider streamProvider = new DefaultMarkupResourceStreamProvider();
        return streamProvider.getMarkupResourceStream(container, containerClass);
    }
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:15,代码来源:CmsPage.java

示例14: getMarkupResourceStream

import org.apache.wicket.MarkupContainer; //导入依赖的package包/类
@Override
public final IResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> containerClass) {
    if (CmsLayout.class.isAssignableFrom(containerClass) && containerClass != CmsLayout.class) {
        DSLContext context = Spring.getBean(DSLContext.class);
        LayoutTable layoutTable = Tables.LAYOUT.as("layoutTable");
        LayoutPojo layout = context.select(layoutTable.fields()).from(layoutTable).where(layoutTable.LAYOUT_ID.eq(getLayoutUUID())).fetchOneInto(LayoutPojo.class);
        String html = layout.getHtml();
        StringResourceStream stream = new StringResourceStream("layout_" + layout.getLayoutId(), html);
        return stream;
    } else {
        DefaultMarkupResourceStreamProvider streamProvider = new DefaultMarkupResourceStreamProvider();
        return streamProvider.getMarkupResourceStream(container, containerClass);
    }
}
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:15,代码来源:CmsLayout.java

示例15: 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));
       }
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:16,代码来源:FocusSummaryPanel.java


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