Modifiers

app developers can also use modifiers to further affect the behavior of a text box or text field. Unlike a constraint, a modifier doesn't restrict the data that users can enter. Instead, modifiers can affect the way the device displays the data, the way the user enters or edits the data, and possibly the way the device is permitted to handle the data. app developers can use one or more modifiers with a constraint. For example, they can have the MIDP implementation use a mask character so that the contents of the text box or text field are not visible. This is commonly done when an app requests that the user enter a password or personal identification number (PIN). The contents of the text box or text field are not affected, only the display.

The INITIAL_CAPS_ Modifiers

The INITIAL_CAPS_SENTENCE modifier requests that during text editing the device capitalize the initial letter of each sentence. The INITIAL_CAPS_WORD modifier requests that during text editing the initial letter of each word be capitalized. Note that this modifier does affect the value stored in the text field: the text is stored with the capitalization. Screenshot shows how text in text boxes with these modifiers could look.

Screenshot Sentence Capitalization and Word Capitalization Modifiers

Java graphics 06fig04.gif


app Developers

Recommend: Java graphics bulb2_icon.gif Don't specify these modifiers in text boxes with an EMAIL or a URL constraint. It is not an error if you do, but they could make the value of the text box unusable. For example, case is important in some URLs—if the case is incorrect the URL will fail.

Strongly Recommend: Java graphics bulb1_icon.gif Don't specify both the INITIAL_CAPS_SENTENCE and INITIAL_CAPS_WORD modifiers in a single text box or field. Use one modifier or the other.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Comply with the INITIAL_CAPS_SENTENCE and INITIAL_CAPS_WORD modifiers if automatic capitalization is appropriate and your character set has the notion of upper-case and lower-case letters.

Strongly Recommend: Java graphics bulb1_icon.gif If the app specifies both modifiers (INITIAL_CAPS_SENTENCE and INITIAL_CAPS_WORD) use the behavior of INITIAL_CAPS_WORD.

The NON_PREDICTIVE Modifier

The NON_PREDICTIVE modifier indicates that the text does not consist of words that are likely to be found in dictionaries typically used by predictive text-input schemes.

app Developers

Consider: Use this modifier in a text box that has a URL, EMAIL, NUMERIC, or DECIMAL constraint. Email addresses and domain names are not typical words, so turning off predictive text input would keep the device from distracting the user by unnecessarily offering suggestions. Similarly, predictive text-input systems are not useful when the user is entering numbers.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif If the app specifies the NON_PREDICTIVE modifier, allow users to enter one character at a time without any predictive input facilities. If the app does not specify this modifier, and your device has predictive input facilities, you can use them to help the user enter data.

The PASSWORD Modifier

The PASSWORD modifier indicates that the text is confidential data that should be obscured whenever possible. Screenshot shows how this modifier could look.

Screenshot PASSWORD Modifier

Java graphics 06fig05.gif


app Developers

Recommend: Java graphics bulb2_icon.gif Use the PASSWORD modifier for text boxes and text fields that hold confidential information such as passwords or PINs.

Recommend: Java graphics bulb2_icon.gif Use the PASSWORD modifier with only the ANY and NUMERIC constraints. The MIDP specification does not limit the use of the PASSWORD modifier; however, using it with constraints other than ANY and NUMERIC, does not make sense.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Choose which character to use as the masking character. The star (*) is commonly used; it is shown in Screenshot.

Some devices do not immediately mask characters, so that users can see whether the system has received the character they intended to enter. For example, the character might appear unmasked for a brief time, or until the user types another character. This helps to decrease user error.

Strongly Recommend: Java graphics bulb1_icon.gif Follow your device conventions for masking the characters entered into a text box or field with a PASSWORD constraint. The behavior of your MIDP implementation will be more predictable if it provides the same behavior as the rest of the device.

Strongly Recommend: Java graphics bulb1_icon.gif Do not allow cutting or copying of the contents of a text box or text field that uses the PASSWORD modifier. Allowing this could be a security problem because the text would appear unmasked if it were then pasted into a text box or field that did not have a PASSWORD modifier.

Strongly Recommend: Java graphics bulb1_icon.gif Never store the contents of the text box or text field with a PASSWORD modifier into a dictionary or table for use in predictive, auto-completing, or other accelerated input schemes.

The SENSITIVE Modifier

The SENSITIVE modifier is similar to the PASSWORD modifier, but the SENSITIVE modifier does not obscure the contents of a text field.

app Developers

Recommend: Java graphics bulb2_icon.gif Use the SENSITIVE modifier for text boxes and text fields that hold less confidential information, such as credit card numbers, which, although private, do not need to be obscured.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Never store the contents of the text box or text field using the SENSITIVE modifier into a dictionary or table for use in predictive, auto-completing, or other accelerated input schemes.

The UNEDITABLE Modifier

The UNEDITABLE modifier indicates that the user is not permitted to edit the contents of the text box or text field. Screenshot shows an example of how this modifier could look.

Screenshot UNEDITABLE Modifier

Java graphics 06fig06.gif


MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif When an app uses the UNEDITABLE modifier, prevent the user from changing the text contents of this object.

Recommend: Java graphics bulb2_icon.gif Provide a visual indication that the text contents cannot be edited. You can also provide audio feedback, such as a beep sound, when the user tries to change the text.

Recommend: Java graphics bulb2_icon.gif If you indicate that the text's contents are uneditable by changing the color of the text, conduct usability testing to verify that the text is still readable.

Screenshot


   
Comments