Class PropertyColumn<M,​I,​P,​S>

    • Constructor Detail

      • PropertyColumn

        public PropertyColumn​(String columnId,
                              IModel<String> headerModel,
                              String propertyExpression,
                              S sortProperty)
        Constructor.
        Parameters:
        columnId - column identified (must be unique within the grid)
        headerModel - model for column header
        propertyExpression - property expression used to get the displayed value for row object
        sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
      • PropertyColumn

        public PropertyColumn​(String columnId,
                              IModel<String> headerModel,
                              String propertyExpression)
        Constructor.
        Parameters:
        columnId - column identified (must be unique within the grid)
        headerModel - model for column header
        propertyExpression - property expression used to get the displayed value for row object
      • PropertyColumn

        public PropertyColumn​(IModel<String> headerModel,
                              String propertyExpression,
                              S sortProperty)
        Constructor. The column id is omitted in this constructor, because the property expression is used as column id.
        Parameters:
        headerModel - model for column header
        propertyExpression - property expression used to get the displayed value for row object
        sortProperty - optional string that will be returned by ISortState to indicate that the column is being sorted
      • PropertyColumn

        public PropertyColumn​(IModel<String> headerModel,
                              String propertyExpression)
        Constructor. The column id is omitted in this constructor, because the property expression is used as column id.
        Parameters:
        headerModel - model for column header
        propertyExpression - property expression used to get the displayed value for row object
    • Method Detail

      • setEscapeMarkup

        public PropertyColumn<M,​I,​P,​S> setEscapeMarkup​(boolean escape)
        Sets whether the markup will be escaped. Set to false if the property contains html snippets that need to be rendered as html (without being escaped).
        Parameters:
        escape -
        Returns:
        this (useful for method chaining)
      • isEscapeMarkup

        public boolean isEscapeMarkup()
        Returns whether the markup will be escaped.
        Returns:
        true. if the markup will be escaped, false otherwise
      • getProperty

        protected P getProperty​(Object object,
                                String propertyExpression)
      • getModelObject

        protected I getModelObject​(IModel<I> rowModel)
      • getConverter

        protected <C> IConverter<C> getConverter​(Class<C> type)
      • getLocale

        protected Locale getLocale()
      • convertToString

        protected <C> CharSequence convertToString​(C object)
      • getPropertyExpression

        public String getPropertyExpression()
        Returns the property expression.
        Returns:
        property expression