com.sybase.uep.bobclient.controls
Class TextInputController

java.lang.Object
  extended by com.sybase.uep.bobclient.controls.TextInputController

public class TextInputController
extends java.lang.Object

Work as controller to TextInput handle set/get data, verify user input [26 Mar 2010] Add validation handler

Author:
linsong

Constructor Summary
TextInputController(ITextInput textInput)
           
 
Method Summary
 void clearValue(boolean clear)
           
protected  java.lang.String createDataTypeError(java.lang.String type, java.lang.String logicalName, boolean secondArg, java.lang.String invalidValueMessage)
           
 LogicalType getLogicalType()
           
 java.lang.String getSchemaType()
           
 java.lang.Object getValue()
          return value according to schemaType.
 void resetData()
          reset with initialization variable
 void setControlVariable(ControlVariable variable)
           
 void setEmptyMeanNull(boolean emptypMeansNull)
           
 void setValidators(java.util.Vector validators)
           
 void setValue(java.lang.Object value)
           
 boolean validate(boolean needValidate, java.lang.String invalidValueMessage, boolean showAlertDialogIfInvalid, boolean restoreFocusIfInvalid)
          Validates the text input value
 java.lang.String validation(java.lang.String invalidValueMessage)
          If return value not equals "", validation failed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextInputController

public TextInputController(ITextInput textInput)
Method Detail

getSchemaType

public java.lang.String getSchemaType()

getLogicalType

public LogicalType getLogicalType()

setEmptyMeanNull

public void setEmptyMeanNull(boolean emptypMeansNull)

setValidators

public void setValidators(java.util.Vector validators)

clearValue

public void clearValue(boolean clear)

setControlVariable

public void setControlVariable(ControlVariable variable)

setValue

public void setValue(java.lang.Object value)

getValue

public java.lang.Object getValue()
return value according to schemaType.

Returns:

validation

public java.lang.String validation(java.lang.String invalidValueMessage)
If return value not equals "", validation failed.

Returns:
errorMsg

createDataTypeError

protected java.lang.String createDataTypeError(java.lang.String type,
                                               java.lang.String logicalName,
                                               boolean secondArg,
                                               java.lang.String invalidValueMessage)

resetData

public void resetData()
reset with initialization variable


validate

public boolean validate(boolean needValidate,
                        java.lang.String invalidValueMessage,
                        boolean showAlertDialogIfInvalid,
                        boolean restoreFocusIfInvalid)
Validates the text input value

Parameters:
needValidate -
invalidValueMessage -
showAlertDialogIfInvalid -
restoreFocusIfInvalid -
Returns:
true if the validation passes, otherwise false