本文整理匯總了Java中org.apache.tapestry5.services.MarkupRendererFilter類的典型用法代碼示例。如果您正苦於以下問題:Java MarkupRendererFilter類的具體用法?Java MarkupRendererFilter怎麽用?Java MarkupRendererFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MarkupRendererFilter類屬於org.apache.tapestry5.services包,在下文中一共展示了MarkupRendererFilter類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareHTMLPageOnRender
import org.apache.tapestry5.services.MarkupRendererFilter; //導入依賴的package包/類
@Contribute(MarkupRenderer.class)
public static void prepareHTMLPageOnRender(final OrderedConfiguration<MarkupRendererFilter> configuration,
final RequestGlobals requestGlobals, final PageRenderLinkSource pageRenderLinkSource) {
configuration.add("AddPageName", new MarkupRendererFilter() {
@Override
public void renderMarkup(final MarkupWriter writer, final MarkupRenderer renderer) {
renderer.renderMarkup(writer);
Element html = writer.getDocument().find("html");
if (html != null) {
Link link = pageRenderLinkSource.createPageRenderLinkWithContext(requestGlobals.getActivePageName());
for (String parameterName : link.getParameterNames()) {
link = link.removeParameter(parameterName);
}
String url = link.toURI();
html.attributes("data-page-base-url", url);
}
}
});
}
示例2: contributeMarkupRenderer
import org.apache.tapestry5.services.MarkupRendererFilter; //導入依賴的package包/類
@Contribute(MarkupRenderer.class)
public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration,
@Symbol(value = NEW_RELIC_DISABLED) boolean disabled) {
if(!disabled ) {
MarkupRendererFilter realUserMonitorMarkupHeaderRenderFilter = new RealUserMonitorMarkupRenderFilter(true);
configuration.add("realUserMonitorMarkupHeaderRenderFilter", realUserMonitorMarkupHeaderRenderFilter, "after:*");
MarkupRendererFilter realUserMonitorMarkupFooterRenderFilter = new RealUserMonitorMarkupRenderFilter(false);
configuration.add("realUserMonitorMarkupFooterRenderFilter", realUserMonitorMarkupFooterRenderFilter, "after:realUserMonitorMarkupHeaderRenderFilter");
}
}
示例3: contributeMarkupRenderer
import org.apache.tapestry5.services.MarkupRendererFilter; //導入依賴的package包/類
public static void contributeMarkupRenderer(final OrderedConfiguration<MarkupRendererFilter> configuration) {
configuration.addInstance("modal-support", ModalSupportMarkupRenderer.class,
OrderConstraintBuilder.afterAll().build());
}