You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Oleg Konovalov <ol...@gmail.com> on 2015/06/09 16:16:11 UTC

Adding JS graph to Flex project

Hi,

We have Flex + Java Web App.
Needed to add Graphs to it, kind of a network of nodes, built from data
coming from DB. Tried Birdeye Ravis, were not happy with it.
So now we want to try using one of JS visual libs like VisJS or D3,
possibly try to add AngularJS if it becomes necessary, which I doubt.
Can I add such graph to Flex TabNavigator, inside NavigatorContent?

Also where should I put JS code inside FlashBuilder project? Any pointers?

Any good Eclipse 3.8 JS plugins?

TIA,
Oleg

Re: Adding JS graph to Flex project

Posted by "pkumar.flex" <pr...@gmail.com>.
Check for Flex Charts library, this contains almost all types of chart. You
can also customized these as per your requirements.

On Tue, Jun 9, 2015 at 11:34 PM, olegkon [via Apache Flex Users] <
ml-node+s2333346n10537h32@n4.nabble.com> wrote:

> ---------- Forwarded message ----------
> From: "Oleg Konovalov" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=10537&i=0>>
> Date: Jun 9, 2015 10:16 AM
> Subject: Adding JS graph to Flex project
> To: <[hidden email] <http:///user/SendEmail.jtp?type=node&node=10537&i=1>>
>
> Cc:
>
> Hi,
>
> We have Flex + Java Web App.
> Needed to add Graphs to it, kind of a network of nodes, built from data
> coming from DB. Tried Birdeye Ravis, were not happy with it.
> So now we want to try using one of JS visual libs like VisJS or D3,
> possibly try to add AngularJS if it becomes necessary, which I doubt.
> Can I add such graph to Flex TabNavigator, inside NavigatorContent?
>
> Also where should I put JS code inside FlashBuilder project? Any pointers?
>
> Any good Eclipse 3.8 JS plugins?
>
> TIA,
> Oleg
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537.html
>  To unsubscribe from Apache Flex Users, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
*Regards,*
Prashant Kumar* | *Mob.: +91 8408811225




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10538.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
Update: please disregard #1:
- my JS was failing in the middle without errors, so I was getting NULL
back - did not reach the end. That is fixed.

On Fri, Jun 19, 2015 at 2:43 PM, olegkon [via Apache Flex Users] <
ml-node+s2333346n10629h18@n4.nabble.com> wrote:

> I got a workaround, so I no longer need to convert in JSON object within
> object.
>
> Still have a few related problems:
> 1) So I call
> var retObj:Object = ExternalInterface.call("drawGraph", jsonStr, 2);
> in JS drawGraph() returns a string:
> return "someResult";
>
> But for some reason I am getting retObj=null;   Any idea why?
> I would like to display that drawn graph in iFrame:
> <flexiframe:IFrame id="iFrameBySource"
>                         width="100%" height="100%"
>                         source="js/webpage.html"/>
> So if not null, I would like to refresh that HTML page to show the graph.
>    How?
>
>
> 2) As I said, in FB4.5.1 I try to use Flex4.6 for native JSON,
> but debugger still can't find any Flex source code.  How to make that
> work?
>
>
> 3) in JSON conversion I do:  var jsonStr:String = JSON.stringify(resArray,
> deflate);
> in deflate I do:
> return( key == "constvalue" ||
>         key == "children" ||  ... // no children (dependencies).
>         ) ? undefined : value;
> It works on exclusion - these params will be excluded, so I only convert
> useful columns to JSON,
> but in my case it would be much more efficient to include, not exclude.
> Tried to reverse that return to:
> return( key == "goodparam1" ||
>         key == "goodparam2" ||  ... // no children (dependencies).
>         ) ? value : undefined;   but if fails, for some reason getting
> first "" or null's.
> I do not have any null objects in resultset array.
> Any idea how to resolve that?
>
> Hope I am not overloading that post with 3 problems.
> :-)
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10629.html
>  To unsubscribe from Fwd: Adding JS graph to Flex project, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=10537&code=b2xlZ2tvbkBnbWFpbC5jb218MTA1Mzd8MTE5NTIxMzcyOA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Thank you,
Oleg.




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10632.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
I got a workaround, so I no longer need to convert in JSON object within
object.

