Bug 35569 - wordWrap does not insert the split string
Summary: wordWrap does not insert the split string
Status: RESOLVED WONTFIX
Alias: None
Product: Taglibs
Classification: Unclassified
Component: String Taglib (show other bugs)
Version: 1.1.0
Hardware: All other
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-01 01:32 UTC by tung.nguyen
Modified: 2009-08-20 00:57 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tung.nguyen 2005-07-01 01:32:21 UTC
I have the following in my JSP:
<string:wordWrap width="10" delimiter="<br>" 
    delimiterInside="false" split="-">1234567890123456</string:wordWrap>
I expect to get 
123456789-
0123456
but got 
1234567890
123456
Comment 1 Rahul 2005-07-01 04:00:36 UTC
Indeed, I see no snippet that will insert splits (other than in comments). The 
padding with spaces also caught me slightly off-guard with regards to splits. 
In my opinion, we will need a patch (or the split attribute needs to be 
removed from the tag).

While glancing at the code, I also noticed:
1) Delimiter longer than width will cause an exception
Failing test case:
o.a.t.s.u.StringW#wordWrap("abcd", 2, "myDelim", "-", true)

2) Code assumes delim length will be 1
Failing test case:
o.a.t.s.u.StringW#wordWrap("a_ _bc defghijkl", 10, "_ _", "-", true)

String Taglib committers - 

I intend to pursue patch(es) in my spare time. Would you like me to open 
separate bugzilla tickets for the above two issues?

-Rahul
Comment 2 Henri Yandell 2009-08-20 00:57:16 UTC
Closing as WONTFIX.

String Taglib is being deprecated and I don't expect the wordWrap tag to make it into the Extended Taglib which will house some of its functionality.