Name |
Description |
SK.DB.Format( ) |
Constructor - generateColumnCSSClass( ) — (optional) should return a valid CSS "class" attribute value which is used when displaying the value of the current column type - toClient( value ) — (optional) formats the data from the server and returns the formatted result - toServer( value ) — (optional) formats the value that comes from the client and will be passed back to the server
|
setColumnHandler( |
The column type is one of the constants in SK.DB.Column. The "handler" must be the name of the class that inherits SK.DB.Format.Default |
getColumnHandler( |
Returns the JS class that takes care of the columns of type stored in the "column_meta". The column_meta is the same meta information given by the db.column.get API call or by the SK.DB.getColumn |
toClient( |
Uses the handler for the type of column stored in the "column_meta" and invokes its "toClient" method. If no custom handler specified, a predefined handler is used. Returns the value of handler's "toClient" |
toServer( |
Uses the handler for the column type stored in "column_meta" and invokes the "toServer" method. Returns the value of handler's "toServer". |
Examples
Formatting the records from a random database in an account
<script type="text/javascript"> |