Actionscript 3 :: Flex Several Httpservice On A Form?
Nov 2, 2011
I need to load a form where data load come from several mySQL table. how to load this request in the same php file or is the best way is to execute several http service to load data.
View 1 Replies
Similar Posts:
Mar 12, 2010
I am getting a FaultEvent when trying to send form fields through HTTPService that contain more than 542 chars.Initializing the HttpService:
httpServ = new HTTPService();
httpServ.method = 'POST';
httpServ.url = ENDPOINT_URL; //http://localhost:3001/ReportError.aspx[code].....
The receiving party is an ASP.NET 4 site on the same domain and port.
View 1 Replies
Aug 5, 2009
The form is in a component lauched as a popUp, form data consists in:
login:String
password:String
I thought of a few different ways, but I don't like them..in the popUp, send button triggers a function that gets the form values and stores them in an Object, then saves the Object in the model, then dispatches a CreateSessionEvent. The CreateSessionCommand execute method is called, and it send the HTTPService passing the object from the model. (but then what if the model somehow doesn't get update and I send the same request twice?) I could try to get the form data from the command execute method itself.. how can I access them though, since it is a popUp (created with PopUpManager.createPopUp(this, LoginDialog),true))
I'd love to see an example flex+rail with restful xml application by the way, know of any?
View 1 Replies
Oct 5, 2011
I have noticed two differences between spark and mx forms which are causing me some problems. It seems by default the mx forms are arranged to the label is above the form input item. In Spark they are arranged next to each other. Also the label in spark forms are bold by default.For example MX code could be
<mx:Form width="100%">
<mx:FormItem indicatorGap="0">
<s:Label text="label1"/>
[code].....
View 1 Replies
Nov 28, 2009
am sending one user object from java to flex using remote object,now i want to get each item from that array to display in text boxes...how can i do this ?
userInfo=event.result as Array;
<mx:FormItem label="FirstName" fontWeight="bold" width="325" required="true">[code].....
View 1 Replies
Jul 5, 2010
I have a Flex client making RESTful calls to a webservice using HTTPService. The server is returning JSON responses, which we would like to compress. Can Flex using HTTPService handle gzip-encoded responses? If so, what steps are required to make it work (e.g., which headers to set, how to decompress, etc.)? If not, can you suggest a simple alternative?
View 1 Replies
Oct 22, 2009
I'm trying to reuse the HTTPService object in a flex app but I'm running into a problem. In the handler for ResultEvent.RESULT I'm removing the listener, but it isn't removed. I've have to catch the asyncToken from send() and attach a new property so I know what it's supposed to do in the handler.URL...You can right-click and view source.Has anyone else run into an issue where listeners aren't removed? Should HTTPService not be reused?
View 3 Replies
Nov 10, 2009
How can I set a progress bar that may start when an HTTPService is sent and stop when the HTTPService ends?I followed code given here but encountered following error Type was not found or was not acompile-time constant: ProgressWin.Don't know whether ProgressWin.mxml is a component or module or what. I just created a new ProgressWin.mxml file and pasted the code you posted but following error popped out before
View 1 Replies
Mar 3, 2010
XML is cool in flex, but I have an annoying problem to solve, caused by what I can imagine is a feature. You see, when you have just one tag of something, it creates an object which is not an array. But when finds more than one, it puts it on an array structure.[code]I could check the format of resObj.specifictag (to check if it is has an array) and then duplicate the code (for each case). But -even if it's calling a function- I don't think it is an elegant solution.Well, I hope someone has a good idea on this matter. (I know from experience that SO has much more C++ experts than flex, but well...)The perfect thing would be that HTTPrequest handled every tag in a consistent way (using always arrays... though I'm guessing that that would also have its drawbacks).
View 3 Replies
Jan 11, 2012
I'm getting an error after 30 seconds of execution of this service
<s:HTTPService id="svcList" url="http://localhost/index.php" method="GET" result="svcList_resultHandler(event)" fault="svcList_faultHandler(event)" requestTimeout="300">
<s:request xmlns="">
<mod>module</mod>
[Code]...
View 2 Replies
Jun 2, 2009
Why are there two different HTTPService classes in Flex?thisandthisAnd the second one inherits the first one.Why couldn't there be a single class combining the two?
View 4 Replies
Jun 10, 2009
I am using an HTTPService in my Flex application. I want to load several xml files, each about 1mb in size. Sometimes I need to stop loading previous xml file and start loading a new one. If I use HTTPService.cancel(); or HTTPService.disconnect() , it increase the time to get the answer from the server.Is there a quick way to stop the previous loading in HTTPService and start new one?
View 1 Replies
Aug 28, 2004
I have a HTTPService:
<mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)">
<s:request xmlns="">
<name>{..}</name>
[code].....
View 3 Replies
Mar 2, 2010
I am trying to create an desktop app where the user selects an XML doc via a FileSystemTree. Then at the click of a button, that xml doc selected will be loaded in as the XML doc of choice. So far I have it working only if i hardcode in the path, but i need to make it so that the user can select the file dynamically.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
[code]......
View 4 Replies
Jul 14, 2009
I am creating a RSS Feed application based on a data, and I have the following:
I have an ArrayCollection that is pre-populated with data. I am sorting through the ArrayCollection, get 1 piece of data (condition), and need to connect to an RSS feed which returns me the title, and I set my ArrayCollection in correspondence to condition -> title.
public function updateArrayList(list:ArrayCollection):ArrayCollection {
trace(list);
for(var i:int = 0; i < list.length; i++) {
//Alert.show(list.getItemAt(i).condition);
[Code]....
View 1 Replies
Aug 21, 2009
I'm getting occasional ConcurrencyError faults when using HTTPService in Flex 3. I have four HTTPService objects, all configured with concurrency=single. I'm not sure though how to continue to diagnose, as I don't see in the FaultEvent what service object caused the issue, and I can't easily reproduce it on-demand.
One feature of my app is that I am also using a URLRequest to load a sound shortly after receiving a result from one of the HTTPService calls. Could this be related to the concurrency error?
The fault looks like this:
[FaultEvent fault=[RPC Fault faultString="Attempt to invoke while another call is pending. Either change concurrency options or avoid multiple calls." faultCode="ConcurrencyError" faultDetail="null"] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2]
View 1 Replies
Nov 11, 2009
I want to load data from a external XML file, using a HTTPService, and on the ResultEvent of the same HTTPService i want him to populate a ArrayCollection with the data from the XML.
I think a ArrayCollection is the ideal for this XML.
XML
<?xml version="1.0" encoding="utf-8"?>
<PhotoGalleryData>
<Photo>
[Code].....
View 2 Replies
Nov 17, 2009
I am developing an AIR application with Flex Builder that requires me to make two HTTPService requests at the same time. They both use different instances of the HTTPService AS3 class. Both services are calling a RESTful API which is currently running on my localhost (XAMPP) and takes a few seconds to respond (much quicker on live server). The problem is that most of the time one of the calls fails, however occasionally they do both work. Its also random as to which call will fail. Both calls use code something like this. This code is basically repeated in two classes.
[Code]....
View 3 Replies
Nov 23, 2009
I am new to Flex (FLex Builder 3.0), and I'm creating a simple application that would basically just authenticate to the Freshbooks API (www.freshbooks.com) via HTTPS. without sending anything else.
[Code]...
How do I code it such that the username (the authentication token given by freshbooks) would be sent to the server from within Flex itself and not the browser? My expected outcome is that there would be no pop-ups from the browser and whatever the freshbooks server returned would be displayed in the text area (txtArea1).
Note: If I input the authentication token to the browser pop-up, the application is able to correctly display the output to the text area.
View 2 Replies
Jan 4, 2010
I receive from the httpservice with a certain frequency a string like this:1#3#234525234whererow#column#valueI want to display into datagrid the above string at real time; at the moment my code displays the whole string, composed by many strings like the one above.How can i solve the problem?I have the following code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns="*" creationComplete="srv.send()" >
[code]....
View 1 Replies
Apr 21, 2010
I'm having a problem refreshing an xml file. I am bringing it in through an HTTP service component and putting it into a bindable array _cattArr, that I am using as the dataprovider for a grid.When someone adds an item to the datagrid, it saves to the same xml file. Then I close the window, reopen it and don't see the item that has been added.It is writing to the xml file, because when I restart the flex app, the item has been added, it's just not refreshing it. I have tried to resend the httpservice, but still no luck. What is the correct process for doing this?
View 3 Replies
May 8, 2010
I have an HTTPservice[code]...
I plan to add other variables to the output time, so need to access each time and worked separately. I may also need to return multiple responses each with their own worked and time values. How do I do that. I was thinking to not use XML. Is there a more lightweight option. Flex shows I have the following options: array e4x flashvars object text xml
View 2 Replies
May 10, 2010
HTTPService has a property resultFormat which can be set to any of the following: array e4x flashvars object text xml .I looked at the documentation to understand the difference, but still couldn't understand when to use each. I'm looking for the lightest weight of all of them.
P.S. I'm consuming output from my own server, so can change the output format as needed to make it compatible with each.
View 1 Replies
May 15, 2011
my flex application sends a few concurent requests on startup. Sometimes it takes a lot of time to fetch them all so I've set them requestTimeout param to 5 secs. Additionally, I've defined a method that handles fault events. I'd like to resend a request when timeout occurs.It doesn't work though. Could you take a look at the code?
protected function fatalErrorOccuredInfo(event:FaultEvent):void
{
// get the operation
[code].....
View 2 Replies
Jun 27, 2011
So I have been trying to load data from an XML file into a datagrid. The project is in Cairngorm framework. The XML file is in the web content folder. I have a HTTPService call in the Services folder.
[Code]...
When I make a selection in one dataGrid it is supposed to populate another dataGrid with the data in the XML file. Below is the Classes datagrid. When i click on a class it is supposed to populate the next data grid.
[Code]...
View 1 Replies
Aug 10, 2011
I build an application that need httpservice feature. This application will be deployed at some computer. So, I don't have an idea to set variable at url property.
<mx:HTTPService id="personRequest" url="[URL]" useProxy="false" method="GET" resultFormat="text" result="personJSON(event)">
<mx:request xmlns="">
<getPerson>"true"</getPerson>
</mx:request>
</mx:HTTPService>
I already try with block {}, but no use. Can't I set a variable at property url mx:HTTPService?
View 1 Replies
Sep 9, 2011
how to download a pdf file with HTTPService?
I do that
private function downloadPDF():void
{
var httpService:HTTPService = new HTTPService();
httpService.url = "http://coenraets.org/flexandroid90/FlexAndroid90Minutes.pdf";
[Code]....
View 2 Replies
Feb 21, 2009
Can i use multiple HTTPService in one flex application? I have tried the following but it can have only one creationComplete= " " Is their any work around?
[Code]...
View 1 Replies
Aug 2, 2009
Flex3 + Cairngorm. I have my service in Servicis.mxml:
<mx:HTTPService id="docIndex" url="{URL_PREFIX}/jobs/{???}/docs" resultFormat="e4x"/>
And I call it from my generic restful delegate like this:
public function index(params:Object):void {
var call:AsyncToken = services.getHTTPService(resourceName+"Index").send(params);
call.addResponder(responder);
}
I want to know how I can use the params Object I pass inside the url definition (the ??? above).
EDIT: I'll explain myself if you didn't understand my problem: I have a restful api written in rails to which I'm connecting. Doc is a child resource of Job. If I want to get all docs I have to supply a job_id too. Therefore in the service the url must be changed for each .send() call, with the proper job_id (the ??? part above). I'd like to call it like myDelegate.index({job_id:34}) and insert that job_id field in the Service URL.
View 1 Replies
Aug 25, 2009
How do I determine if the HttpService instance timed out?
View 3 Replies