Still have a few related problems:
1) So I call 
var retObj:Object = ExternalInterface.call("drawGraph", jsonStr, 2);
in JS drawGraph() returns a string: 
return "someResult";

But for some reason I am getting retObj=null;   Any idea why?
I would like to display that drawn graph in iFrame:
<flexiframe:IFrame id="iFrameBySource"
			width="100%" height="100%"
			source="js/webpage.html"/>
So if not null, I would like to refresh that HTML page to show the graph.   
How?


2) As I said, in FB4.5.1 I try to use Flex4.6 for native JSON,
but debugger still can't find any Flex source code.  How to make that work?


3) in JSON conversion I do:  var jsonStr:String = JSON.stringify(resArray,
deflate);
in deflate I do:
return( key == "constvalue" ||	
	key == "children" ||  ...	// no children (dependencies). 
	) ? undefined : value;
It works on exclusion - these params will be excluded, so I only convert
useful columns to JSON,
but in my case it would be much more efficient to include, not exclude.
Tried to reverse that return to:
return( key == "goodparam1" ||	
	key == "goodparam2" ||  ...	// no children (dependencies). 
	) ? value : undefined;   but if fails, for some reason getting first "" or
null's.
I do not have any null objects in resultset array.
Any idea how to resolve that?

Hope I am not overloading that post with 3 problems.   
:-)





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10629.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Maybe I am not getting what problems you are facing, but what you want is
still possible without any special serialization.  In case you are testing
in Chrome, it might not work because of its sandbox restrictions.  Try this
in IE or Firefox and let me know what happens.

Everything gets sent as an Object to the JavaScript function.  You just
need to know the structure of the object and parse it in JS.

AS:
protected function application1_initializeHandler(event:FlexEvent):void
{
var employees:Array = [
{ firstName:"Joe", lastName:"Doe", age:25, isFullTime:true},
{ firstName:"Ann", lastName:"Cavanah", age:28, isFullTime:false}
];
var ac:ArrayCollection = new ArrayCollection(employees);
 var payload:Array = [
{firstName:"Om", lastName:"Muppirala", children:ac},
{firstName:"Om", lastName:"Muppirala", children:ac},
{firstName:"Om", lastName:"Muppirala", children:ac}
];
 ExternalInterface.call("passDataToJS", payload);
}

JS:

            function passDataToJS(obj)
            {
            for(var i in obj)
            {
            var children = obj[i].children;
            for(var j in children.source)
            {
             console.log(children.source[j].firstName + ", " +
children.source[j].lastName + ", " + children.source[j].age);
             if(children.source[j].isFullTime)
             {
             console.log("Employee is fulltime");
             }
             else
             {
             console.log("Employee is not fulltime");
             }
            }

            }
            }

Console output:

Joe, Doe, 25
Employee is fulltime
Ann, Cavanah, 28
Employee is not fulltime
Joe, Doe, 25
Employee is fulltime
Ann, Cavanah, 28
Employee is not fulltime
Joe, Doe, 25
Employee is fulltime
Ann, Cavanah, 28
Employee is not fulltime

Thanks,
Om

On Tue, Jun 16, 2015 at 11:22 AM, olegkon <ol...@gmail.com> wrote:

> But remember, what I need to pass to JS is an Array of those value objects
> (each of which has a bunch of String's as well as that
> children:ArrayCollection) ?
>
> myArray = [ {firstName:"John", lastName:"Doe", children:ArrayCollection},
> ... ]
>
> And yes, I tried that originally - to pass that array to ExternalInterface
> -
> nothing happened.
>
> And even if I did JSON.stringify as String or Object - did not work
> until I removed AC from there.
>
> I guess, I need to use replacer function - somehow pass children.source,
> just not sure about serializers, etc.
>
> Please advise.
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10599.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
But remember, what I need to pass to JS is an Array of those value objects 
(each of which has a bunch of String's as well as that
children:ArrayCollection) ?

myArray = [ {firstName:"John", lastName:"Doe", children:ArrayCollection},
... ]

