@SupportsInformalParameters public abstract class AbstractLink extends Object implements ClientElement
Modifier and Type | Field and Description |
---|---|
protected ComponentResources |
resources |
Constructor and Description |
---|
AbstractLink() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameters(Link link)
Adds any user-defined parameters as query parameters.
|
String |
getClientId()
Returns the unique client id for this element.
|
Link |
getLink()
Returns the most recently rendered
Link for this component. |
boolean |
isDisabled()
Returns true if the component is disabled (as per its disabled parameter).
|
protected void |
writeLink(MarkupWriter writer,
Link link,
Object... namesAndValues)
Writes an <a> element with the provided link as the href attribute.
|
@Inject protected ComponentResources resources
public AbstractLink()
protected final void writeLink(MarkupWriter writer, Link link, Object... namesAndValues)
MarkupWriter.end()
is not provided. Automatically appends an anchor if
the component's anchor parameter is non-null. Informal parameters are rendered as well.writer
- to write markup tolink
- the link that will form the hrefnamesAndValues
- additional attributes to writeprotected final void addParameters(Link link)
link
- a Link
.public Link getLink()
Link
for this component. Subclasses calculate
their link value as they render, and the value is valid until the end of the request, or the next time the same
component renders itself (if inside a loop).public final String getClientId()
getClientId
in interface ClientElement
public boolean isDisabled()
true
or false
.5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.