Filter table display content

Hey guys

I’m currently working on a project containing a table linked to a sql container. I want to display shortened versions of the the strings stored in the sql container without changing the strings themselves (For obvious reasons). For this example’s sake lets say that I don’t want to display certain sets of characters. Is there a simple way to do this (A display filter perhaps)?

Sincerely Johan

PS: Unfortunately I can’t provide examples of my code for security reasons


there are many ways to do this. For example you can override the following method:

protected String formatPropertyValue(Object rowId, Object colId, Property property) {

  /* handle the properties you need in here */
  if("fooColumn".equals(colId)) {
    // do something to property.getValue() and return it

  /* fallback to default implementation */
  return super.formatPropertyValue(rowId, colId, property);

First thing that comes to mind is to simply override the default columns using a column generator that does the String filtering.

Thanks for your help guys