org.riotfamily.riot.list
Class ColumnConfig
java.lang.Object
org.riotfamily.riot.list.ColumnConfig
public class ColumnConfig
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColumnConfig
public ColumnConfig()
ColumnConfig
public ColumnConfig(ObjectRenderer renderer)
getLookupLevel
public int getLookupLevel()
setLookupLevel
public void setLookupLevel(int lookupLevel)
- Sets which level of a nested property should be used to construct the
message-key for the column heading.
Because this setting is quite difficult to explain, here are two
examples that illustrate the results of the different settings.
Let's imagine we have a list persons. Each Person
entity has
an address
property which in turn has a property called
firstName
. We now want to display the person's firstName
in a column:
<column property="address.firstName" />
The default message-key (level 0) will be org.example.Person.address
which might not be desirable in this special case, as the column would
be labeled with Address instead of First Name.
If we set the level to 1, the complete property path would be appended
to the message-key, resulting in org.example.Person.address.firstName.
If the Address class is used in several places it would be even nicer
to have org.example.Address.firstName as message-key. This can be
achieved by setting the lookup-level to 2.
- level 0:
- org.example.Person.address
- level 1:
- org.example.Person.address.firstName
- level 2:
- org.example.Address.firstName
Let's see what the results would look like if we had a property with an
even greater nesting level, say we have a list of cars and want to
display the owner's first-name:
<column property="owner.address.firstName" />
- level 0:
- org.example.Car.owner
- level 1:
- org.example.Car.owner.address.firstName
- level 2:
- org.example.Person.address.firstName
- level 3:
- org.example.Address.firstName
getProperty
public String getProperty()
setProperty
public void setProperty(String property)
isSortable
public boolean isSortable()
isAscending
public boolean isAscending()
setAscending
public void setAscending(boolean ascending)
isCaseSensitive
public boolean isCaseSensitive()
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)
setSortable
public void setSortable(boolean sortable)
getRenderer
public ObjectRenderer getRenderer()
setRenderer
public void setRenderer(ObjectRenderer renderer)
getCssClass
public String getCssClass()
setCssClass
public void setCssClass(String cssClass)