• DineshNatarajan
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Hi,

 

I have a flex swf object as a static resource and have embedded in my VF Page...

 

I am calling a jsp page and retrieving xml data. Now i want to push this data into my flex swf.. how to do it?

 

I have a function like below in my flex app.

 

public function BuildTree(str:String):void{

        //code....

}

 

also i have exposed this as a externalinterface call by adding the below code

 

ExternalInterface.addCallback("BuildTree", BuildTree);

 

I can call this from a javascript in my VF page and push the xml into it... But since i am getting the xml only during execution of apex code, what should i do? below is my apex code..

 

public void GetData(){

        Http http = new Http();
        HttpRequest req = new HttpRequest();
        HttpResponse res;
        
        req.setEndpoint('www.mysite.com/sendxmldata.jsp?userId='+userName);                           
        req.setMethod('GET');
        req.setTimeOut(30000);
        req.setHeader('Cookie',cookieString);
        res = http.send(req);
        outputText = res.getBody(); 

}

 

I will fire this GetData function on click of a button in my VF Page..

 

This outputText will be a XML, i now want to push this xml into the my flex code by BuildTree function so that my flex app refreshes.... How should i do it?

 

Thanks and Regards,

Dinesh

Hi,

 

I have started developing visualforce and apex just today noon. so please excuse me,

 

I have added a visual force page and have displaed in a custom tab. But i now want to add some functions in a apex class.

 

When i go to  Name | Setup | Develop .. there are only API, COMPONENTS, CUSTOM SETTINGS, EMAIL SERVICES, PAGES, STATIC RESOURCES, REMOTE ACCESS.

 

There is no "Apex Classes" there. please tell me whether i have to enable something somewhere?

 

Thanks and Regards,

Dinesh.N

Hi,

 

I have started developing visualforce and apex just today noon. so please excuse me,

 

I have added a visual force page and have displaed in a custom tab. But i now want to add some functions in a apex class.

 

When i go to  Name | Setup | Develop .. there are only API, COMPONENTS, CUSTOM SETTINGS, EMAIL SERVICES, PAGES, STATIC RESOURCES, REMOTE ACCESS.

 

There is no "Apex Classes" there. please tell me whether i have to enable something somewhere?

 

Thanks and Regards,

Dinesh.N