public class HtmlTag
extends org.apache.wicket.markup.html.TransparentWebMarkupContainer
HtmlTag is a TransparentWebMarkupContainer that adds some attributes
to the pages html tag. It will add a "lang" attribute, which value is provided by
given locale, in a short form: Locale.ENGLISH = "en-en". Also it
will add a "class" attribute that contains special css marker like active theme, browser
identifier and a "no-js" flag which is used by modernizr to detect whether javascript is
available or not.
class MyPage extends Page {
public MyPage(PageParameters params) {
// with chrome browser and bootstrap theme
add(new HtmlTag("html-tag")); //
[...]
| Constructor and Description |
|---|
HtmlTag(String markupId)
Construct.
|
HtmlTag(String markupId,
boolean useModernizr)
Construct.
|
HtmlTag(String markupId,
Locale locale)
Construct.
|
HtmlTag(String markupId,
Locale locale,
boolean useModernizr)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.wicket.protocol.http.ClientProperties |
newWebClientInfo() |
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag) |
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
getWebPage, getWebRequest, getWebResponse, getWebSessionadd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic HtmlTag(String markupId, Locale locale, boolean useModernizr)
markupId - The component' markup idlocale - locale to use for "lang" attributeuseModernizr - whether to use modernizr or notpublic HtmlTag(String markupId, boolean useModernizr)
Locale.ENGLISH as default localemarkupId - the component iduseModernizr - whether to use modernizr or notpublic HtmlTag(String markupId, Locale locale)
markupId - the component idlocale - locale to use for "lang" attributepublic HtmlTag(String markupId)
Locale.ENGLISH as default locale and doesn't add modernizr support.markupId - the component idprotected org.apache.wicket.protocol.http.ClientProperties newWebClientInfo()
WebClientInfo instanceprotected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag in class org.apache.wicket.Componentpublic void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.ComponentCopyright © 2013 agilecoders.de. All Rights Reserved.