|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Component
wicket.MarkupContainer
wicket.markup.html.WebMarkupContainer
wicket.markup.html.link.Link
Implementation of a hyperlink component. A link can be used with an anchor (<a href...) element or any element that supports the onclick javascript event handler (such as buttons, td elements, etc). When used with an anchor, a href attribute will be generated. When used with any other element, an onclick javascript event handler attribute will be generated.
You can use a link like:
add(new Link("myLink"){
public void onClick(RequestCycle cycle)
{
// do something here...
}
);
and in your HTML file:
<a href="#" wicket:id="myLink">click here</a>
or:
<td wicket:id="myLink">my clickable column</td>
| Nested Class Summary |
| Nested classes inherited from class wicket.Component |
Component.ComponentModelChange, Component.IVisitor, Component.VisibilityChange |
| Field Summary |
| Fields inherited from class wicket.Component |
FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4 |
| Constructor Summary | |
Link(java.lang.String id)
|
|
Link(java.lang.String id,
IModel object)
|
|
| Method Summary | |
java.lang.String |
getAfterDisabledLink()
Gets the insertion string to allow disabled links to look like Disabled link . |
boolean |
getAutoEnable()
Gets whether link should automatically enable/disable based on current page. |
java.lang.String |
getBeforeDisabledLink()
Gets the insertion string to allow disabled links to look like Disabled link . |
protected java.lang.String |
getOnClickScript(java.lang.String url)
|
PopupSettings |
getPopupSettings()
Gets the popup specification. |
protected java.lang.String |
getURL()
Gets the url to use for this link. |
protected void |
internalOnBeginRequest()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
boolean |
isEnabled()
Gets whether this link is enabled. |
protected boolean |
linksTo(Page page)
Whether this link refers to the given page. |
abstract void |
onClick()
Called when a link is clicked. |
protected void |
onComponentTag(ComponentTag tag)
Handles this link's tag. |
protected void |
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
Renders this link's body. |
void |
onLinkClicked()
THIS METHOD IS NOT PART OF THE WICKET API. |
void |
setAfterDisabledLink(java.lang.String afterDisabledLink)
Sets the insertion string to allow disabled links to look like Disabled link . |
Link |
setAutoEnable(boolean autoEnable)
Sets whether this link should automatically enable/disable based on current page. |
void |
setBeforeDisabledLink(java.lang.String beforeDisabledLink)
Sets the insertion string to allow disabled links to look like Disabled link . |
Link |
setEnabled(boolean enabled)
Sets link enabled state. |
Link |
setPopupSettings(PopupSettings popupSettings)
Sets the popup specification. |
| Methods inherited from class wicket.markup.html.WebMarkupContainer |
getMarkupType, onRender |
| Methods inherited from class wicket.MarkupContainer |
add, autoAdd, contains, findMarkupStream, get, getMarkupStream, internalAdd, internalBeginRequest, internalEndRequest, iterator, remove, removeAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Link(java.lang.String id)
Component.Component(String)
public Link(java.lang.String id,
IModel object)
Component.Component(String, IModel)| Method Detail |
public java.lang.String getAfterDisabledLink()
public final boolean getAutoEnable()
public java.lang.String getBeforeDisabledLink()
public final PopupSettings getPopupSettings()
public final boolean isEnabled()
public abstract void onClick()
public final void onLinkClicked()
onLinkClicked in interface ILinkListenerILinkListenerpublic void setAfterDisabledLink(java.lang.String afterDisabledLink)
afterDisabledLink - The insertion stringpublic final Link setAutoEnable(boolean autoEnable)
autoEnable - whether this link should automatically enable/disable based on
current page.
public void setBeforeDisabledLink(java.lang.String beforeDisabledLink)
beforeDisabledLink - The insertion stringpublic final Link setEnabled(boolean enabled)
enabled - The enabled to set.
public final Link setPopupSettings(PopupSettings popupSettings)
popupSettings - the popup specification.
protected java.lang.String getOnClickScript(java.lang.String url)
url - The url for the link
protected java.lang.String getURL()
protected boolean linksTo(Page page)
page - A page
protected final void onComponentTag(ComponentTag tag)
onComponentTag in class Componenttag - the component tagComponent.onComponentTag(ComponentTag)protected void internalOnBeginRequest()
Component
internalOnBeginRequest in class ComponentComponent.internalOnBeginRequest()
protected final void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
onComponentTagBody in class MarkupContainermarkupStream - the markup streamopenTag - the open part of this tagComponent.onComponentTagBody(MarkupStream, ComponentTag)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||