|
|||||||||
| Home >> All >> com >> openwave >> oui >> [ waomelements overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.openwave.oui.waomelements
Class Format

java.lang.Objectcom.openwave.oui.framework.WaomElement
com.openwave.oui.framework.WaomLeaf
com.openwave.oui.waomelements.Format
- All Implemented Interfaces:
- java.io.Serializable
- public class Format
- extends com.openwave.oui.framework.WaomLeaf
The Format object is intended to overcome several differences in the support of input masks
(AKA formats or input formats) in handsets by different vendors.
Formats are very useful for guiding users typing text into an input field.
When properly deployed, formats save users from excessive typing and, to an extent, validates
the data before they are sent to the server.
In short, formats are extremely important for usability. Unfortunately, there are differences
in the support of format by the different handsets that often force developers to renounce input masks.
In this context, the Format object lets developers exploit input masks in the best possible way on each phone.
Just to give you an example, A mask of - let's say \+\4\4\ *N will, on the UP.Browser display +44
and enter number mode. On a Nokia phone it will do nothing, and the user can enter anything.
However, what the user types won't be accepted unless it matches the format exactly.
Furthermore, Nokia 7110 phones won't go into number mode when an input mask like the one above is used,
since the format includes non-numerical characters (such as a space and a plus sign).
If the user enters +44 1638508520 then that would be OK. If they entered +441638508520 it wouldn't
(missing the space) etc. The only workaround in generic WML is to accept anything, and rely on client-side
(WMLScript) or server side checking. This is not a good option.
If you want to exploit input masks in your application, while avoiding the need to branch your code,
the Format object offers a solution in a specific (but common) case.
If your format is composed by:
- anything static (es: "+44 ") (the prefix)
- followed by a snippet of text that users are supposed to insert (es: 10 digits)
The Format object will build an extra format attribute for the UP.Browser that is given by concatenating the format for the static part with the format provided by the developer.
Creation date: (4/5/2001 10:08:44 AM)
| Field Summary | |
private java.lang.String |
dynVarName
|
private java.lang.String |
formatting
|
private java.lang.String |
fullVarName
|
private static long |
serialVersionUID
|
private java.lang.String |
staticText
|
private java.lang.String |
upguiPicURL
|
| Fields inherited from class com.openwave.oui.framework.WaomLeaf |
|
| Fields inherited from class com.openwave.oui.framework.WaomElement |
|
| Constructor Summary | |
Format(java.lang.String format_prefix,
java.lang.String varname,
java.lang.String backup_varname,
java.lang.String format_string)
Format constructor. |
|
| Method Summary | |
java.lang.String |
getContentExpression()
Insert the method's description here. |
java.lang.String |
getDynVarName()
Insert the method's description here. |
java.lang.String |
getFormatting()
Insert the method's description here. |
java.lang.String |
getFullVarName()
Insert the method's description here. |
java.lang.String |
getNokiaContentExpression()
|
java.lang.String |
getStaticText()
Insert the method's description here. |
boolean |
isWidget()
|
void |
setDynVarName(java.lang.String dynVarName)
Insert the method's description here. |
void |
setFormatting(java.lang.String formatting)
Insert the method's description here. |
void |
setFullVarName(java.lang.String fullVarName)
Insert the method's description here. |
void |
setStaticText(java.lang.String staticText)
Insert the method's description here. |
void |
visit(com.openwave.oui.framework.WaomVisitor wv)
|
| Methods inherited from class com.openwave.oui.framework.WaomLeaf |
getChildren |
| Methods inherited from class com.openwave.oui.framework.WaomElement |
addElement, addTo, clearChildren, getClassValue, getDirectDefinition, getIdValue, getParent, getWaomElementName, isAbsCard, isAppendix, isBodyPager, isCaller, isCard, isComboMenu, isConditionalCard, isDeck, isForm, isHead, isInRawMode, isOnevent, isOption, isParagraph, isPathTask, isTask, isTaskMenu, isTemplate, isTimer, render, setClassValue, setDirectDefinition, setIdValue, setToRawMode, setWaomElementName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
staticText
private java.lang.String staticText
fullVarName
private java.lang.String fullVarName
dynVarName
private java.lang.String dynVarName
formatting
private java.lang.String formatting
upguiPicURL
private java.lang.String upguiPicURL
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
| Constructor Detail |
Format
public Format(java.lang.String format_prefix, java.lang.String varname, java.lang.String backup_varname, java.lang.String format_string)
- Format constructor.
| Method Detail |
getContentExpression
public java.lang.String getContentExpression()
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
getDynVarName
public java.lang.String getDynVarName()
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
getFormatting
public java.lang.String getFormatting()
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
getFullVarName
public java.lang.String getFullVarName()
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
getNokiaContentExpression
public java.lang.String getNokiaContentExpression()
getStaticText
public java.lang.String getStaticText()
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
isWidget
public boolean isWidget()
setDynVarName
public void setDynVarName(java.lang.String dynVarName)
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
setFormatting
public void setFormatting(java.lang.String formatting)
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
setFullVarName
public void setFullVarName(java.lang.String fullVarName)
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
setStaticText
public void setStaticText(java.lang.String staticText)
- Insert the method's description here.
Creation date: (4/5/2001 10:33:38 AM)
visit
public void visit(com.openwave.oui.framework.WaomVisitor wv)
|
|||||||||
| Home >> All >> com >> openwave >> oui >> [ waomelements overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC