Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1
-
Component/s: HTML Generation
-
Labels:None
Description
The bug applies to the maxLength feature in the columntag:
In org.displaytag.model.Column.createChoppedAndLinkedValue() Strings which are longer than maxLength are chopped and '...' is appended to them.
But a html title is only added to the column, if <code>if (choppedValue.length() < fullValue.length())</code> :
The appended '...' are forgotten. This results in Strings beeing chopped and no html-title added if (stringlength > maxLength and stringlength <= maxLength+3)
a possible quickfix:
<code>if (choppedValue.length() - 3 < fullValue.length())</code>
In org.displaytag.model.Column.createChoppedAndLinkedValue() Strings which are longer than maxLength are chopped and '...' is appended to them.
But a html title is only added to the column, if <code>if (choppedValue.length() < fullValue.length())</code> :
The appended '...' are forgotten. This results in Strings beeing chopped and no html-title added if (stringlength > maxLength and stringlength <= maxLength+3)
a possible quickfix:
<code>if (choppedValue.length() - 3 < fullValue.length())</code>
note that the fix is different form the suggested, since checking length - "..." could also return true for a String which was not cropped.