coderazzi / tablefilter-swing

TableFilter is a set of Swing components to support user-driven filtering on table.
https://coderazzi.net/tablefilter
MIT License
7 stars 2 forks source link

Autochoice and Table filtering does not occur for strings with newline characters in them. #20

Closed coderazzi closed 12 years ago

coderazzi commented 12 years ago

Original report by Anonymous.


Steps to reproduce:
1. Initialize TableFilterHeaders for a jTable with AutoComplete and AutoChoice properties
set to true for a particular column
2. This column cells are rendered by TextAreaRenderer which accepts newline characters.
(eg string: "Test \n String")
3. Check for filtering with characters that occur after the newline.(eg: "*String*")

In the filter dropdown for this column, the characters appearing after the newline("\n")
does not appear, nor in the wildcard search.

When "*\\n*String" is specified, the filters work as expected, but is inconsistent.

Could the mentioning of escape characters be avoided and made as default to search
inclusive of characters occurring after the newline and other special characters?

Running v4.1.4 on WindowsXP.

Original issue reported on code.google.com by karthikv88 on 2011-11-01 10:58:47

coderazzi commented 12 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


(No text was entered with this change)

Original issue reported on code.google.com by coderazzi on 2011-11-09 11:33:03

coderazzi commented 12 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


The issue is easily solved on the Parser class, based on regular expressions, including
the Pattern.DOTALL flag (without side effects).

However, this raises other question: how the content appears on the filter editor with
new lines (see attached image). This would normally need the user to setup a specific
renderer (but then it would loose the opportunity to search text), or remove AutoChoices.Enabled
for that column.

Original issue reported on code.google.com by coderazzi on 2011-11-09 16:17:20


coderazzi commented 12 years ago

Original comment by coderazzi coderazzi (Bitbucket: coderazzi, GitHub: coderazzi).


Fixed on 4.2.0

Original issue reported on code.google.com by coderazzi on 2011-11-10 16:20:06