Class LinkField

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, Ordered, ScriptEventSupport, Field, LifecycleElement, org.springframework.core.Ordered
Direct Known Subclasses:
GroupLinkField, RoleLinkField, UserLinkField

public class LinkField extends FieldBase
Field that encloses a link element.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • LinkField

      public LinkField()
  • Method Details

    • performInitialization

      public void performInitialization(Object model)
      The following initialization is performed:
      • Set the linkLabel if blank to the Field label
      The following updates are done here:
      • Invoke performInitialize on component modifiers
      Initializes the component

      Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.

      Specified by:
      performInitialization in interface LifecycleElement
      Overrides:
      performInitialization in class ComponentBase
      Parameters:
      model - - object instance containing the view data
      See Also:
    • performFinalize

      public void performFinalize(Object model, LifecycleElement parent)
      PerformFinalize override - calls super, corrects the field's Label for attribute to point to this field's content
      Specified by:
      performFinalize in interface LifecycleElement
      Overrides:
      performFinalize in class FieldBase
      Parameters:
      model - the model
      parent - the parent component
    • getLink

      public Link getLink()
      Returns the Link field.
      Returns:
      The Link field
    • setLink

      public void setLink(Link link)
      Setter for the Link component.
      Parameters:
      link -
    • getLinkText

      public String getLinkText()
      Returns the label of the Link field that will be used to render the label of the link.
      Returns:
      The link label
    • setLinkText

      public void setLinkText(String linkLabel)
      Setter for the link label. Sets the value on the Link field.
      Parameters:
      linkLabel -
    • getLinkDialogId

      public String getLinkDialogId()
      The id of the DialogGroup to use when the openInDialog property is true for this LinkField's link.

      The DialogGroup should only contain an iframe for its items. When not set, a default dialog will be used.

      Returns:
      the id of the dialog to use for this link
    • setLinkDialogId

      public void setLinkDialogId(String linkDialogId)
      See Also:
    • isOpenInDialog

      public boolean isOpenInDialog()
      Indicates whether the link's URL should be opened in a dialog.

      If set the target attribute is ignored and the URL is opened in a dialog instead.

      Returns:
      true to open link in a dialog, false if not (follow standard target attribute)
    • setOpenInDialog

      public void setOpenInDialog(boolean openInDialog)
      See Also:
    • getTarget

      public String getTarget()
      Returns the target of the Link field that will be used to specify where to open the href.
      Returns:
      The target
    • setTarget

      public void setTarget(String target)
      Setter for the link target. Sets the value on the Link field.
      Parameters:
      target -
    • getHref

      public String getHref()
      Returns the href text of the Link field.
      Returns:
      The href text
    • setHref

      public void setHref(String hrefText)
      Setter for the hrefText. Sets the value on the Link field.
      Parameters:
      hrefText -
    • getSortAs

      public String getSortAs()
    • setSortAs

      public void setSortAs(String sortAs)
    • completeValidation

      public void completeValidation(ValidationTrace tracer)
      Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.
      Specified by:
      completeValidation in interface Component
      Overrides:
      completeValidation in class ComponentBase
      Parameters:
      tracer - Record of component's location