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


Java IHeaderContributor类代码示例

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


IHeaderContributor类属于org.apache.wicket.markup.html包,在下文中一共展示了IHeaderContributor类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: syndicationDiscoveryLink

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
public static HeaderContributor syndicationDiscoveryLink(final String feedTitle,
		final String url) {
	return new HeaderContributor(new IHeaderContributor() {
		private static final long serialVersionUID = 1L;

		public void renderHead(IHeaderResponse response) {
			String contentType = "application/rss+xml";

			StringBuilder buffer = new StringBuilder();
			buffer.append("<link rel=\"alternate\" ");
			buffer.append("type=\"").append(contentType).append("\" ");
			buffer.append("title=\"").append(feedTitle).append("\" ");
			buffer.append("href=\"").append(url).append("\" />");
			response.renderString(buffer.toString());
		}
	});
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:18,代码来源:WicketUtils.java

示例2: addCss

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
public ResourcePackage addCss(final String path, final String media) {
    add(new IHeaderContributor() {
        @Override
        public void renderHead(IHeaderResponse response) {
            response.renderCSSReference(new CssResourceReference(scope, path), media);
        }
    });
    return this;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:10,代码来源:ResourcePackage.java

示例3: addJavaScript

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
public ResourcePackage addJavaScript(final String path) {
    add(new IHeaderContributor() {
        @Override
        public void renderHead(IHeaderResponse response) {
            response.renderJavaScriptReference(new JavaScriptResourceReference(scope, path));
        }
    });
    return this;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:10,代码来源:ResourcePackage.java

示例4: addCssTemplate

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
public ResourcePackage addCssTemplate(final String path) {
    add(new IHeaderContributor() {
        @Override
        public void renderHead(IHeaderResponse response) {
            String script = readInterpolatedString(path);
            ICssCompressor compressor = Application.get().getResourceSettings().getCssCompressor();
            if (compressor != null) {
                script = compressor.compress(script);
            }
            response.renderCSS(script, null);
        }
    });
    return this;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:15,代码来源:ResourcePackage.java

示例5: addJavaScriptTemplate

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
public ResourcePackage addJavaScriptTemplate(final String path) {
    add(new IHeaderContributor() {
        @Override
        public void renderHead(IHeaderResponse response) {
            String script = readInterpolatedString(path);
            script = JavaScriptUtils.compress(script);
            response.renderJavaScript(script, null);
        }
    });
    return this;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:12,代码来源:ResourcePackage.java

示例6: add

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
private void add(IHeaderContributor contributor) {
    contributors.add(contributor);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:4,代码来源:ResourcePackage.java

示例7: renderHead

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
@Override
public void renderHead(Component component, IHeaderResponse response) {
    for (IHeaderContributor contributor : contributors) {
        contributor.renderHead(response);
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:7,代码来源:ResourcePackage.java

示例8: ActionsColumn

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
public ActionsColumn(AbstractDataTablePanel<T> dataTablePanel, AccessController accessController) {

        super(Model.of(""));

        this.dataTablePanel = dataTablePanel;
        this.accessController = accessController;

        ajaxBehavior = new AbstractDefaultAjaxBehavior() {
            @Override
            protected void respond(AjaxRequestTarget target) {
                onAction(target);
            }
        };

        dataTablePanel.add(ajaxBehavior);

        dataTablePanel.addHeaderContributor(new IHeaderContributor() {
            @Override
            public void renderHead(IHeaderResponse response) {
                String script = String.format("Panelized.DataTable.initActions('#%s', '%s');", ActionsColumn.this.dataTablePanel.getMarkupId(), getCallbackUrl());
                response.render(OnDomReadyHeaderItem.forScript(script));
            }
        });


//      multiActionConfirmPopup = new ConfirmationPopUpPanel<Void>(newPanelId(), "Confirm Action");
//      addPanel(multiActionConfirmPopup);
//      multiActionConfirmPopup.setEscapeHtml(false);
//      multiActionConfirmPopup.setSize(PopUpFormPanel.Size.LARGE);
//
//      multiActionConfirmPopup.addSaveButton("Continue", new AjaxAction() {
//          @Override
//          public void invoke(AjaxRequestTarget target) {
//              multiAction.invoke(target, multiActionRowIds);
//              multiActionConfirmPopup.hide(target);
//          }
//      });
//
//      multiActionConfirmPopup.addCancelButton();

    }
 
开发者ID:jkrasnay,项目名称:panelized,代码行数:42,代码来源:ActionsColumn.java

示例9: renderHead

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
    for (IHeaderContributor contributor : headerContributors) {
        contributor.renderHead(response);
    }
}
 
开发者ID:jkrasnay,项目名称:panelized,代码行数:7,代码来源:AbstractDataTablePanel.java

示例10: addHeaderContributor

import org.apache.wicket.markup.html.IHeaderContributor; //导入依赖的package包/类
/**
 * Adds an IHeaderContributor to be rendered by this component to the page
 * header. This is used by colums that need to hook into the component
 * initialization process.
 */
public void addHeaderContributor(IHeaderContributor headerContributor) {
    headerContributors.add(headerContributor);
}
 
开发者ID:jkrasnay,项目名称:panelized,代码行数:9,代码来源:AbstractDataTablePanel.java


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