And yes, I tried that originally - to pass that array to ExternalInterface -
nothing happened.

And even if I did JSON.stringify as String or Object - did not work 
until I removed AC from there.

I guess, I need to use replacer function - somehow pass children.source,
just not sure about serializers, etc.

Please advise.





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10599.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
I dont see the need to serialize the VO into JSON.  Simply pass the value
object to the JS function.

Thanks,
Om
On Jun 16, 2015 7:12 AM, "olegkon" <ol...@gmail.com> wrote:

> Om,
>
> What I said is that my value object Contains children:ArrayCollection,
> that is why its conversion to JSON was failing.
>
> So how do I serialize such VO to be converted to JSON and passed to JS
> function?
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10597.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
Om, 

What I said is that my value object Contains children:ArrayCollection,
that is why its conversion to JSON was failing.

So how do I serialize such VO to be converted to JSON and passed to JS
function? 



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10597.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Even if it is an ArrayCollection, it should come through on the JS side as
an Object.   No need to encode it as a string first.  You will be able to
walk through it in JS. But you will lose all type information, so you will
have to account for that in the JS code.

AS:
protected function application1_initializeHandler(event:FlexEvent):void
{
var employees:Array = [
{ firstName:"Joe", lastName:"Doe", age:25, isFullTime:true},
{ firstName:"Ann", lastName:"Cavanah", age:28, isFullTime:false}
];
var ac:ArrayCollection = new ArrayCollection(employees);
ExternalInterface.call("passDataToJS", ac);
}

JS:

function passDataToJS(obj)
{
     console.log(obj.source[i].firstName + ", " + obj.source[i].lastName +
", " + obj.source[i].age);
        if(obj.source[i].isFullTime)
        {
        console.log("Employee is fulltime");
        }
        else
        {
        console.log("Employee is not fulltime");
        }
}

Console:
Joe, Doe, 25
Employee is fulltime
Ann, Cavanah, 28
Employee is not fulltime


On Mon, Jun 15, 2015 at 2:18 PM, olegkon <ol...@gmail.com> wrote:

> Yes, that worked for me too with:
> var jsonStr:Sting = JSON.stringify(employees, null, 4);
>
> But in reality my value object is much more complex
> and includes ArrayCollection children and some boolean (so it fails to
> work).
> Is there a way to customize that conversion function to stringify
> ArrayCollection - encode it into a string?
>
> And if I try to debug it, it fails with source not found.
> How can I add a Flex 4.6 source into FB4.5.1?
>
>
> Please advise.
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10591.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

RE: Adding JS graph to Flex project

Posted by Frédéric THOMAS <we...@hotmail.com>.
> Is there a way to customize that conversion function to stringify
> ArrayCollection - encode it into a string?

Yeah, I guess you should write a custom JSONSerializer and JSONDeserializer, for ArayCollection, you can serialize the source Array instead for example.

Frédéric THOMAS


----------------------------------------
> Date: Mon, 15 Jun 2015 14:18:08 -0700
> From: olegkon@gmail.com
> To: users@flex.apache.org
> Subject: Re: Adding JS graph to Flex project
>
> Yes, that worked for me too with:
> var jsonStr:Sting = JSON.stringify(employees, null, 4);
>
> But in reality my value object is much more complex
> and includes ArrayCollection children and some boolean (so it fails to
> work).
> Is there a way to customize that conversion function to stringify
> ArrayCollection - encode it into a string?
>
> And if I try to debug it, it fails with source not found.
> How can I add a Flex 4.6 source into FB4.5.1?
>
>
> Please advise.
>
>
>
>
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10591.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
 		 	   		  

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
Yes, that worked for me too with: 
var jsonStr:Sting = JSON.stringify(employees, null, 4);

But in reality my value object is much more complex
and includes ArrayCollection children and some boolean (so it fails to
work).
Is there a way to customize that conversion function to stringify
ArrayCollection - encode it into a string?

And if I try to debug it, it fails with source not found.
How can I add a Flex 4.6 source into FB4.5.1?


Please advise.




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10591.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
This works fine for me:
AS:

