org.ujorm.wicket.component.grid
Class KeyColumnEnum<U extends Ujo,T extends Enum<T>>

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,T>
          extended by org.ujorm.wicket.component.grid.KeyColumnEnum<U,T>
Type Parameters:
U - Ujo
T - Enum type
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 KeyColumnEnum<U extends Ujo,T extends Enum<T>>
extends KeyColumn<U,T>

Key column for a Date data type

Author:
Pavel Ponec
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.ujorm.wicket.component.grid.KeyColumn
cssClass, keySerializable, PROPERTY_PREFIX, SORTING_OFF, SORTING_ON
 
Constructor Summary
KeyColumnEnum(KeyRing<U> key, KeyRing<U> keySortable)
           
 
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
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, Key<U,T> sort, String cssClass)
          A factory method
protected  String resourceKey(T value)
          Translates the object into resource key that will be used to lookup the value shown to the user
 
Methods inherited from class org.ujorm.wicket.component.grid.KeyColumn
appendCssClass, createValueModel, getCssClass, getKey, getPropertyExpression, 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
 

Constructor Detail

KeyColumnEnum

public KeyColumnEnum(KeyRing<U> key,
                     KeyRing<U> keySortable)
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,T extends Enum<T>>
See Also:
KeyColumn.appendCssClass(org.apache.wicket.Component, org.ujorm.Ujo)

resourceKey

protected String resourceKey(T value)
Translates the object into resource key that will be used to lookup the value shown to the user

Parameters:
value -
Returns:
resource key

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
Returns:
New instance of the KeyColumn class

of

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

Parameters:
key - Domain Key
sort - Key of sorting
Returns:


Copyright © 2015. All Rights Reserved.