You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Will Hoover (JIRA)" <ji...@apache.org> on 2007/10/18 22:37:50 UTC

[jira] Created: (WICKET-1085) Input Text Mask

Input Text Mask
---------------

                 Key: WICKET-1085
                 URL: https://issues.apache.org/jira/browse/WICKET-1085
             Project: Wicket
          Issue Type: New Feature
          Components: wicket-extensions
            Reporter: Will Hoover
            Priority: Trivial


Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.

For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536146 ] 

Gerolf Seitz commented on WICKET-1085:
--------------------------------------

i played with it yesterday, and i think there are certain limitations to it:

1) if you have a textfield with an integer model-object and you want to use a mask like "(999)999", 
the model will not get updated due to conversion failure.

2) the InputTextMask doesn't handle prefilled textfiields (component has a non-null, length>0 modelobject)

this is what i found out with just a little playing around, though these issues can be solved probably fairly easy (eg. override convertInput for 1))

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536193 ] 

Gerolf Seitz commented on WICKET-1085:
--------------------------------------

1) i used an integer model-object in my example, but as you said, the component would need a converter.
2) yes, it is the javascript

i tried to implement it as a behavior that expects the bound component to implement ITextFormatProvider to get the input mask,
but i haven't found a way to "inject" a converter into the component form inside the behavior. maybe it was just too late ;)

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1085:
---------------------------------------

    Fix Version/s:     (was: 1.4-M2)
                   1.5-M1

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.5-M1
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Will Hoover (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536203 ] 

Will Hoover commented on WICKET-1085:
-------------------------------------

Seeing that the only issue that exists is in relation to prefilled "invalid" values...

IMHO, I think that it can/should be done generically on the TextField component. All that would be needed is to verify that a valid regexp validator exists that supports the mask (remove reserved characters: "9", "L", "l", "A", and any characters that exist between the reserved regexp character "X"). Basically, this is how a type definition is declared on the TextField to begin with (minus the mask check)- is it not?

Otherwise, a MaskTextField is fine, but I think it's just as easy to do it generically :o)

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1085:
---------------------------------------

    Fix Version/s:     (was: 1.3.0-rc2)
                   1.3.0-rc3

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.3.0-rc3
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1085:
----------------------------------

    Fix Version/s: 1.5-M2
                       (was: 1.5-M1)

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.5-M2
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536307 ] 

Gerolf Seitz commented on WICKET-1085:
--------------------------------------

frank, if you want to, you can do it. i won't be able to do it this weekend.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536132 ] 

Frank Bille Jensen commented on WICKET-1085:
--------------------------------------------

It looks nice. I will convert it into a component and if no-one objects I will add it to extensions. 

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Assigned: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen reassigned WICKET-1085:
------------------------------------------

    Assignee: Frank Bille Jensen

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Issue Comment Edited: (WICKET-1085) Input Text Mask

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536193 ] 

seitz edited comment on WICKET-1085 at 10/19/07 5:10 AM:
----------------------------------------------------------------

1) i used an integer model-object in my example, but as you said, the component would need a converter.
2) yes, it is the javascript

i tried to implement it as a behavior that expects the bound component to implement ITextFormatProvider to get the input mask,
but i haven't found a way to "inject" a converter into the component form inside the behavior. maybe it was just too late ;)

update:
william, these problems are probably easier to solve if there is a dedicated component (eg. MaskedTextField).
as i said above, i tried the more "lightweight" approach to use the mask also for currently existing TextField subclasses (eg. DateTextField in wicket-datetime). in this case, you don't always have the luxury to say that the modelobject should be a string, since you can't alter the components internals from outside.
maybe i'm just overlooking something and overcomplicating it, so i can be totally wrong.

      was (Author: seitz):
    1) i used an integer model-object in my example, but as you said, the component would need a converter.
2) yes, it is the javascript

i tried to implement it as a behavior that expects the bound component to implement ITextFormatProvider to get the input mask,
but i haven't found a way to "inject" a converter into the component form inside the behavior. maybe it was just too late ;)
  
> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Will Hoover (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536192 ] 

Will Hoover commented on WICKET-1085:
-------------------------------------

1) As Billie stated- that was the intention to have "(999)999" evaluate as a string. Most masks should be evaluated a string seeing that most of the time a mask would contain special characters that define the mask (i.e. "(", ")", and "-" in the example). For special cases where a string needs to be converted (such as the case with a date) it would be just as easy to use a converter that converts a date based upon a regexp check on the server. If I am missing something let me know :o)

2) To clarify, this is only an issue when a "invalid" prefilled value is provided. In which case, IMHO, is an issue with the data provided. If the user does not have a valid value to begin with then it's an issue with their data. However, the script does handle "valid" prefilled values. The script assumes that the initial value (if any) originated from a valid source (i.e. DB or other source).

If this is really an issue that needs to be addressed...

A) I could add a page load listener that would validate the value and handle conversion accordingly, but what would we do if an invalid value is found? notify the user and leave it as is (really doesn't resolve the issue)? clear the value (may confusing to developers to see their data missing)? 

B) We could do the validation on the server side before rendering the page- seeing that we already have the mask pattern at that point. Not to mention, we need to do the conversion (and possibly validation) going back to the server anyways, but this will duplicate our efforts in that the code used to evaluate/convert the value would exist on the server as well as the client.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1085:
---------------------------------------

    Fix Version/s:     (was: 1.3.1)
                   1.4.0-M2

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.4.0-M2
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536648 ] 