protected function application1_initializeHandler(event:FlexEvent):void
{
var employees:Array = [
{ firstName:"Joe", lastName:"Doe", age:25},
{ firstName:"Ann", lastName:"Cavanah", age:28}
];
 ExternalInterface.call("passDataToJS", employees);
}

JS:
            function passDataToJS(obj)
            {
            for(var i in obj)
            {
            console.log(obj[i].firstName + ", " + obj[i].lastName + ", " +
obj[i].age);
            }
            }

In the console:
Joe, Doe, 25
Ann, Cavanah, 28




On Mon, Jun 15, 2015 at 12:16 PM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> On Mon, Jun 15, 2015 at 8:48 AM, olegkon <ol...@gmail.com> wrote:
>
>> Let me give you a simplified version of what I tried.
>> Suppose I have an array of Employee objects.
>>
>> class Employee {
>>   firstName:String;
>>   lastName:String;
>>   age:Number;
>> }
>>
>> var employees:Array = [
>> { firstName:"Joe", lastName:"Doe", age:25},
>> { firstName:"Ann", lastName:"Cavanah", age:28}
>> ];
>>
>> var empStr:String = JSON.stringify(employees);
>> ExtrnalInterface.call("passDataToJS", empStr);
>>
>> I am new to JSON, so not sure I am converting it right.
>>
>>
> Thanks for the code.  How is the javascript function looking?
>
> Om
>
>
>>
>>
>> --
>> View this message in context:
>> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10585.html
>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>
>

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Mon, Jun 15, 2015 at 8:48 AM, olegkon <ol...@gmail.com> wrote:

> Let me give you a simplified version of what I tried.
> Suppose I have an array of Employee objects.
>
> class Employee {
>   firstName:String;
>   lastName:String;
>   age:Number;
> }
>
> var employees:Array = [
> { firstName:"Joe", lastName:"Doe", age:25},
> { firstName:"Ann", lastName:"Cavanah", age:28}
> ];
>
> var empStr:String = JSON.stringify(employees);
> ExtrnalInterface.call("passDataToJS", empStr);
>
> I am new to JSON, so not sure I am converting it right.
>
>
Thanks for the code.  How is the javascript function looking?

Om


>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10585.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Adding JS graph to Flex project

Posted by Alain Ekambi <ja...@gmail.com>.
Best way to do that is to use fabridge. This is how we were able to expose
the flash/flex api to JavaScript/GWT
On 15 Jun 2015 18:09, "olegkon" <ol...@gmail.com> wrote:

> Let me give you a simplified version of what I tried.
> Suppose I have an array of Employee objects.
>
> class Employee {
>   firstName:String;
>   lastName:String;
>   age:Number;
> }
>
> var employees:Array = [
> { firstName:"Joe", lastName:"Doe", age:25},
> { firstName:"Ann", lastName:"Cavanah", age:28}
> ];
>
> var empStr:String = JSON.stringify(employees);
> ExtrnalInterface.call("passDataToJS", empStr);
>
> I am new to JSON, so not sure I am converting it right.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10585.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
Let me give you a simplified version of what I tried.
Suppose I have an array of Employee objects.

class Employee {
  firstName:String;
  lastName:String;
  age:Number;
}

var employees:Array = [
{ firstName:"Joe", lastName:"Doe", age:25},
{ firstName:"Ann", lastName:"Cavanah", age:28}
];

var empStr:String = JSON.stringify(employees);
ExtrnalInterface.call("passDataToJS", empStr);

I am new to JSON, so not sure I am converting it right.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10585.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
If you post simple code example where you can reproduce this issue, we
could try to debug it.

Thanks,
Om

On Sun, Jun 14, 2015 at 9:54 AM, olegkon <ol...@gmail.com> wrote:

