public abstract class BootstrapLink<T> extends org.apache.wicket.markup.html.link.Link<T> implements IBootstrapButton<BootstrapLink<T>>
Link which is styled by bootstrap.
You can use a link like:
add(new BootstrapLink("myLink")
{
public void onClick()
{
// do something here...
}
);
and in your HTML file:
<a href="#" wicket:id="myLink">click here</a>The following snippet shows how to pass a parameter from the Page creating the Page to the Page responded by the Link.
add(new BootstrapLink<MyObject>("link", listItem.getModel(), Type.Primary )
{
public void onClick()
{
MyObject obj = getModelObject();
setResponsePage(new MyPage(obj));
}
| Constructor and Description |
|---|
BootstrapLink(String id,
Buttons.Type type)
Construct.
|
BootstrapLink(String id,
org.apache.wicket.model.IModel<T> model)
Construct.
|
BootstrapLink(String id,
org.apache.wicket.model.IModel<T> model,
Buttons.Type type)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
protected Icon |
newIcon(String markupId)
creates a new icon component
|
protected org.apache.wicket.Component |
newLabel(String markupId)
creates a new label component
|
protected org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy |
newMarkupSourcingStrategy() |
protected org.apache.wicket.Component |
newSplitter(String markupId)
creates a new splitter component.
|
protected void |
onConfigure() |
BootstrapLink<T> |
setIconType(IconType iconType)
sets the button's icon which will be rendered in front of the label.
|
BootstrapLink<T> |
setInverted(boolean inverted)
inverts the icon color
|
BootstrapLink<T> |
setLabel(org.apache.wicket.model.IModel<?> label)
sets the label of the button.
|
BootstrapLink<T> |
setSize(Buttons.Size size)
sets the size of the button
|
BootstrapLink<T> |
setType(Buttons.Type type)
Sets the type of the button
|
appendAnchor, getAnchor, getAutoEnable, getModel, getModelObject, getOnClickScript, getPopupSettings, getStatelessHint, getURL, isEnabled, linksTo, onClick, onComponentTag, onLinkClicked, setAnchor, setAutoEnable, setModel, setModelObject, setPopupSettingsdisableLink, getAfterDisabledLink, getBeforeDisabledLink, getBody, isLinkEnabled, onBeforeRender, onComponentTagBody, onDetach, setAfterDisabledLink, setBeforeDisabledLink, setBodygetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, 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, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, 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 BootstrapLink(String id, org.apache.wicket.model.IModel<T> model)
id - the components idmodel - mandatory parameterpublic BootstrapLink(String id, Buttons.Type type)
id - the components idtype - the type of the buttonpublic BootstrapLink(String id, org.apache.wicket.model.IModel<T> model, Buttons.Type type)
id - The component idmodel - mandatory parametertype - the type of the buttonprotected Icon newIcon(String markupId)
markupId - the component id of the iconprotected org.apache.wicket.Component newLabel(String markupId)
markupId - the component id of the labelprotected org.apache.wicket.Component newSplitter(String markupId)
markupId - the component id of the splitterprotected final org.apache.wicket.markup.html.panel.IMarkupSourcingStrategy newMarkupSourcingStrategy()
newMarkupSourcingStrategy in class org.apache.wicket.Componentprotected void onConfigure()
onConfigure in class org.apache.wicket.Componentpublic BootstrapLink<T> setLabel(org.apache.wicket.model.IModel<?> label)
label - the new button labelpublic BootstrapLink<T> setIconType(IconType iconType)
iconType - the new button icon typepublic BootstrapLink<T> setSize(Buttons.Size size)
setSize in interface IBootstrapButton<BootstrapLink<T>>size - The button sizede.agilecoders.wicket.markup.html.bootstrap.button.Buttons.Size}public BootstrapLink<T> setType(Buttons.Type type)
setType in interface IBootstrapButton<BootstrapLink<T>>type - The type of the buttonde.agilecoders.wicket.markup.html.bootstrap.button.Buttons.Type}public BootstrapLink<T> setInverted(boolean inverted)
setInverted in interface Invertible<BootstrapLink<T>>inverted - true, if inverted version should be usedCopyright © 2013 agilecoders.de. All Rights Reserved.