Just in case anybody is interested in the solution.
I've extended ChoiceFilteredPropertyColumn (as that was the type of
column I was using for my AjaxFallbackDefaultDataTable) and have
overridden populateItem (which was originally implemented in
PropertyColumn). In that method I both truncate
Like this (for a basic html tooltip):
cellItem.add( new SimpleAttributeModifier("title", maximalStringModel) );
Or use one of the js-library wrappers from Wicket Stuff for something
slicker?
Linda van der Pal wrote:
Thanks for the ideas, but the truncating itself is not the main
problem. (I
Thanks for the ideas, but the truncating itself is not the main problem.
(I could easily truncate the data in the SortableDataProvider.) The main
problem that requires met to dive deeply into the code is my requirement
to also show the full data in a tooltip.
Regards,
Linda
Iain Reddick wrote
Create some kind of generic StringTruncatingModel that does the "..."
truncation on getObject().
In DataTable.populateItem(), wrap the row model in a
StringTruncatingModel, before passing to the Label being used to show
the string?
Linda van der Pal wrote:
I thought it would be a cool idea t
I thought it would be a cool idea to truncate the data in my table, so
the data isn't spread over several lines in the table row. It should
then be possible to read the complete content in a tooltip. After
digging into the code of the AjaxFallbackDefaultDataTable I found that
to do this I would