當前位置: 首頁>>代碼示例>>Java>>正文


Java BookmarkablePageLink.setVisible方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.html.link.BookmarkablePageLink.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java BookmarkablePageLink.setVisible方法的具體用法?Java BookmarkablePageLink.setVisible怎麽用?Java BookmarkablePageLink.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.html.link.BookmarkablePageLink的用法示例。


在下文中一共展示了BookmarkablePageLink.setVisible方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addMenuElement

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //導入方法依賴的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);
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:18,代碼來源:AbstractWebPageTemplate.java

示例2: getLocationLink

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //導入方法依賴的package包/類
public static BookmarkablePageLink<Void> getLocationLink(String id, LocationDto dto) {
    PageParameters parameters = getParameters(dto);
    BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(id, LocationViewPage.class, parameters);
    link.setEnabled(dto != null);
    link.setVisible(dto != null);
    return link;
}
 
開發者ID:openNaEF,項目名稱:openNaEF,代碼行數:8,代碼來源:LocationUtil.java

示例3: populateItem

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //導入方法依賴的package包/類
@Override
protected void populateItem(ListItem<ChampionMasteryItem> item) {
    ChampionMasteryItem mastery = item.getModelObject();
    ChampionStatisticItem championStatistic = null;
    // create boolean to storing whether or not element should be shown
    // set to false if mastery or championStatistic is null
    boolean visible = true;
    // check if mastery is null

    if (mastery != null) {
        championStatistic = PageDataProvider.getChampionStatisticById(mastery.getChampionId());
    } else {
        // if mastery is null create a new one and fill it with default data
        mastery = new ChampionMasteryItem();
        mastery.setChampionPoints(42);
        mastery.setChampionLevel(1);
        visible = false;
    }
    if (championStatistic == null) {
        // if champion statistic is null use default champion for statistic
        championStatistic = PageDataProvider.championStatisticMap.get("bard");
        visible = false;
    }

    // create link to champion page
    PageParameters linkParameters = new PageParameters();
    linkParameters.set(0, championStatistic.getKeyName());
    BookmarkablePageLink<String> link = new BookmarkablePageLink<>("champion_link",
            SingleChampionPage.class, linkParameters);
    item.add(link);

    // add champion portrait, name and mastery score as well as champion level
    link.add(new ExternalImage("champion_portrait", championStatistic.getPortraitUrl()));
    link.add(new Label("champion_name", championStatistic.getChampionName()));
    link.add(new Label("champion_stats", String.format("%s - Level %d", NumberFormatter.formatLong(
            mastery.getChampionPoints()), mastery.getChampionLevel())));

    // hide link if necessary
    link.setVisible(visible);
}
 
開發者ID:LogicalOverflow,項目名稱:MasterStats,代碼行數:41,代碼來源:SingleSummonerPage.java

示例4: createHistoryLink

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //導入方法依賴的package包/類
private MarkupContainer createHistoryLink(String id, IModel<BoxItemDataMap> boxItemModel) {
    BoxItemDataMap boxItem        = boxItemModel.getObject();
    PageParameters pageParameters = new PageParameters();
    if (boxItem.getFlowInstanceId() != null) {
        pageParameters.add(REQUIREMENT_ID, boxItem.getCod());
        pageParameters.add(INSTANCE_ID, boxItem.getFlowInstanceId());
        pageParameters.add(MODULE_PARAM_NAME, getModule().getCod());
        pageParameters.add(MENU_PARAM_NAME, getMenu());
    }
    BookmarkablePageLink<?> historiLink = new BookmarkablePageLink<>(id, getHistoricoPage(), pageParameters);
    historiLink.setVisible(boxItem.getProcessBeginDate() != null);
    return historiLink;
}
 
開發者ID:opensingular,項目名稱:singular-server,代碼行數:14,代碼來源:BoxContent.java

示例5: initComponents

import org.apache.wicket.markup.html.link.BookmarkablePageLink; //導入方法依賴的package包/類
private void initComponents() {

            Label summaryResultLabel = new Label("summaryResultLabel",new StringResourceModel("portal.design.service.summary_result.title", null));
            add(summaryResultLabel);

            String key = "";
            logger.debug("looking for key");

            if (!canCreateEnvironment) {
                key = "portal.design.service.summary.read.only";
            } else if (isLocked) {
                key = "portal.design.service.summary.locked";
            } else if (isLogicalDeploymentConsistent) {
                key = "portal.design.service.summary.validated";
            } else {
                key = "portal.design.service.summary.errors";
            }
            
            statusLabel = new Label("archiValidatedLabel", new StringResourceModel(key, null));
            add(statusLabel);
            PageParameters newEnvPageParameters = new PageParameters(params);
            newEnvPageParameters.set("new", "1");

            BookmarkablePageLink<Page> newEnv = new BookmarkablePageLink<Page>("newEnvLink", SelectedReleasePage.class, newEnvPageParameters);
            newEnv.setVisible(isLogicalDeploymentConsistent && canCreateEnvironment);
            add(newEnv);

    }
 
開發者ID:orange-cloudfoundry,項目名稱:elpaaso-core,代碼行數:29,代碼來源:DesignerArchitectureSummaryPanel.java


注:本文中的org.apache.wicket.markup.html.link.BookmarkablePageLink.setVisible方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。