XMLConnector.suppressInvalidCalls
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
componentInstance.suppressInvalidCalls
Description
Property; indicates whether to suppress a call if parameters are invalid. If this property is
method does not perform a call if the bound parameters fail the validation. A
trigger()
event is emitted, with the code
using the invalid data as required.
Example
This example displays an error because the required parameters are not being passed. Drag an
XMLConnector component into your library, and enter the following code on Frame 1 of the
Timeline:
import mx.data.components.XMLConnector;
var xmlListener:Object = new Object();
xmlListener.result = function(evt:Object) {
trace("results:");
trace(evt.target.results);
trace("");
};
xmlListener.status = function(evt:Object) {
switch (evt.code) {
case 'Fault' :
trace("ERROR! ["+evt.data.faultcode+"]");
trace("\t"+evt.data.faultstring);
break;
case 'InvalidParams' :
trace("ERROR! ["+evt.code+"]");
break;
}
};
var myXMLConnector:XMLConnector = new XMLConnector();
myXMLConnector.addEventListener("result", xmlListener);
myXMLConnector.addEventListener("status", xmlListener);
myXMLConnector.direction = "send/receive";
myXMLConnector.URL = "http://www.flash-mx.com/mm/login_xml.cfm";
myXMLConnector.multipleSimultaneousAllowed = false;
myXMLConnector.suppressInvalidCalls = false;
// myXMLConnector.params = new XML("<login username='Mort'
password='Guacamole' />");
myXMLConnector.trigger();
Remove the comments from the second to last line of code for the snippet to work correctly.
. If this property is
InvalidParams
XMLConnector component (Flash Professional only)
true
, the call takes place,
false
, the
status
903
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?