Handle Control Characters in Input Fields
-----------------------------------------

                 Key: PIVOT-343
                 URL: https://issues.apache.org/jira/browse/PIVOT-343
             Project: Pivot
          Issue Type: Improvement
          Components: wtk
            Reporter: Sandro Martini
            Priority: Minor
             Fix For: 2.0


In TextInput (or at least in TextArea, then possibly in any other component 
that accept input form the user) could be useful to have a property to set what 
to do with Control Chars, like in dot Net components.

This is important for example with some applications reading data from 
instruments (for example BarCode Scanners), where usually at the end of any 
code read will be appended a CR LF as a marker, and in this case these chars 
have to be accepted in the field but not displayed.

The default behavior should be to filter them out in all components (but not in 
multi-line components, like TextArea), but if the filtering is disabled (maybe 
with a dedicated style property) we could use another style property to set the 
desired formatting (by default nothing, or maybe a given char like space, etc).

So what do you think on a style like "escapeControlCharacters" to control the 
display part, with some flag values, like "space", "none" or "null", etc ?
And another style like "filterControlCharacters" by default true (remove any 
non printable char, but in a i18n context could not be so simple to know if a 
char is displayable, right ? or maybe we could have here a regexp but could be 
too heavy ... ideas ?) and if false it keep all chars as given.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to