Class LinkColumn<M,​I,​S>

    • Constructor Detail

      • LinkColumn

        public LinkColumn​(String columnId,
                          String propertyLabel,
                          IModel<String> headerModel)
        Create a new Link Column
        Parameters:
        columnId - column id (must be unique within the grid)
        propertyLabel - Label to display for the Link, gotten from the model object itself ala PropertyModel
        headerModel - model object for the column header
      • LinkColumn

        public LinkColumn​(String columnId,
                          String propertyLabel,
                          IModel<String> headerModel,
                          S sortProperty)
        Create a new Link Column
        Parameters:
        columnId - column id (must be unique within the grid)
        propertyLabel - Label to display for the Link, gotten from the model object itself ala PropertyModel
        headerModel - model object for the column header
        sortProperty - property to sort the column by
    • Method Detail

      • newCell

        public Component newCell​(WebMarkupContainer parent,
                                 String componentId,
                                 IModel<I> rowModel)
        Description copied from class: AbstractColumn
        Creates a new cell component. This method is called for rows that are not lightweight ( IGridColumn.isLightWeight(IModel) returns false ).
        Specified by:
        newCell in interface IGridColumn<M,​I,​S>
        Specified by:
        newCell in class AbstractColumn<M,​I,​S>
        Parameters:
        parent - Parent component. This is passed in only for convenience, the method implementation is not supposed to add the newly created component to the parent.
        componentId - required id of newly created components
        rowModel - model for given row
        Returns:
        new cell component
      • getPropertyLabel

        public String getPropertyLabel()
        Returns:
        row model object property name for the link Text
      • setPropertyLabel

        public void setPropertyLabel​(String propertyLabel)
        Parameters:
        propertyLabel - row model object property name for the link Text
      • onClick

        public abstract void onClick​(IModel<I> rowModel)
        Called when a link is clicked.
        Parameters:
        rowModel - Model Object for the DataGridRow being passed to the link
        See Also:
        Link.onClick()