本文整理了Java中org.apache.wicket.markup.html.JavascriptPackageResource.getHeaderContribution()
方法的一些代码示例,展示了JavascriptPackageResource.getHeaderContribution()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JavascriptPackageResource.getHeaderContribution()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.JavascriptPackageResource
类名称:JavascriptPackageResource
方法名:getHeaderContribution
[英]Returns a new instance of HeaderContributor with a header contributor that references a java script file that lives in a package.
[中]返回HeaderContributor的一个新实例,该实例的头参与者引用位于包中的java脚本文件。
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Returns a new instance of {@link HeaderContributor} with a header contributor that references
* a java script file that lives in a package.
*
* @param reference
*
* @return the new header contributor instance
* @deprecated please use JavascriptPackageResource.getHeaderContribution() instead
*/
@Deprecated
public static final HeaderContributor forJavaScript(final ResourceReference reference)
{
return JavascriptPackageResource.getHeaderContribution(reference);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Returns a new instance of {@link HeaderContributor} with a header contributor that references
* a java script file that lives in a package.
*
* @param scope
* The scope of the package resource (typically the class of the caller, or a class
* that lives in the package where the resource lives).
* @param path
* The path
* @return the new header contributor instance
* @deprecated please use JavascriptPackageResource.getHeaderContribution() instead
*/
@Deprecated
public static final HeaderContributor forJavaScript(final Class<?> scope, final String path)
{
return JavascriptPackageResource.getHeaderContribution(scope, path);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Returns a new instance of {@link HeaderContributor} with a header contributor referencing a
* java script file using one of the following schemes:
* <ul>
* <li>Starts with http:// or https:// for an external reference.</li>
* <li>Starts with "/" for an absolute reference that Wicket will not rewrite.</li>
* <li>Starts with anything else, which Wicket will automatically prepend to make relative to
* the context root of your web-app.</li>
* </ul>
*
* @param location
* The location of the java script file.
* @return the new header contributor instance
* @deprecated please use JavascriptPackageResource.getHeaderContribution() instead
*/
@Deprecated
public static final HeaderContributor forJavaScript(final String location)
{
return JavascriptPackageResource.getHeaderContribution(location);
}
代码示例来源:origin: org.wamblee/wamblee-wicket-components
private static IHeaderContributor getContributor() {
if (JQUERY_CONTRIBUTOR == null) {
JQUERY_CONTRIBUTOR = JavascriptPackageResource.getHeaderContribution(
JQueryHeaderContributor.class, getJQueryJavascript());
}
return new IHeaderContributor() {
@Override
public void renderHead(IHeaderResponse aResponse) {
JQUERY_CONTRIBUTOR.renderHead(aResponse);
JQUERY_NOCONFLICT_CONTRIBUTOR.renderHead(aResponse);
}
};
}
代码示例来源:origin: org.wicketstuff/jslibraries
public HeaderContributor getHeaderContributor(
final VersionDescriptor versionDescriptor, boolean production) {
Assert.parameterNotNull(versionDescriptor,
"versionDescriptor");
return JavascriptPackageResource.getHeaderContribution(JSReference
.getReference(versionDescriptor, production));
}
代码示例来源:origin: org.wicketstuff/calendarviews
private void addJavascriptInitializers() {
setOutputMarkupId(true);
add(JavascriptPackageResource.getHeaderContribution(JSReference.getReference(JS_LIB_VERSION_DESCRIPTOR)));
add(JavascriptPackageResource.getHeaderContribution(LargeView.class, "LargeView.js"));
add(new HeaderContributor(new IHeaderContributor() {
private static final long serialVersionUID = 1L;
public void renderHead(IHeaderResponse response) {
String calID = LargeView.this.getMarkupId();
response.renderOnDomReadyJavascript("LargeViewCalendar.initialize('" + calID + "');");
}
}));
}
代码示例来源:origin: org.wicketstuff/yui
@Override
public void bind(Component component)
{
this.component = component;
this.component.setOutputMarkupId(true);
component.add(YuiHeaderContributor.forModule("animation"));
component.add(JavascriptPackageResource.getHeaderContribution(YuiAnimEffect.class,
"effects/effects.js"));
component.add(JavascriptPackageResource.getHeaderContribution(YuiAnimEffect.class,
"effects/tools.js"));
component.add(JavascriptPackageResource.getHeaderContribution(YuiAnimEffect.class,
"effects/animator.js"));
if (isTriggeredByAttachedComponent)
{
addTrigger(this.component);
}
}
代码示例来源:origin: org.wicketstuff/jslibraries
public HeaderContributor getHeaderContributor(
final VersionDescriptor versionDescriptor, boolean production) {
Assert.parameterNotNull(versionDescriptor, "versionDescriptor");
Library lib = versionDescriptor.getLibrary();
Version v = versionDescriptor.getVersion(this);
if (lib.getVersions(this).contains(v)) {
URL url = render(lib, v, production);
if (url != null) {
return JavascriptPackageResource.getHeaderContribution(url
.toExternalForm());
}
}
return null;
}
代码示例来源:origin: org.onehippo.jcr.console/hippo-jcr-console-api
public DialogWindow(String id) {
super(id);
pending = new LinkedList<Dialog>();
add(JavascriptPackageResource.getHeaderContribution(
new JavascriptResourceReference(DialogWindow.class, "res/hippo-modal.js")));
add(CSSPackageResource.getHeaderContribution(DialogWindow.class, "res/hippo-modal.css"));
add(new EventStoppingBehavior("onclick"));
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Initialize the component.
*/
private void init()
{
setVersioned(false);
// we need id when we are replacing the whole tree
setOutputMarkupId(true);
// create container for tree items
itemContainer = new TreeItemContainer("i");
add(itemContainer);
add(JavascriptPackageResource.getHeaderContribution(JAVASCRIPT));
checkModel();
}
代码示例来源:origin: org.wicketstuff/jslibraries
if (reference != null)
return JavascriptPackageResource.getHeaderContribution(reference);
代码示例来源:origin: org.wicketstuff/jquery
public LavaLampMenuPanel(String id, IModel<List<MenuItem>> linksModel) {
super(id);
// Add JQuery JS libraries
add(new JQueryLavaLampBehavior());
add(JavascriptPackageResource.getHeaderContribution(LavaLampMenuPanel.class,
"headlamp.js"));
add(new HeaderContributor(new IHeaderContributor() {
public void renderHead(IHeaderResponse response) {
response.renderCSSReference(getCssResourceReference());
}
}));
final WebMarkupContainer listContainer = new WebMarkupContainer("list");
listContainer.add(new AttributeAppender("class", true,
new Model<String>(UL_CSS_CLASS), " "));
final ListView<MenuItem> lv = new ListView<MenuItem>("lavaLampMenu", linksModel) {
@Override
protected void populateItem(ListItem<MenuItem> item) {
item.add(item.getModelObject());
}
};
listContainer.add(lv);
add(listContainer);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
setRenderBodyOnly(true);
add(JavascriptPackageResource.getHeaderContribution(WicketEventReference.INSTANCE));
add(JavascriptPackageResource.getHeaderContribution(WicketAjaxReference.INSTANCE));
add(JavascriptPackageResource.getHeaderContribution(JS));
ResourceReference css = getCss();
if (css != null)
代码示例来源:origin: org.wicketstuff/yui
@Override
protected void onBind()
{
getComponent().setOutputMarkupId(true);
getComponent().add(YuiHeaderContributor.forModule("dragdrop"));
getComponent().add(YuiHeaderContributor.forModule("utilities"));
getComponent().add(JavascriptPackageResource.getHeaderContribution(SORTABLELIST_JS));
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-xinha-integration
public AbstractXinhaPlugin(IPluginContext context, final IPluginConfig config) {
super(context, config);
configuration = new Configuration(config);
configuration.setName(getMarkupId());
mode = IEditor.Mode.fromString(config.getString("mode", "view"));
if (IEditor.Mode.EDIT == mode) {
configuration.addProperty("previewTooltipText", getString("preview.tooltip", null, "Click to edit"));
add(new EditorManagerBehavior());
}
// dialog functionality for plugins
add(JavascriptPackageResource.getHeaderContribution(XINHA_MODAL_JS));
add(CSSPackageResource.getHeaderContribution(AbstractXinhaPlugin.class, "xinha.css"));
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Initialize
*/
private void init()
{
setVersioned(false);
cookieName = null;
add(empty = new WebMarkupContainer(getContentId()));
add(newCloseButtonBehavior());
add(newWindowClosedBehavior());
add(JavascriptPackageResource.getHeaderContribution(JAVASCRIPT));
ResourceReference CSS = newCssResource();
if (CSS != null)
{
add(CSSPackageResource.getHeaderContribution(CSS));
}
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
add(JavascriptPackageResource.getHeaderContribution(DebugBar.class, "wicket-debugbar.js"));
add(new Image("logo", new ResourceReference(DebugBar.class, "wicket.png")));
add(new Image("removeImg", new ResourceReference(DebugBar.class, "remove.png")));
代码示例来源:origin: ontopia/ontopia
fieldInstanceButtons.add(new GeoPickerButton(!readonly && haspsi, geoPicker));
if (!readonly && haspsi)
add(JavascriptPackageResource.getHeaderContribution("http://maps.google.com/maps/api/js?sensor=false"));
代码示例来源:origin: net.ontopia/ontopoly-editor
fieldInstanceButtons.add(new GeoPickerButton(!readonly && haspsi, geoPicker));
if (!readonly && haspsi)
add(JavascriptPackageResource.getHeaderContribution("http://maps.google.com/maps/api/js?sensor=false"));
内容来源于网络,如有侵权,请联系作者删除!