com.databasesandlife.util.wicket
Class JQueryIncluder

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
                  extended by org.apache.wicket.markup.html.panel.Panel
                      extended by com.databasesandlife.util.wicket.JQueryIncluder
All Implemented Interfaces:
Serializable, IClusterable, IConverterLocator, IHeaderPartContainerProvider

public class JQueryIncluder
extends Panel

Includes JQuery in a wicket page or component.

JQuery doesn't like to get included twice, and if one has two components which both require JQuery, then they get different URLs (componentA/JQuery.js etc.) and then get included twice. If the components both include the JQueryIncluder then all JQuery.js has the same URL (JQueryIncluder/JQuery.js) and then gets included only once.

Alas, as the JQuery specializations have to be included in the HTML after JQuery.js, and as a wicket panel which includes JQueryIncluder includes its own header contributions before that of its child JQueryIncluder, all the JS of all potentially required JQuery has to be included in this component.

Version:
$Revision: 2637 $
Author:
The Java source is copyright Adrian Smith and licensed under the LGPL 3.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.Component
Component.ComponentModelChange, Component.IVisitor<T extends Component>
 
Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, PATH_SEPARATOR, RENDER
 
Constructor Summary
JQueryIncluder(String wicketId)
           
 
Method Summary
 
Methods inherited from class org.apache.wicket.markup.html.panel.Panel
renderHead
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
newHeaderPartContainer
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getMarkupType, getWebPage, getWebRequest
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, autoAdd, contains, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, remove, remove, removeAll, renderAssociatedMarkup, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, afterRender, beforeRender, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModels, determineVisibility, error, fatal, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getId, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, internalAttach, internalDetach, isActionAuthorized, isAncestorOf, isEnableAllowed, isEnabled, isEnabledInHierarchy, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, rendered, replaceWith, sameInnermostModel, sameInnermostModel, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JQueryIncluder

public JQueryIncluder(String wicketId)