> I have tried to work with methods of JSON class in Flex 4.6 (passing array
> of DTOs to them),
> but that did not work, could not even see the result in FB debugger (using
> FB4.5.1 - maybe that is not supposed to wotk, must use FB4.7?).
> I have seen some postings on the net and Adobe Flex 4.6 docs,
> but did not find about processing such array.
>
> Please advise.
>
>
> On Fri, Jun 12, 2015 at 5:12 PM, OmPrakash Muppirala [via Apache Flex
> Users] <ml...@n4.nabble.com> wrote:
>
> > On Jun 12, 2015 2:02 PM, "olegkon" <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=10580&i=0>> wrote:
> > >
> > > I am trying to pass array of custom AS objects [DTOs] to JavaScript
> > using
> > > ExternalInterface (in Flex 4.6).
> > > Documentation seems pretty convoluted.
> > >
> > > Does anyone know how to do it?  Any samples?
> >
> > What have you tried so far?  It should be pretty straight forward.
> >
> > Thanks,
> > Om
> >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> >
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10579.html
> > > Sent from the Apache Flex Users mailing list archive at Nabble.com.
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10580.html
> >  To unsubscribe from Fwd: Adding JS graph to Flex project, click here
> > <
> http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=10537&code=b2xlZ2tvbkBnbWFpbC5jb218MTA1Mzd8MTE5NTIxMzcyOA==
> >
> > .
> > NAML
> > <
> http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
> --
> Thank you,
> Oleg.
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10581.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
I have tried to work with methods of JSON class in Flex 4.6 (passing array
of DTOs to them),
but that did not work, could not even see the result in FB debugger (using
FB4.5.1 - maybe that is not supposed to wotk, must use FB4.7?).
I have seen some postings on the net and Adobe Flex 4.6 docs,
but did not find about processing such array.

Please advise.


On Fri, Jun 12, 2015 at 5:12 PM, OmPrakash Muppirala [via Apache Flex
Users] <ml...@n4.nabble.com> wrote:

> On Jun 12, 2015 2:02 PM, "olegkon" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=10580&i=0>> wrote:
> >
> > I am trying to pass array of custom AS objects [DTOs] to JavaScript
> using
> > ExternalInterface (in Flex 4.6).
> > Documentation seems pretty convoluted.
> >
> > Does anyone know how to do it?  Any samples?
>
> What have you tried so far?  It should be pretty straight forward.
>
> Thanks,
> Om
>
> >
> >
> >
> >
> > --
> > View this message in context:
>
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10579.html
> > Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10580.html
>  To unsubscribe from Fwd: Adding JS graph to Flex project, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=10537&code=b2xlZ2tvbkBnbWFpbC5jb218MTA1Mzd8MTE5NTIxMzcyOA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
Thank you,
Oleg.




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10581.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Jun 12, 2015 2:02 PM, "olegkon" <ol...@gmail.com> wrote:
>
> I am trying to pass array of custom AS objects [DTOs] to JavaScript using
> ExternalInterface (in Flex 4.6).
> Documentation seems pretty convoluted.
>
> Does anyone know how to do it?  Any samples?

What have you tried so far?  It should be pretty straight forward.

Thanks,
Om

>
>
>
>
> --
> View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10579.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
I am trying to pass array of custom AS objects [DTOs] to JavaScript using
ExternalInterface (in Flex 4.6).
Documentation seems pretty convoluted.

Does anyone know how to do it?  Any samples?




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10579.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
My mistake:  was trying to read HTML (and JS) file from file system... 
Fixed!...





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10570.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
It seems all JavaScript which is in that HTML page embedded via IFrame (at
least as external files) is not able to execute.   Is there some trick there
to enable it?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10566.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Wed, Jun 10, 2015 at 12:47 PM, olegkon <ol...@gmail.com> wrote:

