Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Flex RemoteObject Data Calls

Have Programming Question? Ask it here!
 
 
 


bikrantsingh
RemoteObject Data Calls
1 Answer(s)      3 years and 9 months ago
Posted in : Flex


Hi.....

please tell me about
How do I make synchronous data calls?
please give me an example for that......

Thanks

Advertisement
View Answers

October 22, 2010 at 11:02 AM


Ans:

You cannot make synchronous calls. You must use the result event. No, you can't use a loop, setInterval, or even doLater. This paradigm is quite aggravating at first. Take a deep breath, surrender to the inevitable, resistance is futile.

There is a generic way to handle the asynchronous nature of data service calls, called ACT (Asynchronous Call Token). Search for this in the Developing Flex Applications LiveDocs for a full description.

Here it is in a nutshell. This example uses HTTPService but will be similar for RemoteObject and WebService:

  1. Create a function to handle the data return, like onResult().
  2. In the HTTPService tag, put this function name in the result property and pass "event" in too.
  3. Invoke the call in the script:

//invokes the call to the HTTP data service

var oRequestCallbject = app.mxdsGetData.send(oRequest);

//Next, define a string to identify the call. We will use this string value in the result handler.

oRequestCall.MyQueryId = "WhateverIWanttoUseToIdentifyThisCall" ;

//Yes, you CAN set this AFTER you invoke send()

  1. In the result handler, which will be called every time the data service call returns, identify what the returned data contains, as follows:

    var callResponse = oEvent.call; //get the call object //gets the value of this property you set in the call var sQueryId = callResponse.MyQueryId; //will be "WhateverIWanttoUseToIdentifyThisCall"; trace(sQueryId);



Related Tutorials/Questions & Answers:
RemoteObject Data Calls
RemoteObject Data Calls  Hi..... please tell me about How do I make synchronous data calls? please give me an example for that...... Thanks
RemoteObject
. RemoteObject 2. HTTPService 3. WebService
Advertisements
RemoteObject in flex
RemoteObject in flex  Hi..... Why are my ValueObject member variables undefined in the results from my RemoteObjects requests? Please give me the answer Thanks
RemoteObject in flex
RemoteObject in flex  Hi..... Please give me the solution of this problem How do I get access to the J2EE session from my RemoteObjects? please give the answer with example ASAP Thanks
Mocking a service that calls another service
Mocking a service that calls another service  I have a method, say m1 in class, say C1. Method m1 calls a method, say m2 from another service class, say C2. So I mock m2 in junit test-cases for m1. However, m2 itself calls
java code(API calls) - Java Beginners
java code(API calls)  How to insert an image into Word document?????????can any one tell the API call for inserting an image or picture into word document............using JAVA(APACHE POI PACKAGE (Word-HWPF))plzzzzzzzz
Implement mechanisms for efficient inter-component calls
Implement mechanisms for efficient inter-component calls Prev Chapter 1. Design, build and test...; Implement mechanisms for efficient inter-component calls Bean Interfaces
data
data  Handling data
data
data  data Handling AOP
data
data  Handling data in AOP
data
data handling examples in AOP Model  data handling examples in AOP Model
Difference between httpService and Data Service
Difference between httpService and Data Service  Hi.. Please tell me What is the difference between httpService and Data Service? Thanks  Solution: When we use flex Data Services we have to need
importing data and edit that data
importing data and edit that data   hello sir i have data in excel sheet which contain 2 rows and i want to import that data to ms access and edit that data like adding new columns and new rows and creating new tables
Who calls paintComponent
Java NotesWho calls paintComponent When you subclass JPanel to draw... visible (uncovered or deminimized) or is resized, the "system" automatically calls... processed, calls update(), which calls paint(), which calls your paintComponent
Data call in flex
synchronous behavior? You can't do this. See "How do I make synchronous data calls...Data call in flex  Hi.... I'm sending my request, and I see the data traffic in the command window, but why is the result always empty? Please give
data processing is
data processing is   data processing is   Data processing is associated with commercial work. Data processing is also referred as Information System. Data processing is basically used for analyzing, processing
data tyape
data tyape   please give me data type of Date
data tyape
data tyape   please give me data type of Date
data tyape
data type of Date  please give me data type of Date
data tyape
data tyape   please give me data type of Date
data tyape
What data tyape a date field req in SQL   please give me data type of Date
data tyape
data type of date in mysql  please give me data type of Date
data type
data type  which data type is used to store video file in mysql databse
Data objects
Data objects   hello,, What are data objects?   hii, Sequences, Views, clusters, Tables, index and cluster are called data objects for a database
data types
data types  Write a short note on data types of Java.   Please visit the following link: Java datatypes
Data Generator
Data Generator Data Generator is free open source script that is designed to create the application, which can be used to generate a large sum of data... JavaScript, PHP and MySQL. Characteristics Data generator is browser
Java Xml Data Store
Java Xml Data Store  I have to do this project and i'm finding it so... she passes it on to. When making follow up calls she needs to be able to list... be followed up and/or purchased. You will need to store the data in a local binary
no data in db
no data in db  Using the example in "Networking/web-services-database.shtml" managed to do everything as shown above but there is no data in the database. the result is "record inserted". where can the error
Data Retrival
Data Retrival  How to get the output With in 2 mins for more than 13 lakhs records
login data
login data   Hiiii Sir I am doing banking project on Asp.net i have... the data after login i want to show particular data for particular user means if i login i wanna see only myn data how shud i do thanxx in advance
displaying data
displaying data   how to display data from database on jsp using struts2
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data update
data update  sir, I have a table consist of huge data.I have displayed that data in table format be side of a table an edit button which will edit the entire data which is retreived .After editing the data i want to save
data fields
data fields  hi. write an application that instantiates five librarybooks objects and prompts the user for values for the data fields.then prompt the user to enter which foels the librarybooks should sort bt title,author or page
data entry
data entry  Sir,How to make the data entered in one form store in different tables in database (oracle)? I have a form with fields accno,isbn,title,author,edition,publication,price,category where publication,author,edition
Data structure
Data structure: How to sort numbers in a queue using a bubble sort method?  How to sort numbers in a queue using a bubble sort method
login data
the data after login i want to show particular data for particular user means if i login i wanna see only myn data how shud i do thanxx in advance
data type
data type  what are the date types in the java and vb.net? what is the difference between java and vb.net?   Hi Friend, java data types... vb.net data types are: Byte SByte Short UShort Integer UInteger Long ULong
script for data
script for data  how to write a simple script to display a selected data from list in flex applicatin?.   Hi Friend, Please visit the following link: Flex Application Thanks
searching the data
searching the data  respected sir , i am making the desktop application , so how can i search the data which are stored in the mysql databses through click the button and display in jtable through netbeans dynamically
changing of data...
data changing in 10 second  hi.... i have created a servlet page using a response.setheader(); method.in the parameter i have given 10 second.but once the database entry is done in the database through this servlet.database
changing of data...
changing of data...  hi.... i have created a servlet page using a response.setheader(); method.in the parameter i have given 10 second.but once the database entry is done in the database through this servlet.database
data mining
data mining  Q. Write a Java program to compute all data cuboids for the facts count and avg_income, where avg_income represents the average income for a cell. The program should take a command line parameter n representing
 

 

 

DMCA.com