PropertyEventMethodIndex
WebSquare.uiplugin.fusionchart - 5.0_2.2916B.20171222.151448

FusionCharts Wrapper component. FunsionCharts data is a combination of actual chart data and style options. WebSquare5 provides APIs for the developers to separate them and to easily customize the chart. For more information about properties and APIs, visit the official page of FusionCharts (http://docs.fusioncharts.com/charts/)

Type

uiplugin

Property Summary

accessibility
[default:false, true] When generating ul tags with accessibility="true" setting, the names of X and Y axes are used as the label and the value respectively.
actionURI
URI to call upon execution of exportJSChart.
chartType
Type of the chart
dataList
Adds another DataList. Valid when the seriesType is simple.
drawType
Rendering type of the FusionCharts (javascript, flash, and mixed)
id
Component ID
labelNode
Column ID of the DataCollection to use as the label. The default is the first column of the DataCollection.
plotColor
Dataplot color of the FusionChart
ref
To be used for the binding with the DataCollection.
runflashAt
Specifies the IE version to run Flash for rendering when the drawType is mixed.
seriesColumns
Information about the DataList columns to be used as the series data of the FusionChart when the seriesType is advanced.
seriesNode
The column ID of the DataCollection to be used for the FusionChart when seriesType is simple.
seriesType
Series type for the data binding with the DataCollection.
tabIndex
Same as the tabindex property in HTML standard. Indicates the focusing order of the component by the tab key.
valueNode
The column ID of the DataCollection to be used as the value in the FusionChart when seriesType is simple.
version
FusionChart version.

Event Summary

Method Summary

addClass( className )
Adds a class to the component.
addTrendLine( options )
Adds a trend line.
addVTrendLine( options )
Adds a VTrendLine.
applyStyle( styleType , styleName , options , objectNameArr )
Applies the style of the FusionCharts.
bind( eventType , function )
Dynamically allocates events to the component.
changeClass( oldClassName , newClassName )
Renames the class from oldClassName to newClassName.
configure( options )
Changes message displayed on the FusionCharts.
draw( )
Renders the FusionChart.
exportJSChart( fileType , options )
Exports charts rendered in JavaScript in JPG, PNG, and PDF formats.
fc( )
Returns FusionCharts objects.
focus( )
Moves the focus to the component.
getActionURI( )
Returns the URI to be called upon execution of exportJSChart.
getChartAttribute( name )
Returns attributes of FusionCharts.
getDisabled( )
Gets the current value of the disabled property.
getGenerator( )
Called by a component under the Generator component. When called, gets the parent Generator object.
getID( )
Gets the ID of the component.
getInitStyle( property )
Gets the initial style of the component.
getJSONData( )
Returns FusionCharts data in JSON string format.
getOpacity( )
Gets the opacity of the component defined in CSS.
getPluginName( )
Gets the pluginName (or the name) of the component.
getPosition( positionName )
Gets the left or top position of the component.
getReadOnly( )
Gets the current setting of the readOnly property.
getScope( )
Returns the parent WFrame object when the component is a child of the WFrame which uses the scope feature (scope=true).
getScopeWindow( )
Returns the scope object of the parent when the component is a child of the WFrame which uses the scope feature (scope=true).
getSize( sizeName )
Gets the size of the component.
getStyle( propertyName )
Gets the current value of the propertyName of the component defined in CSS.
getStyleValue( style )
[deprecated] Use getStyle instead.
getSVGString( )
Returns the chart SVG in the string format.
getSVGString1( )
When the file type is JPG or PNG, use htis funciton.
getTitle( )
Gets the title value.
getUdcHome( )
Returns the path of the file which defines the UDC.
getUdcRoot( )
Returns the path of the file which defines the UDC.
getUserData( key )
Returns the user-defined property value set by setUserData as the user data or source (page XML).
hasClass( className )
Checks whether the component has className received as a parameter or not.
hide( )
Hides the component.
modifySeriesName( options )
Changes the series name in the chart.
removeClass( className )
Removes className from the component.
setAccessibility( flag )
Supports web accessibility requirements for the FusionChart.
setActionURI( uri )
Sets the URI to call upon execution of exportJSChart.
setChartAttribute( options )
Changes the attribute values of the chart.
setChartColumnRef( ref , labelNode , seriesColumns )
Sets the properties related to data binding with a DataCollection.
setChartColumnSimpleRef( ref , labelNode , seriesNode , valueNode )
Sets the properties related to data binding with a DataCollection when the seriesType is simple.
setDisabled( disabled )
Sets the disabled property.
setEventPause( evList , flag )
Disables or enables the component event.
setInitStyle( property )
Initializes the component style.
setJSONData( json )
Sets the chart data with the given JSON object.
setOpacity( value )
Sets the opacity of the component.
setPlotColor( colorArr , colorOption )
Sets the dataplot color of the chart.
setPosition( left , top , mode )
Sets the position (left, top) of the component.
setReadOnly( readOnly )
Controls the "readOnly" property.
setSize( width , heigth )
Sets the size (width, height) of the component.
setStyle( propertyName , value )
Sets the style of the specified property.
setUserData( key , value )
Sets the user data in the component.
show( displayType )
Displays the component.
toggleClass( className )
Removes a class named className, or if there is no such a class, adds a class named className.
trigger( type , array )
Triggers a certain event registered for the component.
unbind( type , function )
Removes an event registered for the component.
visible( flag )
[deprecated] Shows/Hides the component, or sets the visible property using setStyle.

Property Detail

accessibility
[default:false, true] When generating ul tags with accessibility="true" setting, the names of X and Y axes are used as the label and the value respectively.
true: Uses the value of the axaxisname property as the label and of the ayaxisname as the value of the ul tag. axaxisname and ayaxisname are set as the parameters of setChartAttribute API.
In case there are two Y axes, add the sayaxisname property for the second Y axis in the dataset that is set for setJSONData API.
false (Default): Not used.
Related property: accessibility="true"
actionURI
URI to call upon execution of exportJSChart. [default: engine/servlet/exportFusionChart.jsp]
chartType
Type of the chart
dataList
Adds another DataList that must have the same structure with the DataList already bound. Valid when the seriesType is simple.
drawType
Rendering type of the FusionCharts (javascript, flash, and mixed)
id
Component ID
labelNode
Column ID of the DataCollection to use as the label. The default is the first column of the DataCollection.
plotColor
Dataplot color of the FusionChart
ref
To be used for the binding with the DataCollection. Sets the DataCollection. When seriesType is advanced, labelNode and seriesColumns are supported, and when seriesType is simple, labelNode, seriesNode, and valueNode are supported.
runflashAt
Specifies the IE version to run Flash for rendering when the drawType is mixed.
seriesColumns
Information about the DataList columns to be used as the series data of the FusionChart when the seriesType is advanced. The default is the columns of which dataType is number except the first column.
seriesNode
The column ID of the DataCollection to be used for the FusionChart when seriesType is simple. The default is the second column of the DataCollection.
seriesType
Series type for the data binding with the DataCollection. When seriesType is simple, only Single Series and Multi Series charts are supported.
tabIndex
Same as the tabindex property in HTML standard. Indicates the focusing order of the component by the tab key.
valueNode
The column ID of the DataCollection to be used as the value in the FusionChart when seriesType is simple. The default is the column of which dataType is number in the DataCollection.
version
FusionChart version.

Event Detail

Method Detail

addClass( className )
Adds a class to the component.
Parameter
nametyperequireddescription
classNameStringYName of the class to add
Sample
// Add oddClass to component input1. input1.addClass("oddClass");
addTrendLine( options )
Adds a trend line.
Parameter
nametyperequireddescription
optionsObjectYOption object to add
Sample
var options = { startValue: "10", color: "FF0000", displayValue: "Check" }; chart1.addTrendLine(options);
addVTrendLine( options )
Adds a VTrendLine. (Supported only for scatter and bubble.)
Parameter
nametyperequireddescription
optionsObjectYOption object to add
Sample
var options = { startValue: "65", endValue : "90", alpha: "15", color: "FFFF00" }; chart1.addVTrendLine(options);
applyStyle( styleType , styleName , options , objectNameArr )
Applies the style of the FusionCharts.
Parameter
nametyperequireddescription
styleTypeStringYStyle type (font, bevel, glow, animation, shadow)
styleNameStringYStyle name
optionsObjectYOption object to add
objectNameArrArrayYChart object to apply the style to
Sample
var options = { color:"FF0000", font:"15", bold:"1" }; chart1.applyStyle("font", "captionFont", options, ["Caption","XAXISNAME"]);
bind( eventType , function )
Dynamically allocates events to the component.
Parameter
nametyperequireddescription
eventTypeStringYName of the event to allocate.
functionFunctionYHandler function of the event to allocate.
Sample
// Define the event handler function for the onclick event in the input component, and bind the function. input1.bind("onclick", function(e){ alert(input1.getValue();})); // Bind commObj.ev_click function for the onclick event with component input1. var commObj = {}; commObj.ev_click = function(e){ alert("click :: "+this.id); }; input1.bind("onclick", commObj.ev_click );
changeClass( oldClassName , newClassName )
Renames the class from oldClassName to newClassName.
In the default setting, only the classes added by addClass will be applied. In order to directly remove the class defined in the "class" property of the component, add the following setting in config.xml file.
<style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
oldClassNameStringYName of the class to remove
newClassNameStringYName of the class to add
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following to config.xml. <style> <removeDefaultClass value="true" /> </style> // Change tmpInputClass class to tmpInputWarninClass. input1.changeClass("tmpInputClass","tmpInputWarninClass");
configure( options )
Changes message displayed on the FusionCharts.
Parameter
nametyperequireddescription
optionsObjectYOption object to configure
Sample
chart1.configure({"ChartNoDataText" :"No data."});
draw( )
Displays the fusion chart.
Sample
chart1.draw();
exportJSChart( fileType , options )
Exports charts rendered in JavaScript in JPG, PNG, and PDF formats.
Parameter
nametyperequireddescription
fileTypeStringYExported file type (jpg, png, pdf)
optionsObjectYName of the exported file
Sample
var options = {}; options.fileName = "test"; fusionchart1.exportJSChart("jpg", options);
fc( )
Returns FusionCharts objects. With the received FusionCharts object, the developer can call native APIs provided by FusionCharts.
Return
typedescription
ObjectFusionChart object
Sample
chart1.fc().setXMLUrl("mychartdata.xml"); chart1.fc().print(); chart1.fc().signature();
focus( )
Moves the focus to the component.
getActionURI( )
Returns the URI to be called upon execution of exportJSChart.
getChartAttribute( name )
Returns attributes of FusionCharts.
Parameter
nametyperequireddescription
nameStringYName of the attribute
Return
typedescription
StringValue of the attribute
Sample
chart1.getChartAttribute("caption");
getDisabled( )
Gets the current value of the disabled property.
Return
typedescription
BooleanThe value of the disabled property.
Sample
var returnValue = componentId.getDisabled(); (Return example) false
getGenerator( )
Called by a component under the Generator component. When called, gets the parent Generator object.
Return
typedescription
ObjectParent Generator object
Sample
<w2:generator id="generator1"> <w2:trigger id="trigger1" ev:onclick="scwin.trigger1_onclick"></w2:trigger></w2:generator> scwin.trigger1.onclick = function(){ console.log(this.getGenerator());} // Click trigger1 to display the generator1 object on the console. // See https://inswave.com/jira/browse/WPF-1425.
getID( )
Gets the ID of the component.
Return
typedescription
StringID of the WebSquare5 component
Sample
// The WebSquare5 component dynamically received as a parameter can be used as shown in the following. function fn_validCheck(tmpObj){ // tmpObj has an ID of "input1". var compID = tmpObj.getID(); // (Return Example) "input1" }
getInitStyle( property )
Gets the initial style of the component.
Parameter
nametyperequireddescription
propertyStringNName of the attribute (If not specified, all information will be ouputted.)
getJSONData( )
Returns FusionCharts data in JSON string format.
Return
typedescription
Object:YChart data
Sample
chart1.getJSONData();
getOpacity( )
Gets the opacity of the component defined in CSS.
Return
typedescription
IntegerOpacity
Sample
// Apply opacity CSS to the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;opacity:0.2;"></xf:input> var returnValue = input1.getOpacity(); // "returnValue" is a real number between 0 and 1. // (Return Value) "0.2"
getPluginName( )
Gets the pluginName (or the name) of the component.
Return
typedescription
StringpluginName of the WebSquare5 component
Sample
// For a WebSquare5 object dynamically received by a common function, conditional statements can be used as shown below. var commObj = {}; commObj.fn_makeReqData = function(tmpObj){ var tmpID = tmpObj.getID(); // Component ID var tmpCompType = tmpObj.getPluginName(); // Component Type if(tmpCompType == "input"){ //..Logic.. }else if(tmpCompType == "gridView"){ //..Logic .. }else{ //..Logic.. } };
getPosition( positionName )
Gets the left or top position of the component. If set by %, the corresponding pixel value will be returned.
Parameter
nametyperequireddescription
positionNameStringY[left,top] Type of the position
Return
typedescription
NumberPosition of the component
Sample
// Apply margin CSS to the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;margin:10px;"></xf:input> var returnValue = input1.getPosition("top"); // The returnValue will be a position in pixels. // (Return Example) 10
getReadOnly( )
Gets the current setting of the readOnly property.
Return
typedescription
BooleanThe current setting of the readOnly property
Sample
var returnValue = componentId.getReadOnly(); // (Return Example) false
getScope( )
Returns the parent WFrame object when the component is a child of the WFrame which uses the scope feature (scope=true).
Returns null when the component is not a child of the WFrame using the scope feature (scope=true).
Return
typedescription
Objectwframe object or null
Sample
// The main page contains wframe1, and wframe1 contains wframe11 which contains textbox1. textbox1.getScope(); // Returns wframe11 object.
getScopeWindow( )
Returns the scope object of the parent when the component is a child of the WFrame which uses the scope feature (scope=true).
Returns a global window object when the component is not a child of the WFrame using the scope feature (scope=true.
Return
typedescription
ObjectScope object of the wframe object, or a global window object
Sample
// The main page contains wframe1, and wframe1 contains wframe11 which contains textbox1. var scope = textbox1.getScopeWindow(); scope.wframe11 === textbox1.getScope(); // true
getSize( sizeName )
Gets the size of the component. If set by "%", the corresponding pixel value will be returned.
Parameter
nametyperequireddescription
sizeNameStringY[height, innerHeight, outerHeight, outerMarginHeight, width, innerWidth, outerWidth, outerMarginWidth] Type of the size. For the calculation of each size type, see below.
height : element.clientHeight innerHeight : element.clientHeight + padding outerHeight : element.clientHeight + padding + border outerMarginHeight : element.clientHeight + padding + border + margin width : element.clientWidth innerWidth : element.clientWidth + padding outerWidth : element.clientWidth + padding + border outerMarginWidth : element.clientWidth + padding + border + margin
Return
typedescription
NumberSize of the component
Sample
var returnValue = componentId.getSize("width"); // "returnValue" will be a size in pixels. If set by "%", the corresponding pixel value will be returned. // (Return Example) 100
getStyle( propertyName )
Gets the current value of the propertyName of the component defined in CSS.
Parameter
nametyperequireddescription
propertyNameStringYName of the property in the style
Return
typedescription
StringStyle value
Sample
// Define an Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;"></xf:input> var returnValue = input1.getStyle("width"); // (Return Example) "144px"
getStyleValue( style )
[deprecated] Use getStyle instead.
Gets the current value of the propertyName of the component defined in CSS.
Parameter
nametyperequireddescription
styleStringYName of the property defined in the style
Return
typedescription
StringValue defined in the style property. (In case of a color, the hexcode of the color will be returned.)
getSVGString( )
Returns the chart SVG in the string format.
Return
typedescription
StringPre-processed SVG string
getSVGString1( )
When the file type is JPG or PNG, use htis funciton.
Return
typedescription
StringPre-processed SVG string
getTitle( )
Gets the title value.
Return
typedescription
StringTitle value
Sample
// Define the "title" for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" title="이름 입력"></xf:input> var tmpTitle = input1.getTitle(); // (Return Example ) "Input Name"
getUdcHome( )
Returns the path of the file which defines the UDC. Includes the file extension of .xml. For a path without .xml, use getUdcRoot. When called by a component, not a UDC object, undefined will be returned.
Return
typedescription
StringWhen called by a component, not a UDC object, undefined will be returned.
Sample
The udc file is /a/b/udc.xml, the XML file is /a/c/main.xml, and the UDC object ID is udc1. udc1.getUdcHome(); // The execution result is /a/b/udc.xml.
getUdcRoot( )
Returns the path of the file which defines the UDC. udc1.getUdcHome(); // The execution result is /a/b/udc.xml. For a path including .xml, use getUdcHome. When called by a component, not a UDC object, undefined will be returned.
Return
typedescription
StringWhen called by a component, not a UDC object, undefined will be returned.
Sample
The udc file is /a/b/udc.xml, the XML file is /a/c/main.xml, and the UDC object ID is udc1. udc1.getUdcHome(); // The execution result is /a/b/udc.xml.
getUserData( key )
Returns the user-defined property value set by setUserData as the user data or source (page XML).
Parameter
nametyperequireddescription
keyStringYRandom data key
Return
typedescription
StringData of the corresponding key
Sample
// Apply the customized property (eduTest) to the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" eduTest="Hello"></xf:input> input1.getUserData("eduTest"); // (Return Example) "Hello" // Use setUserData. input1.setUserData("eduTest","WebSquare"); input1.getUserData("WebSquare"); // (Return Example) "Hello"
hasClass( className )
Checks whether the component has className received as a parameter or not.
Parameter
nametyperequireddescription
classNameStringYclassName to check
Return
typedescription
BooleanWhether the component has the class or not
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> var returnValue = input1.hasClass("tmpInputClass"); // (Return Example) true
hide( )
Hides the component.
he CSS setting will be "display:none;" and "visibility:hidden;".
Sample
componentId.hide();
modifySeriesName( options )
Changes the series name in the chart.
Parameter
nametyperequireddescription
optionsObjectYOption ( seriesType,colId,newName,oldName )
Sample
When the SeriesType is advanced: var options = {}; options.seriesType = "advanced"; options.colId = "series1"; options.newName = "summer"; chart1.modifySeriesName(options); Wen the SeriesType is simple: options.seriesType = "simple"; options.oldName = "spring"; options.newName = "summer"; chart2.modifySeriesName(options);
removeClass( className )
Removes className from the component.
In the default setting, only the classes added by addClass will be applied. In order to directly remove the class defined in the "class" property of the component, add the following setting in config.xml file.
<style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
classNameStringYName of the class to remove
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following to config.xml. <style> <removeDefaultClass value="true" /> </style> // Remove tmpInputClass class. input1.removeClass("tmpInputClass");
setAccessibility( flag )
Supports web accessibility requirements for the FusionChart.
Parameter
nametyperequireddescription
flagBooleanYAccessibility on / off
Sample
chart1.setAccessibility(true); on chart1.setAccessibility(flag); off
setActionURI( uri )
Sets the URI to call upon execution of exportJSChart.
Parameter
nametyperequireddescription
uriStringY
setChartAttribute( options )
Changes the attribute values of the chart.
Parameter
nametyperequireddescription
optionsObjectYOption object to add
Sample
var options = { caption : "Monthly Revenue", subCaption : "subcaption test", xAxisName : "Month", yAxisName:"Revenue" lineColor:"d99103" } chart1.setChartAttribute(options);
setChartColumnRef( ref , labelNode , seriesColumns )
Sets the properties related to data binding with a DataCollection.
Parameter
nametyperequireddescription
refStringYattribute DataCollection id
labelNodeStringYlabelNode
seriesColumnsStringYseriesColumns
Sample
chart1.setChartColumnRef('data:dataList1','Month',"[['Year2','Year3','Year1']]");
setChartColumnSimpleRef( ref , labelNode , seriesNode , valueNode )
Sets the properties related to data binding with a DataCollection when the seriesType is simple.
Parameter
nametyperequireddescription
refStringYattribute DataCollection id
labelNodeStringYlabelNode
seriesNodeStringYseriesNode
valueNodeStringYvalueNode
Sample
chart1.setChartColumnSimpleRef(null,'Month', 'Year1','Year1');
setDisabled( disabled )
Sets the disabled property. True to disable, or false not to disable.
Parameter
nametyperequireddescription
disabledBooleanYTrue to disable, or false not to disable.
Sample
// Disable the component. componentId.setDisabled(true);
setEventPause( evList , flag )
Disables or enables the component event.
Parameter
nametyperequireddescription
evListStringNList of the events. If not specified, all user events of the component will be listed. (Enter null data.)
flagBooleanYtrue is to pause, or false is to cancel pausing.
Sample
input1.setEventPause("onclick", true); // Dynamically pauses the onclick event. input1.setEventPause("onfocus,onblur", false); // Restarts the onfocus and the onblur events. input1.setEventPause(null, true); // Pauses all user events registered for the Input component.
setInitStyle( property )
Initializes the component style.
Parameter
nametyperequireddescription
propertyStringNName of the property (If not specified, all properties will be returned.)
Sample
group1.getInitStyle();
setJSONData( json )
Sets the chart data with the given JSON object.
Parameter
nametyperequireddescription
jsonObjectYChart data
setOpacity( value )
Sets the opacity of the component.
Parameter
nametyperequireddescription
valueNumberYOpacity value (A real number between 0 and 1)
Sample
componentId.setOpacity(0.45);
setPlotColor( colorArr , colorOption )
Sets the dataplot color of the chart.
Parameter
nametyperequireddescription
colorArrArrayY
colorOptionArrayY
Sample
var colorArr = ["ff0000","00ff00","0000ff"]; chart1.setPlotColor(colorArr);
setPosition( left , top , mode )
Sets the position (left, top) of the component.
Parameter
nametyperequireddescription
leftNumberYLeft position or null.
topNumberYTop position or null.
modeStringN[defulat:absolute, delta] absolute sets the current positions as x and y, and delta adds x and y to the current positions.
Sample
// Set the top position of the component as 100 pixels. componentId.setPosition(null, 100);
setReadOnly( readOnly )
Controls the "readOnly" property. True to enable, or false to disable.
Parameter
nametyperequireddescription
readOnlyBooleanYTrue to enable, or false to disable.
Sample
// Enable the read-only. componentId.setReadOnly(true);
setSize( width , heigth )
Sets the size (width, height) of the component.
Parameter
nametyperequireddescription
widthNumberYComponent width or null
heigthNumberYComponent height or null
Sample
// Set the component height as 100 pixels. componentId.setSize(null,100);
setStyle( propertyName , value )
Sets the style of the specified property.
Parameter
nametyperequireddescription
propertyNameStringYName of the style
valueStringYValue of the style
Sample
// Set the component width as 200px. componentId.setStyle("width", "200px"); // Change the background color to olive. componentId.setStyle("background-color","olive");
setUserData( key , value )
Sets the user data in the component. If the key cannot be set for the component, corresponding logs will be displayed.
Parameter
nametyperequireddescription
keyStringYRandom data key
valueStringYRandom data key
Sample
// Setting a (key, value) pair of ("data", "WebSquare5") in the component. componentId.setUserData("data", "WebSquare"); // Some keys cannot be set for the component. componentId.setUserData("title", "WebSquare"); // (Log Example) !!!WARNING - [title] can't define as UserData
show( displayType )
Displays the component.
The related CSS properties are display and visibility:show;.
Parameter
nametyperequireddescription
displayTypeStringN[default:block ,inline ,none ,""] Value of the Display property.
Sample
// Block the "display" property. componentId.show(); // Enable the "display" property in the class. componentId.show("");
toggleClass( className )
Removes a class named className, or if there is no such a class, adds a class named className.
In the default setting, only the classes added by addClass can be removed. To remove other classes, add the following setting in config.xml.
<style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
classNameStringYclassName to set
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following to config.xml. <style> <removeDefaultClass value="true" /> </style> // Remove tmpInputClass class. input1.toggleClass("tmpInputClass"); // Add tmpInputClass class again. input1.toggleClass("tmpInputClass");
trigger( type , array )
Triggers a certain event registered for the component.
Parameter
nametyperequireddescription
typeStringYName of the event to trigger
arrayArrayNArray of parameters to send to the event handler
Sample
// Trigger the onclick event in the input1 component. input1.trigger("onclick"); // Trigger the onviewchange event in the input component and call the event handler function by sending arguments of (1, 2). input1.trigger("onviewchange", [1,2]);
unbind( type , function )
Removes an event registered for the component.
Parameter
nametyperequireddescription
typeStringNName of the event to remove. If not specified, all events of the components will be removed.
functionFunctionNHandler function of the event to remove. If not specified, all handler functions of the event will be removed.
Sample
// Remove all events registered in the input component. input1.unbind(); // Remove all handler functions of onviewchange event registered in the input component. input1.unbind("onviewchange"); // Remove the func1 event handler of onviewchange event registered for component input1. input1.unbind("onviewchange", func1);
visible( flag )
[deprecated] Shows/Hides the component, or sets the visible property using setStyle.
Sets the visibility of the component style. In case of true, set visible. In case of false, set hidden.
Parameter
nametyperequireddescription
flagBooleanYVisibility (In case of true, set visible. In case of false, set hidden.)