> Hi,
>
> We have only selection of a handful of Flex libraries to use in our
> company,
> so can't use (without a lot of hassle) Elixir or HtmlFrame. :-(
>
> But we do have iFrame inhouse.
> I was able to show HTML page using iFrame in a Panel, which is inside
> NavigationContext.
>
> But can I have JavaScript code with libraries in some src subdirectory (so
> it won't damage Flex FB project) ?
>

Yes, that should not be a problem.


> And can I communicate with that JS from Flex (via ExternalInterface,
> FABridge or flashVars),
> passing data back and forth ?
>

Yes, you should be able to do that via ExternalInterface.

Thanks,
Om


> Please advise.
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10558.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Adding JS graph to Flex project

Posted by olegkon <ol...@gmail.com>.
Hi,

We have only selection of a handful of Flex libraries to use in our company,
so can't use (without a lot of hassle) Elixir or HtmlFrame. :-(

But we do have iFrame inhouse.
I was able to show HTML page using iFrame in a Panel, which is inside
NavigationContext.

But can I have JavaScript code with libraries in some src subdirectory (so
it won't damage Flex FB project) ?
And can I communicate with that JS from Flex (via ExternalInterface,
FABridge or flashVars),
passing data back and forth ?

Please advise.




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Fwd-Adding-JS-graph-to-Flex-project-tp10537p10558.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Adding JS graph to Flex project

Posted by Alex Harui <ah...@adobe.com>.
Are you trying to display HTML/JS inside a Flex app?  I’m not sure there
is a well-defined way to do that in FB.

On 6/9/15, 11:22 AM, "Oleg Konovalov" <ol...@gmail.com> wrote:

>---------- Forwarded message ----------
>From: "Oleg Konovalov" <ol...@gmail.com>
>Date: Jun 9, 2015 10:16 AM
>Subject: Adding JS graph to Flex project
>To: <de...@flex.apache.org>
>Cc:
>
>Hi,
>
>We have Flex + Java Web App.
>Needed to add Graphs to it, kind of a network of nodes, built from data
>coming from DB. Tried Birdeye Ravis, were not happy with it.
>So now we want to try using one of JS visual libs like VisJS or D3,
>possibly try to add AngularJS if it becomes necessary, which I doubt.
>Can I add such graph to Flex TabNavigator, inside NavigatorContent?
>
>Also where should I put JS code inside FlashBuilder project? Any pointers?
>
>Any good Eclipse 3.8 JS plugins?
>
>TIA,
>Oleg


Re: Adding JS graph to Flex project

Posted by OmPrakash Muppirala <bi...@gmail.com>.
RogeWave Elixir (formerly ILOG Elixir) has worked well for me in the past
for such visualizations:

http://www.roguewave.com/products-services/visualization/elixir/demos/diagram-apps/network-monitoring

If you must go the route of embedding JS graphs in a Flex app, you might
want to look at this component:
http://www.ardisialabs.com/flex-components/htmlFrame

Thanks,
Om

On Tue, Jun 9, 2015 at 11:22 AM, Oleg Konovalov <ol...@gmail.com> wrote:

> ---------- Forwarded message ----------
> From: "Oleg Konovalov" <ol...@gmail.com>
> Date: Jun 9, 2015 10:16 AM
> Subject: Adding JS graph to Flex project
> To: <de...@flex.apache.org>
> Cc:
>
> Hi,
>
> We have Flex + Java Web App.
> Needed to add Graphs to it, kind of a network of nodes, built from data
> coming from DB. Tried Birdeye Ravis, were not happy with it.
> So now we want to try using one of JS visual libs like VisJS or D3,
> possibly try to add AngularJS if it becomes necessary, which I doubt.
> Can I add such graph to Flex TabNavigator, inside NavigatorContent?
>
> Also where should I put JS code inside FlashBuilder project? Any pointers?
>
> Any good Eclipse 3.8 JS plugins?
>
> TIA,
> Oleg
>

Fwd: Adding JS graph to Flex project

Posted by Oleg Konovalov <ol...@gmail.com>.
---------- Forwarded message ----------
From: "Oleg Konovalov" <ol...@gmail.com>
Date: Jun 9, 2015 10:16 AM
Subject: Adding JS graph to Flex project
To: <de...@flex.apache.org>
Cc:

Hi,

We have Flex + Java Web App.
Needed to add Graphs to it, kind of a network of nodes, built from data
coming from DB. Tried Birdeye Ravis, were not happy with it.
So now we want to try using one of JS visual libs like VisJS or D3,
possibly try to add AngularJS if it becomes necessary, which I doubt.
Can I add such graph to Flex TabNavigator, inside NavigatorContent?

Also where should I put JS code inside FlashBuilder project? Any pointers?

Any good Eclipse 3.8 JS plugins?

TIA,
Oleg