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


Java OnDomReadyHeaderItem.forScript方法代码示例

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


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

示例1: renderHead

import org.apache.wicket.markup.head.OnDomReadyHeaderItem; //导入方法依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
    HeaderItem headerItem = null;
    if (renderedShowing && showing) {
        /*
         * workaround for modal tags being copied by bootstrap-modal right into body and wicket updating the wrong
         * tags in their previous position
         */
        headerItem = OnDomReadyHeaderItem.forScript(createRefreshScript());
    } else if (!renderedShowing && showing) {
        headerItem = OnDomReadyHeaderItem.forScript(createShowScript());
        renderedShowing = true;
    } else if (renderedShowing && !showing) {
        final StringBuilder script = new StringBuilder();
        //scroll gets enabled again by registered hidden.bs.modal event from bootstrapModalConfig.js
        script.append("$(window).disablescroll();");
        script.append(createRefreshScript());
        script.append(createHideScript());
        headerItem = OnDomReadyHeaderItem.forScript(script);
        renderedShowing = false;
    }
    renderDirectlyOrDelegateToRoot(response, headerItem);
    alreadyRendered = true;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:25,代码来源:ModalContainer.java

示例2: renderHead

import org.apache.wicket.markup.head.OnDomReadyHeaderItem; //导入方法依赖的package包/类
@Override
public void renderHead(Component component, IHeaderResponse response) {
	super.renderHead(component, response);
	OnDomReadyHeaderItem focusComponentHeaderItem = OnDomReadyHeaderItem.forScript("document.getElementById('"
			    + component.getMarkupId() + "').focus();");
	response.render(focusComponentHeaderItem);
}
 
开发者ID:MarcGiffing,项目名称:wicket-spring-boot,代码行数:8,代码来源:FocusBehaviour.java

示例3: getClearIntervalHeaderItem

import org.apache.wicket.markup.head.OnDomReadyHeaderItem; //导入方法依赖的package包/类
private HeaderItem getClearIntervalHeaderItem() {
	String varName = getIntervalJavaScriptVarName();
	String javaScript = MessageFormat.format("if(!(typeof {0} === \"undefined\"))'{'\n" + "clearInterval({0});\n"
	    + "'}'", varName);
	return OnDomReadyHeaderItem.forScript(javaScript);
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:7,代码来源:LiveDataAjaxBehavior.java

示例4: newHeaderItem

import org.apache.wicket.markup.head.OnDomReadyHeaderItem; //导入方法依赖的package包/类
/**
 * creates a new header item for the initializer script
 *
 * @param script the script to render
 * @param id the js id that can be used when rendering this script
 * @return new header item
 */
protected HeaderItem newHeaderItem(final CharSequence script, final String id) {
    return OnDomReadyHeaderItem.forScript(script);
}
 
开发者ID:l0rdn1kk0n,项目名称:wicket-clientside-logging,代码行数:11,代码来源:ClientSideLoggingBehavior.java


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