本文整理汇总了Java中org.apache.wicket.markup.head.StringHeaderItem类的典型用法代码示例。如果您正苦于以下问题:Java StringHeaderItem类的具体用法?Java StringHeaderItem怎么用?Java StringHeaderItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringHeaderItem类属于org.apache.wicket.markup.head包,在下文中一共展示了StringHeaderItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
// get the Sakai skin header fragment from the request attribute
final HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
response.render(StringHeaderItem.forString((String) request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
// Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
// render jQuery and the Wicket event library
// Both must be priority so they are emitted into the head
final String cdnQuery = PortalUtils.getCDNQuery();
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format(PortalUtils.getLatestJQueryPath()+ "?version=%s", cdnQuery))));
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format("/my-calendar/scripts/wicket/wicket-event-jquery.min.js?version=%s", cdnQuery))));
// NOTE: All libraries apart from jQuery and Wicket Event must be rendered inline with the application. See WidgetPage.html.
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:22,代码来源:WidgetPage.java
示例2: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
// get the Sakai skin header fragment from the request attribute
final HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
response.render(StringHeaderItem.forString((String) request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
// Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
// render jQuery and the Wicket event library
// Both must be priority so they are emitted into the head
final String cdnQuery = PortalUtils.getCDNQuery();
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format(PortalUtils.getLatestJQueryPath()+ "?version=%s", cdnQuery))));
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format("/my-calendar/scripts/wicket/wicket-event-jquery.min.js?version=%s", cdnQuery))));
// NOTE: All libraries apart from jQuery and Wicket Event must be rendered inline with the application. See WidgetPage.html.
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:22,代码来源:WidgetPage.java
示例3: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
// get the Sakai skin header fragment from the request attribute
final HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
final String sakaiHtmlHead = (String) request.getAttribute("sakai.html.head");
if (StringUtils.isNotBlank(sakaiHtmlHead)) {
response.render(StringHeaderItem.forString((String) request.getAttribute("sakai.html.head")));
}
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
// Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
response.render(CssHeaderItem.forUrl("/profile2-tool/css/profile2.css"));
response.render(JavaScriptHeaderItem.forUrl("/profile2-tool/javascript/profile2.js"));
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:19,代码来源:BasePage.java
示例4: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
final String version = this.serverConfigurationService.getString("portal.cdn.version", "");
// get the Sakai skin header fragment from the request attribute
final HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
response.render(StringHeaderItem.forString((String) request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
// Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
// render jQuery and the Wicket event library
// Both must be priority so they are emitted into the head
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format("/library/webjars/jquery/1.12.4/jquery.min.js?version=%s", version))));
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format("/site-description/scripts/wicket/wicket-event-jquery.min.js?version=%s", version))));
// NOTE: All libraries apart from jQuery and Wicket Event must be rendered inline with the application. See WidgetPage.html.
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:24,代码来源:WidgetPage.java
示例5: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
final String version = this.serverConfigurationService.getString("portal.cdn.version", "");
// get the Sakai skin header fragment from the request attribute
final HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
response.render(StringHeaderItem.forString((String) request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
// Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
// render jQuery and the Wicket event library
// Both must be priority so they are emitted into the head
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format("/library/webjars/jquery/1.12.4/jquery.min.js?version=%s", version))));
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forUrl(String.format("/mycalendar/scripts/wicket/wicket-event-jquery.min.js?version=%s", version))));
// additional styles (datepicker, this widget etc)
response.render(CssHeaderItem.forUrl(String.format("/library/webjars/jquery-ui/1.12.1/jquery-ui.min.css?version=%s", version)));
// NOTE: All libraries apart from jQuery and Wicket Event must be rendered inline with the application. See WidgetPage.html.
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:27,代码来源:WidgetPage.java
示例6: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
String contextPath = RequestCycle.get().getRequest().getContextPath();
Map<String, String> replacements = Collections.singletonMap("contextPath", getContextPath());
MapVariableInterpolator variableInterpolator = new MapVariableInterpolator(FAVICON_HEADER, replacements);
response.render(StringHeaderItem.forString(variableInterpolator.toString()));
String designUrl = String.format("/assets/css/bootstrap-%s.min.css", designSelector.getDesignType());
response.render(CssHeaderItem.forUrl(contextPath + designUrl));
response.render(CssHeaderItem.forUrl(contextPath + "/assets/css/bootstrap-theme-shop.css"));
response.render(JavaScriptHeaderItem.forUrl(contextPath + "/assets/js/bootstrap.min.js"));
response.render(CssHeaderItem.forUrl(contextPath + "/assets/css/bootstrap-addon.css"));
}
开发者ID:zutherb,项目名称:AppStash,代码行数:18,代码来源:AbstractBasePage.java
示例7: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response)
{
super.renderHead(response);
response.render(JavaScriptReferenceHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
response.render(StringHeaderItem.forString(WicketUtils.getCssForFavicon(getUrl("/favicon.ico"))));
if (WebConfiguration.isDevelopmentMode() == true) {
response.render(CssReferenceHeaderItem.forUrl("mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + "/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".css"));
} else {
response.render(CssReferenceHeaderItem.forUrl("mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + "/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".min.css"));
}
response.render(CssReferenceHeaderItem.forUrl("mobile/projectforge.css"));
response.render(JavaScriptReferenceHeaderItem.forUrl("mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + "/myconfig.js"));
if (WebConfiguration.isDevelopmentMode() == true) {
// response.renderJavaScriptReference("mobile/jquery.mobile/myconfig.js");
response.render(JavaScriptReferenceHeaderItem.forUrl("mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + "/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".js"));
} else {
// response.renderJavaScriptReference("mobile/jquery.mobile/myconfig.js");
response.render(JavaScriptReferenceHeaderItem.forUrl("mobile/jquery.mobile-" + JQUERY_MOBILE_VERSION + "/jquery.mobile-" + JQUERY_MOBILE_VERSION + ".min.js"));
}
}
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:22,代码来源:AbstractMobilePage.java
示例8: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
public void renderHead(Component component, IHeaderResponse response) {
response.render(StringHeaderItem.forString("<script type=\"text/javascript\">" +
"$(document).ready( function(){" +
"autoFill('#" + component.getMarkupId() + "', '" + defaultStatus + "');" +
"countChars('#" + component.getMarkupId() + "');" +
"});" +
"</script>"));
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:9,代码来源:MyStatusPanel.java
示例9: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
/**
* This block adds the required wrapper markup to style it like a Sakai tool.
* Add to this any additional CSS or JS references that you need.
*
*/
public void renderHead(IHeaderResponse response) {
//get Sakai skin
String skinRepo = sakaiProxy.getSkinRepoProperty();
String toolCSS = sakaiProxy.getToolSkinCSS(skinRepo);
String toolBaseCSS = skinRepo + "/tool_base.css";
//Sakai additions
response.render(JavaScriptHeaderItem.forUrl("/library/js/headscripts.js"));
response.render(CssHeaderItem.forUrl(toolBaseCSS));
response.render(CssHeaderItem.forUrl(toolCSS));
response.render(OnDomReadyHeaderItem.forScript("setMainFrameHeight( window.name )"));
StringBuilder headJs = new StringBuilder();
headJs.append("var sakai = sakai || {}; sakai.editor = sakai.editor || {}; " +
"sakai.editor.editors = sakai.editor.editors || {}; " +
"sakai.editor.editors.ckeditor = sakai.editor.editors.ckeditor || {}; " +
"sakai.locale = sakai.locale || {};\n");
headJs.append("sakai.locale.userCountry = '" + rloader.getLocale().getCountry() + "';\n");
headJs.append("sakai.locale.userLanguage = '" + rloader.getLocale().getLanguage() + "';\n");
headJs.append("sakai.locale.userLocale = '" + rloader.getLocale().toString() + "';\n");
response.render(JavaScriptHeaderItem.forScript(headJs, null));
//Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
//response.renderCSSReference("css/my_tool_styles.css");
//response.renderJavascriptReference("js/my_tool_javascript.js");
//for jQuery
response.render(JavaScriptHeaderItem.forUrl("/library/webjars/jquery/1.12.4/jquery.min.js"));
response.render(JavaScriptHeaderItem.forUrl("/library/webjars/jquery-ui/1.12.1/jquery-ui.min.js"));
//for datepicker
response.render(CssHeaderItem.forUrl("/library/webjars/jquery-ui/1.12.1/jquery-ui.css"));
response.render(JavaScriptHeaderItem.forUrl("javascript/jquery.asmselect.js"));
response.render(CssHeaderItem.forUrl("css/jquery.asmselect.css"));
response.render(JavaScriptHeaderItem.forUrl("/library/js/lang-datepicker/lang-datepicker.js"));
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:45,代码来源:BasePage.java
示例10: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
//get the Sakai skin header fragment from the request attribute
HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
response.render(StringHeaderItem.forString(request.getAttribute("sakai.html.head").toString()));
response.render(OnLoadHeaderItem.forScript(BODY_ONLOAD_ADDTL));
response.render(JavaScriptHeaderItem.forUrl(COMMONSCRIPT));
// include (this) tool style (CSS)
response.render(CssHeaderItem.forUrl(StatsManager.SITESTATS_WEBAPP+"/css/sitestats.css"));
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:13,代码来源:BasePage.java
示例11: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
/**
* This block adds the required wrapper markup to style it like a Sakai tool. Add to this any additional CSS or JS references that you
* need.
*
*/
@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
final String version = ServerConfigurationService.getString("portal.cdn.version", "");
// get the Sakai skin header fragment from the request attribute
final HttpServletRequest request = (HttpServletRequest) getRequest().getContainerRequest();
response.render(new PriorityHeaderItem(JavaScriptHeaderItem
.forReference(getApplication().getJavaScriptLibrarySettings().getJQueryReference())));
response.render(StringHeaderItem.forString((String) request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
// Tool additions (at end so we can override if required)
response.render(StringHeaderItem
.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
// Shared JavaScript and stylesheets
// Force Wicket to use Sakai's version of jQuery
response.render(
new PriorityHeaderItem(
JavaScriptHeaderItem
.forUrl(String.format("/library/webjars/jquery/1.12.4/jquery.min.js?version=%s", version))));
// And pair this instance of jQuery with a Bootstrap version we've tested with
response.render(
new PriorityHeaderItem(
JavaScriptHeaderItem
.forUrl(String.format("/library/webjars/bootstrap/3.3.7/js/bootstrap.min.js?version=%s", version))));
// Some global gradebookng styles
response.render(CssHeaderItem
.forUrl(String.format("/gradebookng-tool/styles/gradebook-shared.css?version=%s", version)));
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:41,代码来源:BasePage.java
示例12: addStylesheetLessCSS
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
public static void addStylesheetLessCSS(IHeaderResponse response, IRequestCycle requestCycle, PathTupel pathTupel) {
if (isDevelopement()) {
// dev mode
response.render(StringHeaderItem.forString(MessageFormat.format(STYLESHEET_LESS,
UrlUtils.rewriteToContextRelative(pathTupel.lessPath, requestCycle))));
} else {
//prod mode
response.render(CssHeaderItem.forUrl(pathTupel.cssPath));
}
}
开发者ID:Nocket,项目名称:nocket,代码行数:11,代码来源:LessCSSHelper.java
示例13: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response)
{
super.renderHead(response);
response.render(StringHeaderItem.forString(WicketUtils.getCssForFavicon(getUrl("/favicon.ico"))));
WicketRenderHeadUtils.renderMainCSSIncludes(response);
WicketRenderHeadUtils.renderMainJavaScriptIncludes(response);
initializeContextMenu(response);
}
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:10,代码来源:AbstractUnsecureBasePage.java
示例14: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
response.render(new StringHeaderItem(getFaviconReference()));
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:5,代码来源:FaviconHeaderContributor.java
示例15: renderHead
import org.apache.wicket.markup.head.StringHeaderItem; //导入依赖的package包/类
/**
* This block adds the required wrapper markup to style it like a Sakai tool.
* Add to this any additional CSS or JS references that you need.
*
*/
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
//get the Sakai skin header fragment from the request attribute
HttpServletRequest request = (HttpServletRequest)getRequest().getContainerRequest();
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(getApplication().getJavaScriptLibrarySettings().getJQueryReference())));
response.render(StringHeaderItem.forString((String)request.getAttribute("sakai.html.head")));
response.render(OnLoadHeaderItem.forScript("setMainFrameHeight( window.name )"));
//Tool additions (at end so we can override if required)
response.render(StringHeaderItem.forString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"));
}
开发者ID:steveswinsburg,项目名称:gradebookNG,代码行数:21,代码来源:BasePage.java
注:本文中的org.apache.wicket.markup.head.StringHeaderItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论