I'm working on a desktop application (Java Swing) which contains a screen allowing the user to enter and edit magstripe track-data.
This track-data is a string, looking like this:
;1234567890123445=99011200XXXX00000000?
Of course, this is not just random data; the first string of digits is an account number, the string 9901 is an expiry date, etc. The start and end-characters (';' and '?') are always present.
I would like to present this as multiple controls; a text-entry for the account number, dropdowns for the expiry-date, etc., making sure that the user always enters correctly formatted data.
Since this is for a test-tool, however, it should also be possible to enter any data, even with incorrect formatting.
So my current thought is to present the editor as two tabs - one where data is edited in a formatted way, and another one where the data is edited 'raw', basically as one textbox.
Switching from the formatted view to the raw tab is never a problem, since formatted data can always be shown as raw data. The opposite - switching from the raw tab to the formatted tab - is more problematic, since it may not be possible to display the data entered in a formatted way.
My thinking is now to show a warning dialog in that case, telling the user that his track-data will be erased if he really enters formatted view. This doesn't feel quite right though, and I'm sure people have come up with better solutions.
To make things a bit more difficult, the user is not editing just one, but three tracks of data, some of which might become invalid, and others not.
Does anyone have a better solution for this scenario?