Frank Bille Jensen commented on WICKET-1085:
--------------------------------------------

I weren't able to get around to it as well. Depending on what we figure out with the 1.3 release perhaps we postpone this until 1.4. Lets see.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Will Hoover (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561325#action_12561325 ] 

Will Hoover commented on WICKET-1085:
-------------------------------------

no offense taken :o) Looks like a nice tool- Although, it is a little bloated. Is it possible to shrink it (as you proposed)? Also, the expected behavior of the backspace/delete keys are not what most user's would expect- I suppose that is customizable?

Most of the bells and whistle features are pretty easy to add to the attached mask if desired (background color, cursor, etc.)

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.4-M2
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson updated WICKET-1085:
-------------------------------------

    Fix Version/s:     (was: 1.5-M3)
                   1.5-M4

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.5-M4
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536202 ] 

Frank Bille Jensen commented on WICKET-1085:
--------------------------------------------

I would go for the MaskTextField. Gerolf do you want to look further at this? Then just assign yourself. Else I will take a look at it this weekend.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1085:
----------------------------------

    Fix Version/s: 1.5-M3
                       (was: 1.5-M2)

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.5-M3
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Sean Sullivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537506 ] 

Sean Sullivan commented on WICKET-1085:
---------------------------------------

Cool idea. I'd like to see this feature in Wicket


> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561305#action_12561305 ] 

Gerolf Seitz commented on WICKET-1085:
--------------------------------------

i just stumbled over iMask: http://zendold.lojcomm.com.br/imask/
this could be a (very appealing) alternative to the attached implementation (no offense Will).

although it requires mootools, maybe there's not much to do to remove this dependency.

iMask is released under the terms of the MIT License.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.4-M2
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Commented: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536155 ] 

Frank Bille Jensen commented on WICKET-1085:
--------------------------------------------

1) I would say the component needs a converter to handle those values. Who says that "(999)9999" or "9999-99-99" is an integer? IMO those could be both string, number and date.

2) I haven't tried it yet, but if it's the javascript that doesn't handle it, then it should be fixed.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner updated WICKET-1085:
------------------------------------

    Affects Version/s: 1.3.0-rc1
        Fix Version/s: 1.3.0-rc2

frank, i am setting this now to 1.3 but move it to 1.4 if you can't get it right very soon.

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.3.0-rc2
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1085:
---------------------------------------

    Fix Version/s:     (was: 1.3.0-rc3)
                   1.3.1

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-rc1
>            Reporter: Will Hoover
>            Assignee: Frank Bille Jensen
>            Priority: Trivial
>             Fix For: 1.3.1
>
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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


[jira] Updated: (WICKET-1085) Input Text Mask

Posted by "Will Hoover (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Will Hoover updated WICKET-1085:
--------------------------------

    Attachment: inputTextMask.js

Attached is the JS script I wrote to handle the mask on the client. There are no libraries needed to use it (it's self contained). All code is original except the trivial snippet at the bottom that is public domain that adds an escape feature to JavaScript's RegExp.

Example usage (param1= input component, param2=mask, param3=clear the input text value when invalid):
<input type="text" onfocus="javascript: InputTextMask.processMaskFocus(this, '(999)999-9999', true);" />

/**
 * InputTextMask component script used for mask/regexp operations.
 * Mask Individual Character Usage:
 * 9 - designates only numeric values
 * L - designates only uppercase letter values
 * l - designates only lowercase letter values
 * A - designates only alphanumeric values
 * X - denotes that a custom client script regular expression is specified</li>
 * All other characters are assumed to be "special" characters used to mask
 * the input component
 * Example 1:
 * (999)999-9999 only numeric values can be entered where the the character
 * position value is 9. Parenthesis and dash are non-editable/mask characters.
 * Example 2:
 * 99L-ll-X[^A-C]X only numeric values for the first two characters,
 * uppercase values for the third character, lowercase letters for the
 * fifth/sixth characters, and the last character X[^A-C]X together counts 
 * as the eighth character regular expression that would allow all characters 
 * but "A", "B", and "C". Dashes outside the regular expression are 
 * non-editable/mask characters.
 */

> Input Text Mask
> ---------------
>
>                 Key: WICKET-1085
>                 URL: https://issues.apache.org/jira/browse/WICKET-1085
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-extensions
>            Reporter: Will Hoover
>            Priority: Trivial
>         Attachments: inputTextMask.js
>
>
> Allow developers to designate a keystroke input pattern for the input text component. The pattern  would be used on the client to control valid keystrokes for the current cursor position within the input text field in relation to the specified pattern.
> For example, a pattern could be designated as "(999)-9999" causing only number values in each position where a "9" appears and using the "(", ")", and "-" as masking characters. When the cursor position reached one of these mask characters the cursor position would advance to the next "9" position. The resulting mask would appear as "(___)___-____" within the input text value.

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