Class AbstractLink

    • Method Detail

      • writeLink

        protected final void writeLink​(MarkupWriter writer,
                                       Link link,
                                       Object... namesAndValues)
        Writes an <a> element with the provided link as the href attribute. A call to MarkupWriter.end() is not provided. Automatically appends an anchor if the component's anchor parameter is non-null. Informal parameters are rendered as well.
        Parameters:
        writer - to write markup to
        link - the link that will form the href
        namesAndValues - additional attributes to write
      • addParameters

        protected final void addParameters​(Link link)
        Adds any user-defined parameters as query parameters.
        Parameters:
        link - a Link.
      • getLink

        public Link getLink()
        Returns the most recently rendered 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).
        Returns:
        the most recent link, or null
      • getClientId

        public final String getClientId()
        Returns the unique client id for this element. This is valid only after the component has rendered (its start tag). A client id is generated the first time this method is invoked, after the link renders its start tag.
        Specified by:
        getClientId in interface ClientElement
        Returns:
        a unique id for the element. This value will be unique for any given rendering of a page. This value is intended for use as the id attribute of the client-side element, and will be used with any DHTML/Ajax related JavaScript.
      • isDisabled

        public boolean isDisabled()
        Returns true if the component is disabled (as per its disabled parameter). Disabled link components should not render a tag, but should still render their body.
        Returns:
        true or false.