org.ujorm.wicket.component.grid
Class KeyColumnDate<U extends Ujo>

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<U,KeyRing<U>>
      extended by org.ujorm.wicket.component.grid.KeyColumn<U,Date>
          extended by org.ujorm.wicket.component.grid.KeyColumnDate<U>
All Implemented Interfaces:
Serializable, org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<U>, org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn<U,KeyRing<U>>, org.apache.wicket.extensions.markup.html.repeater.data.table.IStyledColumn<U,KeyRing<U>>, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable

public class KeyColumnDate<U extends Ujo>
extends KeyColumn<U,Date>

Key column for a Date data type

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
static String DEFAULT_CSS_CLASS
          Default CSS class for
 
Fields inherited from class org.ujorm.wicket.component.grid.KeyColumn
cssClass, keySerializable, PROPERTY_PREFIX, SORTING_OFF, SORTING_ON
 
Constructor Summary
KeyColumnDate(KeyRing<U> key, KeyRing<U> keySortable)
          Constructor with the default value localeDateFormatKey = "locale.date.pattern".
KeyColumnDate(KeyRing<U> key, KeyRing<U> keySortable, String localeDateFormatKey)
           
 
Method Summary
protected  org.apache.wicket.Component createValueCoponent(String componentId, org.apache.wicket.model.IModel<?> valueModel, U ujo)
          Create the Label for a Value component
protected  String getDatePattern(org.apache.wicket.Component component)
          Returns localizadDate pattern
static
<U extends Ujo,T>
KeyColumn<U,T>
of(Key<U,T> key, boolean sorted, String cssClass)
          A factory method
static
<U extends Ujo,T>
KeyColumn<U,T>
of(Key<U,T> key, boolean sorted, String cssClass, String localeDateFormatKey)
          A factory method
 
Methods inherited from class org.ujorm.wicket.component.grid.KeyColumn
appendCssClass, createValueModel, getCssClass, getKey, getPropertyExpression, of, of, populateItem, setCssClass, toString
 
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn
detach, getDisplayModel, getHeader, getSortProperty, isSortable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CSS_CLASS

public static String DEFAULT_CSS_CLASS
Default CSS class for

Constructor Detail

KeyColumnDate

public KeyColumnDate(KeyRing<U> key,
                     KeyRing<U> keySortable)
Constructor with the default value localeDateFormatKey = "locale.date.pattern".


KeyColumnDate

public KeyColumnDate(KeyRing<U> key,
                     KeyRing<U> keySortable,
                     String localeDateFormatKey)
Method Detail

createValueCoponent

protected org.apache.wicket.Component createValueCoponent(String componentId,
                                                          org.apache.wicket.model.IModel<?> valueModel,
                                                          U ujo)
Create the Label for a Value component

Overrides:
createValueCoponent in class KeyColumn<U extends Ujo,Date>
See Also:
KeyColumn.appendCssClass(org.apache.wicket.Component, org.ujorm.Ujo)

getDatePattern

protected String getDatePattern(org.apache.wicket.Component component)
Returns localizadDate pattern


of

public static <U extends Ujo,T> KeyColumn<U,T> of(Key<U,T> key,
                                                  boolean sorted,
                                                  String cssClass)
A factory method

Parameters:
key - Domain Key
sorted - Sorted column
cssOkClass - Class for a value Boolean.TRUE where a default value is #DEFAULT_CSS_OK_CLASS.
Returns:
New instance of the KeyColumn class

of

public static <U extends Ujo,T> KeyColumn<U,T> of(Key<U,T> key,
                                                  boolean sorted,
                                                  String cssClass,
                                                  String localeDateFormatKey)
A factory method

Parameters:
key - Domain Key
sorted - Sorted column
cssOkClass - Class for a value Boolean.TRUE where a default value is #DEFAULT_CSS_OK_CLASS.
Returns:
New instance of the KeyColumn class


Copyright © 2015. All Rights Reserved.