:: Home >>

AW.Formats.String

String converter class. Encodes HTML control characters (", &, <, >) so they will appear as nomal text.

Constructor

 var obj = new AW.Formats.String; 

Hierarchy

Methods

cloneCreates an object clone.
comparatorReturns comparator function.
dataToTextTransforms the external data to the readable text.
dataToValueTransforms the external data to the native value type.
initInitializes the object.
setErrorTextSets the error text.
setErrorValueSets the error value.
setTimeoutCalls the function after the specified delay.
textToDataTransforms the text to the external data format.
textToValueTransforms the text to the native value type.
toStringConverts object to string.
valueToDataTransforms the value to the external data format.
valueToTextTransforms the value to the readable text.

Examples

var myData = [
    ["<i>this is text</i>", "<i>this is html</i>"],
];

var text = new AW.Formats.String;
var html = new AW.Formats.HTML;

// grid control
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setCellFormat(text, 0); // text in the first column
obj.setCellFormat(html, 1); // html in the second column
obj.setColumnCount(2);
obj.setRowCount(1);
document.write(obj);

See also

Formats/conversions overview, AW.System.Format (base class), AW.Formats.HTML, setCellFormat method

Comments

No comments yet.
Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5