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


Java ExternalLink.setVisible方法代码示例

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


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

示例1: createHistoryLink

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public static ExternalLink createHistoryLink(NaefDto dto) {
    try {
        CoreConfiguration config = CoreConfiguration.getInstance();
        String url = config.getInventoryHistoryUrl() + (dto != null ? DtoUtil.getMvoId(dto).toString() : "");
        ExternalLink link = new ExternalLink("history", Model.of(url), Model.of("History"));
        link.setEnabled(dto != null);
        link.setVisible(dto != null);
        return link;
    } catch (Exception e) {
        throw ExceptionUtils.throwAsRuntime(e);
    }
}
 
开发者ID:openNaEF,项目名称:openNaEF,代码行数:13,代码来源:HistoryUtil.java

示例2: initComponents

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalOnlineStorageServicePanelIcon",new ResourceModel("onlineStorage-icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
        RequiredTextField<String> label = new RequiredTextField<String>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.storage.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        TextField<String> serviceName = new TextField<String>("serviceName");
        serviceName.setLabel(new StringResourceModel("portal.designer.service.storage.name", null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);

        TextField storageCapacityMb = new TextField("storageCapacityMb");
        storageCapacityMb.setLabel(new StringResourceModel("portal.designer.service.storage.storageCapacityMb",null));
        storageCapacityMb.add(new AttributeModifier("class","small"));
        storageCapacityMb.add(new PropertyValidator<>());
        getServiceForm().add(storageCapacityMb);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:36,代码来源:LogicalOnlineStorageServicePanel.java

示例3: initComponents

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initComponents() {
	 getServiceForm().add(new CacheActivatedImage("logicalRelationnalDatabasePanelIcon",new ResourceModel("onlinedatabase.icon").getObject()));
	// Online help link
	String completeHelpUrl = "";
	try {
		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
    			+ new StringResourceModel("portal.designer.logical.service.online_manual.relationaldatabase", null).getString();
	} catch (Exception e) {
		//do nothing
	}
	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
	getServiceForm().add(onlineHelpLink);
	if (completeHelpUrl.isEmpty()) {
		onlineHelpLink.setVisible(false);
	}
	
    // FUNCTIONNAL PARAMETERS
    final RequiredTextField<String> label = new RequiredTextField<String>("label");
    label.setLabel(new StringResourceModel("portal.designer.service.reldb.label",null));
    label.add(new PropertyValidator<>());
    getServiceForm().add(label);

    TextField<String> serviceName = new TextField<String>("serviceName");
    serviceName.setLabel(new StringResourceModel("portal.designer.service.reldb.serviceName",null));
    serviceName.add(new PropertyValidator<>());
    getServiceForm().add(serviceName);

    DropDownChoice<LogicalRelationalServiceSqlDialectEnum> sqlVersion = new DropDownChoice<LogicalRelationalServiceSqlDialectEnum>("sqlVersion", Arrays.asList(LogicalRelationalServiceSqlDialectEnum.values()));
    sqlVersion.setLabel(new StringResourceModel("portal.designer.service.reldb.sqlVersion",null));
    sqlVersion.add(new PropertyValidator<>());
    getServiceForm().add(sqlVersion);


    // SLO
    TextField capacityMo = new TextField("capacityMo");
    capacityMo.setLabel(new StringResourceModel("portal.designer.service.reldb.capacityMo",null));
    capacityMo.add(new AttributeModifier("class","small"));
    capacityMo.add(new PropertyValidator<>());
    getServiceForm().add(capacityMo);
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:41,代码来源:LogicalRelationalDatabasePanel.java

示例4: initComponents

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalRabbitMQPanelIcon",new ResourceModel("rabbitmq.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
    	RequiredTextField<String> serviceLabel = new RequiredTextField<String>("label");
        serviceLabel.setLabel(new StringResourceModel("portal.designer.service.rabbitmq.service.label",null));
        serviceLabel.add(new PropertyValidator<>());
        getServiceForm().add(serviceLabel);

        // Cloudfoundry rabbitMQ service name
        RequiredTextField<String> serviceName = new RequiredTextField<String>("serviceName");
         //add help tooltip
        serviceName.add(new AttributeModifier("title", new StringResourceModel("portal.designer.service.rabbitmq.service.name.help",null)));
        serviceName.setLabel(new StringResourceModel("portal.designer.service.rabbitmq.service.name",null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);
       
     

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:35,代码来源:LogicalRabbitMQServicePanel.java

示例5: populateSlotInfo

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void populateSlotInfo(NodeDto node) {
    ListView<SlotDto> slotTable = new ListView<SlotDto>("slotTable", slotsModel) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(ListItem<SlotDto> item) {
            final SlotDto slot = item.getModelObject();
            slot.renew();
            final ModuleDto module = slot.getModule();
            String endOfUseClass = null;
            if (NodeUtil.isEndOfUse(slot)) {
                endOfUseClass = "end-of-use";
            }
            AttributeAppender appender = new AttributeAppender("class", new Model<String>(endOfUseClass), " ");
            item.add(appender);

            Link<Void> editSlot = new Link<Void>("editSlot") {
                private static final long serialVersionUID = 1L;

                @Override
                public void onClick() {
                    setResponsePage(new SlotEditPage(SimpleNodeDetailPage.this, slot));
                }
            };
            item.add(editSlot);

            String slotId = NameUtil.getIfName(slot);
            editSlot.add(new Label("slotId", new Model<String>(slotId)));

            String slotType = HardwareRenderer.getSlotType(slot);
            item.add(new Label("slotType", new Model<String>(slotType)));

            String moduleName = HardwareRenderer.getModuleType(module);
            item.add(new Label("moduleName", new Model<String>(moduleName)));

            String operStatus = HardwareRenderer.getOperStatus(slot);
            item.add(new Label("operStatus", new Model<String>(operStatus)));

            String note = HardwareRenderer.getNote(slot);
            item.add(new Label("note", new Model<String>(note)));

            Label lastEditor = new Label("lastEditor", new Model<String>(HardwareRenderer.getLastEditor(slot)));
            item.add(lastEditor);
            Label lastEditTime = new Label("lastEditTime", new Model<String>(HardwareRenderer.getLastEditTime(slot)));
            item.add(lastEditTime);
            Label version = new Label("version", Model.of(HardwareRenderer.getVersion(slot)));
            item.add(version);

            Form<Void> deleteForm = new Form<Void>("removeModule");
            item.add(deleteForm);
            SubmitLink removeModuleLink = new SubmitLink("apply") {
                private static final long serialVersionUID = 1L;

                @Override
                public void onSubmit() {
                    ModuleRemovePage page = new ModuleRemovePage(SimpleNodeDetailPage.this, slot);
                    setResponsePage(page);
                }
            };
            removeModuleLink.setEnabled(slot.getModule() != null);
            removeModuleLink.setVisible(slot.getModule() != null);
            deleteForm.add(removeModuleLink);

            try {
                ExternalLink history = HistoryUtil.createHistoryLink(slot, "History");
                history.setEnabled(CoreConfiguration.getInstance().isDebug());
                history.setVisible(CoreConfiguration.getInstance().isDebug());
                item.add(history);
            } catch (Exception e) {
                throw ExceptionUtils.throwAsRuntime(e);
            }
        }
    };
    add(slotTable);
}
 
开发者ID:openNaEF,项目名称:openNaEF,代码行数:76,代码来源:SimpleNodeDetailPage.java

示例6: initComponent

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initComponent() {

    	getServiceForm().add(new CacheActivatedImage("logicalSoapConsummerPanelIcon",new ResourceModel("webserviceconsumer.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
        RequiredTextField<String> label = new RequiredTextField<String>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        TextField<String> jndiPrefix = new TextField<String>("jndiPrefix");
        jndiPrefix.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.jndiPrefix",null));
        jndiPrefix.add(new PropertyValidator<>());
        getServiceForm().add(jndiPrefix);

        DropDownChoice<LogicalSoapConsumer.SoapServiceDomainEnum> domain = new DropDownChoice<LogicalSoapConsumer.SoapServiceDomainEnum>("wsDomain", Arrays.asList(LogicalSoapConsumer.SoapServiceDomainEnum.values()));
        domain.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.wsdomain",null));
        domain.add(new PropertyValidator<>());
        getServiceForm().add(domain);

        TextField<String> serviceProviderName = new TextField<String>("serviceProviderName");
        serviceProviderName.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceProviderName",null));
        serviceProviderName.add(new PropertyValidator<>());
        getServiceForm().add(serviceProviderName);

        TextField<String> serviceName = new TextField<String>("serviceName");
        serviceName.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceName",null));
        serviceName.add(new PropertyValidator<>());
        getServiceForm().add(serviceName);

        TextField serviceMinorVersion = new TextField("serviceMinorVersion");
        serviceMinorVersion.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceMinorVersion",null));
        serviceMinorVersion.add(new AttributeModifier("class","small"));
        serviceMinorVersion.add(new PropertyValidator<>());
        getServiceForm().add(serviceMinorVersion);

        TextField serviceMajorVersion = new TextField("serviceMajorVersion");
        serviceMajorVersion.setLabel(new StringResourceModel("portal.designer.service.wsc_soap.serviceMajorVersion",null));
        serviceMajorVersion.add(new AttributeModifier("class","small"));
        serviceMajorVersion.add(new PropertyValidator<>());
        getServiceForm().add(serviceMajorVersion);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:57,代码来源:LogicalSoapConsumerPanel.java

示例7: initComponents

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalWebGuiPanelIcon",new ResourceModel("webui.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual.webgui", null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	getServiceForm().add(onlineHelpLink);
    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    	}
    	
        // FUNCTIONNAL PARAMETERS
        // Service label
        RequiredTextField<String> label = new RequiredTextField<String>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.gui.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        // Service context root
        RequiredTextField<String> contextRoot = new RequiredTextField<String>("contextRoot.value");
        contextRoot.setLabel(new StringResourceModel("portal.designer.service.gui.contextroot",null));
        contextRoot.add(new PropertyValidator<>());
        getServiceForm().add(contextRoot);

        // Service stateful state
        CheckBox statefulCb = new CheckBox("stateful");
        statefulCb.setLabel(new StringResourceModel("portal.designer.service.gui.stateful",null));
        statefulCb.add(new PropertyValidator<>());
        getServiceForm().add(statefulCb);

        // SLO
        // Service secure state
        CheckBox secureCb = new CheckBox("secure");
//        secureCb.setEnabled(false);
        secureCb.setLabel(new StringResourceModel("portal.designer.service.gui.secure",null));
        secureCb.add(new AttributeAppender("title", new StringResourceModel("portal.designer.service.notAvailable", null), " "));
        secureCb.add(new PropertyValidator<>());
        getServiceForm().add(secureCb);

        // Service max number of sessions
        TextField maxNumberSessions = new TextField("maxNumberSessions");
        maxNumberSessions.setLabel(new StringResourceModel("portal.designer.service.gui.maxNumberSessions",null));
        maxNumberSessions.add(new AttributeModifier("class", "small"));
        maxNumberSessions.add(new PropertyValidator<>());
        getServiceForm().add(maxNumberSessions);

        // Service max request per seconds
        final TextField maxReqPerSeconds = new TextField("maxReqPerSeconds");
        maxReqPerSeconds.setLabel(new StringResourceModel("portal.designer.service.gui.maxReqPerSeconds",null));
        maxReqPerSeconds.add(new AttributeAppender("title", new StringResourceModel("portal.designer.service.notAvailable", null), " "));
        maxReqPerSeconds.add(new PropertyValidator<>());
        getServiceForm().add(maxReqPerSeconds);

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:61,代码来源:LogicalWebGuiServicePanel.java

示例8: initComponents

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
private void initComponents() {

    	getServiceForm().add(new CacheActivatedImage("logicalconfig-icon",new ResourceModel("cfconfigservice.icon").getObject()));
    	// Online help link
    	String completeHelpUrl = "";
    	try {
    		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
        			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
    	} catch (Exception e) {
    		//do nothing
    	}
    	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
    	ExternalLink onlineHelpLinkOverride = new ExternalLink("onlineHelpLinkOverride", completeHelpUrl);

    	if (completeHelpUrl.isEmpty()) {
    		onlineHelpLink.setVisible(false);
    		onlineHelpLinkOverride.setVisible(false);
    	}

    	// Creates 2 blocks only for good displaying : Read more... juste after description (not possible with span wicket:id=descriptionLabel).
    	WebMarkupContainer descriptionBlock = new WebMarkupContainer("descriptionBlock");
    	descriptionBlock.add(onlineHelpLink);
    	getServiceForm().add(descriptionBlock);
    	
    	WebMarkupContainer overrideDescriptionBlock = new WebMarkupContainer("overrideDescriptionBlock");
    	overrideDescriptionBlock.add(onlineHelpLinkOverride);
    	getServiceForm().add(overrideDescriptionBlock);

        if (configOverride) {
        	descriptionBlock.setVisible(false);
        } else {
        	overrideDescriptionBlock.setVisible(false);
        }

    	
        // FUNCTIONNAL PARAMETERS    
        RequiredTextField<String> label = new RequiredTextField<>("label");
        label.setLabel(new StringResourceModel("portal.designer.service.config.label",null));
        label.add(new PropertyValidator<>());
        getServiceForm().add(label);

        TextField<String> keyPrefix = new TextField<>("keyPrefix", String.class);
        keyPrefix.setConvertEmptyInputStringToNull(false);
        keyPrefix.setLabel(new StringResourceModel("portal.designer.service.config.keyPrefix", null));
        keyPrefix.add(new PropertyValidator<>());
        getServiceForm().add(keyPrefix);

        configSetContent = new CodeMirrorTextArea<>("configSetContent", readOnly && !configOverride);

        configSetContent.setLabel(new StringResourceModel("portal.designer.service.config.configSetContent", null));
        configSetContent.add(new PropertyValidator<>());
        getServiceForm().add(configSetContent);

        configSetContent.add(new ConfigDuplicateKeysValidator());
        configSetContent.add(new ConfigMaxSizeValidator());
        configSetContent.add(new ConfigMaxNumberKeysValidator());
        configSetContent.add(new InvalidCharsetValidator());

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:60,代码来源:LogicalConfigServicePanel.java

示例9: LogicalQueueReceiveServicePanel

import org.apache.wicket.markup.html.link.ExternalLink; //导入方法依赖的package包/类
public LogicalQueueReceiveServicePanel(String id, IModel<LogicalQueueReceiveService> model, Page parentPage,
        boolean isNew, boolean readOnly, boolean configOverride) {
    super(id, model, parentPage, isNew, readOnly, configOverride);

    getServiceForm().add(new CacheActivatedImage("logicalqueuereceiveServicePanelIcon",new ResourceModel("queuereceive.icon").getObject()));
	// Online help link
	String completeHelpUrl = "";
	try {
		completeHelpUrl = new StringResourceModel("portal.designer.logical.service.online_manual.baseUrl", null).getString() 
    			+ new StringResourceModel("portal.designer.logical.service.online_manual." + getLogicalModelType(), null).getString();
	} catch (Exception e) {
		//do nothing
	}
	ExternalLink onlineHelpLink = new ExternalLink("onlineHelpLink", completeHelpUrl);
	getServiceForm().add(onlineHelpLink);
	if (completeHelpUrl.isEmpty()) {
		onlineHelpLink.setVisible(false);
	}
	
    // FUNCTIONNAL PARAMETERS
    RequiredTextField<String> label = new RequiredTextField<String>("label");
    label.setLabel(new StringResourceModel("portal.designer.service.queue_receive.label",null));
    label.add(new PropertyValidator<>());
    getServiceForm().add(label);

    TextField<String> serviceName = new TextField<String>("serviceName");
    serviceName.setLabel(new StringResourceModel("portal.designer.service.queue_receive.serviceName",null));
    serviceName.add(new PropertyValidator<>());
    getServiceForm().add(serviceName);

    TextField serviceVersion = new TextField("serviceVersion");
    serviceVersion.setLabel(new StringResourceModel("portal.designer.service.queue_receive.serviceVersion",null));
    serviceVersion.add(new PropertyValidator<>());
    getServiceForm().add(serviceVersion);

    TextField<String> jndiQueueName = new TextField<String>("jndiQueueName");
    jndiQueueName.setLabel(new StringResourceModel("portal.designer.service.queue_receive.jndiQueueName",null));
    jndiQueueName.add(new AttributeAppender("title", new StringResourceModel("portal.designer.service.queue_receive.preferredJNDI", null), " "));
    jndiQueueName.add(new PropertyValidator<>());
    getServiceForm().add(jndiQueueName);

    DropDownChoice<Long> msgMaxSizeKB = new DropDownChoice<Long>("msgMaxSizeKB", Arrays.asList(maxMsgSizeList));
    msgMaxSizeKB.add(defaultDropDownUpdateBehavior());
    getServiceForm().add(msgMaxSizeKB);
    msgMaxSizeKB.setLabel(new StringResourceModel("portal.designer.service.queue_receive.msgMaxSizeKB",null));
    msgMaxSizeKB.add(new PropertyValidator<>());

    DropDownChoice<Long> maxNbMsgPerDay = new DropDownChoice<Long>("maxNbMsgPerDay", Arrays.asList(maxNbMsgPerDayList));
    maxNbMsgPerDay.add(defaultDropDownUpdateBehavior());
    getServiceForm().add(maxNbMsgPerDay);
    maxNbMsgPerDay.setLabel(new StringResourceModel("portal.designer.service.queue_receive.maxNbMsgPerDay",null));
    maxNbMsgPerDay.add(new PropertyValidator<>());

    DropDownChoice<Long> nbRetentionDay = new DropDownChoice<Long>("nbRetentionDay", Arrays.asList(nbRetentionDayList));
    nbRetentionDay.add(defaultDropDownUpdateBehavior());
    getServiceForm().add(nbRetentionDay);
    nbRetentionDay.setLabel(new StringResourceModel("portal.designer.service.queue_receive.nbRetentionDay",null));
    nbRetentionDay.add(new PropertyValidator<>());
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:60,代码来源:LogicalQueueReceiveServicePanel.java


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