You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2019/01/23 17:40:59 UTC

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Alex,

I'm in a similar need than Ulrich to pass some vars in a "flashvars"
object(to avoid be seen in the url) to our Jewel App.
So I'm reading this thread and taking into account that I use the bead
(ApplicationParamenterBead), I still can't figure a few things:

1.-  I have this in my html template:

<body>
${body}
</body>

After compilation this generates:

<body>
   <script type="text/javascript">
      new App().start();
   </script>

</body>


But it should be something like this:

<body>

       <script type="text/javascript">

              *var flashvars = {};*

*              flashvars.ntuser = "Something";*

              new App().start(*flashvars*);

       </script>

</body>

in other words, what I really need is compiler can generate this line:

new App().start(*flashvars*);

since this other lines:

*var flashvars = {};*

*              flashvars.ntuser = "Something";*

Can be written in other part of the template without problem.

Note that I'm not using mx:Application, so I need to use this with
j:Application

thanks


El lun., 29 oct. 2018 a las 8:35, <ul...@carnet-gmbh.de> escribió:

> Hello Alex,
>
>
>
> I can confirm it’s working. Thank you!
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Freitag, 26. Oktober 2018 18:10
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> While Flex supported two component sets (MX and Spark) and they were more
> or less interoperable, Royale supports multiple component sets.  There is
> the Basic set, there is Express, Jewel, and the Emulation Components.  Like
> Flex, each component set has a different XML namespace.
>
>
>
> The changes I made last night were to the Application in the MX Emulation
> Components.  So you would need to get the latest nightly build, and your
> application should look something like:
>
>
>
> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>
>                    xmlns:local="*"
>
>                    xmlns:js="library://ns.apache.org/royale/basic"
>
>                    xmlns:mx="library://ns.apache.org/royale/mx"
>
>                    applicationComplete="complete()"
>
>                    >
>
>
>
> And you won’t need to specify a valuesImpl, the MX Application will take
> care of that.  The emulation components are designed to reduce the amount
> of code changes required to migrate a Flex application to Royale.  The
> Basic components and other components sets are not guaranteed to be
> interoperable with other sets.  Basic’s main goal is to produce the
> smallest, fastest application, but it requires more time to assemble
> exactly the pieces you need.  Express is designed to make it faster to
> build a Basic application but you will pay for some overhead.  Jewel is a
> new look-and-feel and introduces some new UI widgets that didn’t exist in
> Flex.
>
>
>
> Regarding supporting Royale, we are looking for folks like you who want to
> use it and will hopefully contribute to it.  Apache open source projects
> are volunteer-driven.  There is no company like Adobe driving it.  We hope
> that users like yourself will help by, at minimum, using the code and
> providing feedback, but also by providing patches/pull-requests with fixes
> and improvements.  Folks who contribute a series of good patches are
> granted write-access to the repo and then the project and its community
> grows stronger and faster.  So, we hope you will choose to use Apache
> Royale and will help find and fix bugs in the process of getting your
> application to run on Royale.  You can also hire people to help you migrate
> your code and find and fix bugs.  I think there are at least a couple of
> folks who might have extra cycles to help.
>
>
>
> Thanks,
>
> -Alex
>
>
>
>
>
> *From: *"ulrich.mueller@carnet-gmbh.de" <ul...@carnet-gmbh.de>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, October 26, 2018 at 5:29 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hello Alex,
>
>
>
> thanks for the work.
>
>
>
> For testing I have created a most simple app:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>
>                    xmlns:local="*"
>
>                    xmlns:js="library://ns.apache.org/royale/basic"
>
>                    applicationComplete="complete()"
>
>                    >
>
>
>
>     <fx:Script>
>
>         <![CDATA[
>
>             protected function complete():void{
>
>                 var foo:String = "test1234";
>
>             }  // breakpoint
>
>         ]]>
>
>     </fx:Script>
>
>
>
>     <js:valuesImpl>
>
>         <js:SimpleCSSValuesImpl />
>
>     </js:valuesImpl>
>
> </js:Application>
>
>
>
>
>
> In index.html I have put after compiling:
>
>
>
> <body>
>
>        <script type="text/javascript">
>
>               var flashvars = {};
>
>               flashvars.ntuser = "Ulrich";
>
>               new TestApp().start(flashvars);
>
>        </script>
>
> </body>
>
>
>
> During debugging (now working 😊 thx ) I could not see ntuser, parameters
> or something. Most likely it did not work as you said it was meant for
> emulation. We have no problem to redevelop some critical parts of the
> applications so here we can stick to native Royale.
>
>
>
> Anyway how can we support the development of Apache Royale in general?
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7Cdd655015fee0465a182e08d63b3ea686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761537629350393&sdata=F9qYKdehWi1z2%2B%2BbbHlRX7ZUhth61yTMbxX50hj1h54%3D&reserved=0>
>
>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Freitag, 26. Oktober 2018 08:41
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> I think I understand your workflow.  Since you are generating your own
> html file, you can make it pass the flashvars to the Application.  I just
> pushed a change to make the Application’s parameters writable and allow you
> to pass parameters in through the SystemManager.
>
>
>
> Currently, the body of the html of a Royale app using the emulation
> components looks something like:
>
>
>
> <body>
>
>                 <script type="text/javascript">
>
>                                 new
> MyApp_mx_managers_SystemManager().start();
>
>                 </script>
>
> </body>
>
>
>
> If your JSP generates a variable called flashvars, then you can pass it
> into the “start” method.
>
>
>
> <body>
>
>                 <script type="text/javascript">
>
>                                 new
> MyApp_mx_managers_SystemManager().start(flashvars);
>
>                 </script>
>
> </body>
>
>
>
> There might be a few other bugs to work out once you get to the point of
> actually trying this code.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *"ulrich.mueller@carnet-gmbh.de" <ul...@carnet-gmbh.de>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, October 25, 2018 at 10:26 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hello,
>
>
>
> the current workflow for some applications for our customers:
>
>
>
>
>
> https://some-tomcat.local/blazeds/App/App.jsp
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7Cdd655015fee0465a182e08d63b3ea686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761537629350393&sdata=YDbfBn3%2Fbt%2BbSOkhjKkQFewQRabd4M3weUOyEvmr2y4%3D&reserved=0>
>
>
>
> ·       The .jsp file is practically the .html template (from Flash
> Builder)
>
> ·       We employ flashvars to configure the applications without using
> URL parameters that can be seen by users
>
> ·       The Tomcat is used to call Waffle to find out the current Windows
> Domain User (https://github.com/Waffle/waffle
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7Cdd655015fee0465a182e08d63b3ea686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761537629350393&sdata=QGmO23TvvzLG4VJPDSDMoBsc2I2V5sLSIp6XbAh7HYc%3D&reserved=0>
> )
>
> ·       The user information is passed to the SWF
>
>
>
> <script type="text/javascript">
>
>             // For version detection, set to min. required Flash Player
> version, or 0 (or 0.0.0), for no version detection.
>
>             var swfVersionStr = "11.1.0";
>
>             // To use express install, set to playerProductInstall.swf,
> otherwise the empty string.
>
>             var xiSwfUrlStr = "playerProductInstall.swf";
>
>             var flashvars = {};
>
>
>
> *            flashvars.user = '<%=request.getAttribute("ntuser")%>';  //
> created by Waffle filter and some processing*
>
>
>
>             var params = {};
>
>             params.quality = "high";
>
>             params.bgcolor = "#ffffff";
>
>             params.allowscriptaccess = "sameDomain";
>
>             params.allowfullscreen = "true";
>
>             var attributes = {};
>
>             attributes.id = "MyApp";
>
>             attributes.name = "MyApp";
>
>             attributes.align = "middle";
>
>             swfobject.embedSWF(
>
>                 "MyApp.swf", "flashContent",
>
>                 "100%", "100%",
>
>                 swfVersionStr, xiSwfUrlStr,
>
>                 *flashvars*, params, attributes);
>
>             // JavaScript enabled so display the flashContent div in case
> it is not replaced with a swf object.
>
>             swfobject.createCSS("#flashContent",
> "display:block;text-align:left;");
>
> </script>
>
>
>
>
>
> App.mxml
>
>
>
> var user:String = FlexGlobals.topLevelApplication.parameters.*user* as
> String;
>
> // Show user specific data …
>
>
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7Cdd655015fee0465a182e08d63b3ea686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761537629350393&sdata=F9qYKdehWi1z2%2B%2BbbHlRX7ZUhth61yTMbxX50hj1h54%3D&reserved=0>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Donnerstag, 25. Oktober 2018 19:47
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Those beads or their equivalent are baked in to the emulation components.
>
>
>
> FlexGlobals.topLevelApplication.parameters exists in the emulation
> components.  It may not be wired up correctly yet, but if not, it will be.
> However, it will be wired by default to the URL parameters for the hosting
> webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting
> web page has set up your flashvars to be different from the URL parameters
> then you may tweak some code in the hosting web page.  If this is the case,
> can you share more about how you determine your flashvars?  I couldn’t
> quite get it from the snippets you provided.  It wasn’t clear if the JSP
> was putting the flashvars into a global or local variable and when it got
> passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe
> we’ll make it so the parameters first look for a global flashvars variable
> or something like that.
>
>
>
> Let us know,
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, October 25, 2018 at 9:46 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> please check ApplicationParametersBead and
>
> ApplicationParametersCaseInsensitiveBead
>
>
>
> and
>
> https://github.com/apache/royale-asjs/issues/129
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7Cdd655015fee0465a182e08d63b3ea686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761537629350393&sdata=SfHt64e7yUCeQy1MicilbRVHRkxgB2y8f%2BboJvffqNY%3D&reserved=0>
>
>
>
> I still didn't use it so others could hopefully give more detail
>
>
>
> Best
>
>
>
> Carlos
>
>
>
>
>
>
>
>
>
> El jue., 25 oct. 2018 a las 17:36, <ul...@carnet-gmbh.de>
> escribió:
>
> Hello,
>
>
>
> first of all: Many thanks to all contributers of Apache Royale. It looks
> very promising.  Thanks.
>
>
>
> We have a large set of customer specific Flex applications targeted to
> Flash output. We are currently evaluating if we can use Royale/JS to
> replace them without must redevelopment.
>
>
>
> Is there an infrastructure to use
> FlexGlobals.topLevelApplication.parameters and the flashvar within the
> template? We have some variables filled there (by an Tomcat Server via an
> JSP page).
>
>
>
>
>
> App.jsp
>
>
>
> var flashvars = {};
>
> flashvars.myvar= '<%=request.getAttribute("someindex")%>';
>
>
>
>
>
> App.mxml
>
>
>
> var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as
> String;
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
>
>
>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cdd655015fee0465a182e08d63b3ea686%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761537629350393&sdata=8xpVe2dlOLkWxJf5%2Fmc3LNdUdMOkT4Sen%2F9q5a1bfgI%3D&reserved=0>
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Harbs <ha...@gmail.com>.
You don’t pass parameters into start.

The parameters are inferred from the location.

You can add to the parameters like this:

var myApp = new App();
myApp.parameters.foo = “baz”;
//etc.
myApp.start();

Harbs

> On Jan 23, 2019, at 8:53 PM, Carlos Rovira <ca...@apache.org> wrote:
> 
> So I don't understand this part...I check start() method in Application classes in Basic, Jewel and MX and the signature doesn't allow params, so how Ulrich and other can pass a param if the method doesn't allow it? how this can work?
> Or should I modify start to allow params at least in Jewel?
> 
> El mié., 23 ene. 2019 a las 19:32, Alex Harui (<aharui@adobe.com <ma...@adobe.com>>) escribió:
> The parameters for start() depend on the Application class.  I don’t think we’ve required a particular parameter list.
> 
>  
> 
> -Alex
> 
>  
> 
> From: Carlos Rovira <carlosrovira@apache.org <ma...@apache.org>>
> Reply-To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Date: Wednesday, January 23, 2019 at 10:06 AM
> To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Oh, that's right...didn't see the solution can be so easy :)
> 
>  
> 
> I understand that start() accept parameters right?
> 
>  
> 
> thanks! :)
> 
>  
> 
> Carlos
> 
>  
> 
>  
> 
>  
> 
> El mié., 23 ene. 2019 a las 18:45, Alex Harui (<aharui@adobe.com <ma...@adobe.com>>) escribió:
> 
> The compiler can’t know to generate that.  The compiler has no idea what the html that kicks off the app should look like.  So instead of $body, put in what you need.
> 
>  
> 
> -Alex
> 
>  
> 
> From: Carlos Rovira <carlosrovira@apache.org <ma...@apache.org>>
> Reply-To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Date: Wednesday, January 23, 2019 at 9:41 AM
> To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Hi Alex,
> 
>  
> 
> I'm in a similar need than Ulrich to pass some vars in a "flashvars" object(to avoid be seen in the url) to our Jewel App.
> 
> So I'm reading this thread and taking into account that I use the bead (ApplicationParamenterBead), I still can't figure a few things:
> 
>  
> 
> 1.-  I have this in my html template:
> 
>  
> 
>  
> 
> <body>
> 
>  
> 
> ${body}
> 
>  
> 
> </body>
> 
>  
> 
>  
> 
> After compilation this generates:
> 
>  
> 
> <body>
>    <script type="text/javascript">
>       new App().start();
>    </script>
> 
> </body>
>  
> 
> But it should be something like this:
> 
>  
> 
> <body>
> 
>        <script type="text/javascript">
> 
>               var flashvars = {};
> 
>               flashvars.ntuser = "Something";
> 
>               new App().start(flashvars);
> 
>        </script>
> 
> </body>
> 
>  
> 
> in other words, what I really need is compiler can generate this line:
> 
>  
> 
> new App().start(flashvars);
> 
>  
> 
> since this other lines:
> 
>  
> 
> var flashvars = {};
> 
>               flashvars.ntuser = "Something";
> 
>  
> 
> Can be written in other part of the template without problem.
> 
>  
> 
> Note that I'm not using mx:Application, so I need to use this with j:Application
> 
>  
> 
> thanks
> 
>  
> 
>  
> 
> El lun., 29 oct. 2018 a las 8:35, <ulrich.mueller@carnet-gmbh.de <ma...@carnet-gmbh.de>> escribió:
> 
> Hello Alex,
> 
>  
> 
> I can confirm it’s working. Thank you!
> 
>  
> 
>  
> 
> Mit freundlichen Grüßen / Best regards
> 
>  
> 
> Ulrich Müller
> 
> Dipl. Inf.
> 
>  
> 
> CARNET GmbH
> 
> Chemnitz, Germany
> 
> www.carnet-gmbh.de <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773119862&sdata=x2nQg8p8nn97NhUYzPqUQuisvx5%2BUP%2FoMMV9sl404H0%3D&reserved=0>
>  
> 
>  
> 
>  
> 
> Von: Alex Harui <aharui@adobe.com <ma...@adobe.com>> 
> Gesendet: Freitag, 26. Oktober 2018 18:10
> An: users@royale.apache.org <ma...@royale.apache.org>
> Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Hi Ulrich,
> 
>  
> 
> While Flex supported two component sets (MX and Spark) and they were more or less interoperable, Royale supports multiple component sets.  There is the Basic set, there is Express, Jewel, and the Emulation Components.  Like Flex, each component set has a different XML namespace.
> 
>  
> 
> The changes I made last night were to the Application in the MX Emulation Components.  So you would need to get the latest nightly build, and your application should look something like:
> 
>  
> 
> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009 <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773129867&sdata=A%2B98ZdMojIVYYiWoEXch4TjDGc0risu7Wo6JFJ07efo%3D&reserved=0>"
> 
>                    xmlns:local="*"                
> 
>                    xmlns:js="library://ns.apache.org/royale/basic <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773129867&sdata=84FUQmqTuGY47uJsxbjSxCozpEeBmF3ur0jEK2Han80%3D&reserved=0>"
> 
>                    xmlns:mx="library://ns.apache.org/royale/mx <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773139872&sdata=fAbWQTRW%2Bqau4EPkGNGYCEKvjH%2B0pmPFEovbhDGCgms%3D&reserved=0>"
> 
>                    applicationComplete="complete()"
> 
>                    >
> 
>  
> 
> And you won’t need to specify a valuesImpl, the MX Application will take care of that.  The emulation components are designed to reduce the amount of code changes required to migrate a Flex application to Royale.  The Basic components and other components sets are not guaranteed to be interoperable with other sets.  Basic’s main goal is to produce the smallest, fastest application, but it requires more time to assemble exactly the pieces you need.  Express is designed to make it faster to build a Basic application but you will pay for some overhead.  Jewel is a new look-and-feel and introduces some new UI widgets that didn’t exist in Flex.
> 
>  
> 
> Regarding supporting Royale, we are looking for folks like you who want to use it and will hopefully contribute to it.  Apache open source projects are volunteer-driven.  There is no company like Adobe driving it.  We hope that users like yourself will help by, at minimum, using the code and providing feedback, but also by providing patches/pull-requests with fixes and improvements.  Folks who contribute a series of good patches are granted write-access to the repo and then the project and its community grows stronger and faster.  So, we hope you will choose to use Apache Royale and will help find and fix bugs in the process of getting your application to run on Royale.  You can also hire people to help you migrate your code and find and fix bugs.  I think there are at least a couple of folks who might have extra cycles to help.
> 
>  
> 
> Thanks,
> 
> -Alex
> 
>  
> 
>  
> 
> From: "ulrich.mueller@carnet-gmbh.de <ma...@carnet-gmbh.de>" <ulrich.mueller@carnet-gmbh.de <ma...@carnet-gmbh.de>>
> Reply-To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Date: Friday, October 26, 2018 at 5:29 AM
> To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Hello Alex,
> 
>  
> 
> thanks for the work.
> 
>  
> 
> For testing I have created a most simple app:
> 
>  
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
>  
> 
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009 <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773149881&sdata=zP%2FpGbBYfh5jr7GPDQPLTT0nUBMjVx7qmVQPr9GFk%2FA%3D&reserved=0>"
> 
>                    xmlns:local="*"                
> 
>                    xmlns:js="library://ns.apache.org/royale/basic <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773149881&sdata=MTrBO%2FPEmQmJEjzbeKfm8ERlMJTDi3DRMzW49%2BWsMwg%3D&reserved=0>"
> 
>                    applicationComplete="complete()"
> 
>                    >
> 
>  
> 
>     <fx:Script>
> 
>         <![CDATA[
> 
>             protected function complete():void{
> 
>                 var foo:String = "test1234";                
> 
>             }  // breakpoint
> 
>         ]]>
> 
>     </fx:Script>    
> 
>  
> 
>     <js:valuesImpl>
> 
>         <js:SimpleCSSValuesImpl />
> 
>     </js:valuesImpl>
> 
> </js:Application>
> 
>  
> 
>  
> 
> In index.html I have put after compiling:
> 
>  
> 
> <body>
> 
>        <script type="text/javascript">
> 
>               var flashvars = {};
> 
>               flashvars.ntuser = "Ulrich";
> 
>               new TestApp().start(flashvars);
> 
>        </script>
> 
> </body>
> 
>  
> 
> During debugging (now working 😊 thx ) I could not see ntuser, parameters or something. Most likely it did not work as you said it was meant for emulation. We have no problem to redevelop some critical parts of the applications so here we can stick to native Royale.
> 
>  
> 
> Anyway how can we support the development of Apache Royale in general?
> 
>  
> 
>  
> 
> Mit freundlichen Grüßen / Best regards
> 
>  
> 
> Ulrich Müller
> 
> Dipl. Inf.
> 
>  
> 
> CARNET GmbH
> 
> Chemnitz, Germany
> 
> www.carnet-gmbh.de <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773159886&sdata=lQs40d%2BWV7e6Shs8Rn1XoRCbbhdGL6Un%2FGGzRvjawVg%3D&reserved=0>
>  
> 
>  
> 
>  
> 
>  
> 
> Von: Alex Harui <aharui@adobe.com <ma...@adobe.com>> 
> Gesendet: Freitag, 26. Oktober 2018 08:41
> An: users@royale.apache.org <ma...@royale.apache.org>
> Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Hi Ulrich,
> 
>  
> 
> I think I understand your workflow.  Since you are generating your own html file, you can make it pass the flashvars to the Application.  I just pushed a change to make the Application’s parameters writable and allow you to pass parameters in through the SystemManager.
> 
>  
> 
> Currently, the body of the html of a Royale app using the emulation components looks something like:
> 
>  
> 
> <body>
> 
>                 <script type="text/javascript">
> 
>                                 new MyApp_mx_managers_SystemManager().start();
> 
>                 </script>
> 
> </body>
> 
>  
> 
> If your JSP generates a variable called flashvars, then you can pass it into the “start” method.
> 
>  
> 
> <body>
> 
>                 <script type="text/javascript">
> 
>                                 new MyApp_mx_managers_SystemManager().start(flashvars);
> 
>                 </script>
> 
> </body>
> 
>  
> 
> There might be a few other bugs to work out once you get to the point of actually trying this code.
> 
>  
> 
> HTH,
> 
> -Alex
> 
>  
> 
> From: "ulrich.mueller@carnet-gmbh.de <ma...@carnet-gmbh.de>" <ulrich.mueller@carnet-gmbh.de <ma...@carnet-gmbh.de>>
> Reply-To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Date: Thursday, October 25, 2018 at 10:26 PM
> To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Hello,
> 
>  
> 
> the current workflow for some applications for our customers:
> 
>  
> 
>  
> 
> https://some-tomcat.local/blazeds/App/App.jsp <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773159886&sdata=trgrzk%2B5AooeE7RvOAVImu7sI56Tlb30%2BkBzVwyF5hQ%3D&reserved=0>
>  
> 
> ·       The .jsp file is practically the .html template (from Flash Builder)
> 
> ·       We employ flashvars to configure the applications without using URL parameters that can be seen by users
> 
> ·       The Tomcat is used to call Waffle to find out the current Windows Domain User (https://github.com/Waffle/waffle <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773169891&sdata=nKwvy5sQJO4ahHzNs53Ypevg6iehYAePMrLJrBouBY4%3D&reserved=0>)
> 
> ·       The user information is passed to the SWF
> 
>  
> 
> <script type="text/javascript">
> 
>             // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
> 
>             var swfVersionStr = "11.1.0";
> 
>             // To use express install, set to playerProductInstall.swf, otherwise the empty string.
> 
>             var xiSwfUrlStr = "playerProductInstall.swf";
> 
>             var flashvars = {};
> 
>  
> 
>             flashvars.user = '<%=request.getAttribute("ntuser")%>';  // created by Waffle filter and some processing
> 
>  
> 
>             var params = {};
> 
>             params.quality = "high";
> 
>             params.bgcolor = "#ffffff";
> 
>             params.allowscriptaccess = "sameDomain";
> 
>             params.allowfullscreen = "true";
> 
>             var attributes = {};
> 
>             attributes.id <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.id&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773169891&sdata=BZHzHP81GLMjdjev0Y9P3frH9ZfxqS1ATsO08NE0qqc%3D&reserved=0> = "MyApp";
> 
>             attributes.name <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.name&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773179905&sdata=zOZ0QKJdKQ5KRGK9uA7DF%2BC%2BNbpubSCUzC7s7KhSln0%3D&reserved=0> = "MyApp";
> 
>             attributes.align = "middle";
> 
>             swfobject.embedSWF(
> 
>                 "MyApp.swf", "flashContent",
> 
>                 "100%", "100%",
> 
>                 swfVersionStr, xiSwfUrlStr,
> 
>                 flashvars, params, attributes);
> 
>             // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
> 
>             swfobject.createCSS("#flashContent", "display:block;text-align:left;");
> 
> </script>
> 
>  
> 
>  
> 
> App.mxml
> 
>  
> 
> var user:String = FlexGlobals.topLevelApplication.parameters.user as String;
> 
> // Show user specific data …
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Mit freundlichen Grüßen / Best regards
> 
>  
> 
> Ulrich Müller
> 
> Dipl. Inf.
> 
>  
> 
> CARNET GmbH
> 
> Chemnitz, Germany
> 
> www.carnet-gmbh.de <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773189910&sdata=6UWIzNRfr6wC263K2VzOJhWyuJAJTmof79oDUl1d0Tk%3D&reserved=0>
>  
> 
>  
> 
>  
> 
> Von: Alex Harui <aharui@adobe.com <ma...@adobe.com>> 
> Gesendet: Donnerstag, 25. Oktober 2018 19:47
> An: users@royale.apache.org <ma...@royale.apache.org>
> Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Those beads or their equivalent are baked in to the emulation components.
> 
>  
> 
> FlexGlobals.topLevelApplication.parameters exists in the emulation components.  It may not be wired up correctly yet, but if not, it will be.  However, it will be wired by default to the URL parameters for the hosting webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting web page has set up your flashvars to be different from the URL parameters then you may tweak some code in the hosting web page.  If this is the case, can you share more about how you determine your flashvars?  I couldn’t quite get it from the snippets you provided.  It wasn’t clear if the JSP was putting the flashvars into a global or local variable and when it got passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a global flashvars variable or something like that.
> 
>  
> 
> Let us know,
> 
> -Alex
> 
>  
> 
> From: Carlos Rovira <carlosrovira@apache.org <ma...@apache.org>>
> Reply-To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Date: Thursday, October 25, 2018 at 9:46 AM
> To: "users@royale.apache.org <ma...@royale.apache.org>" <users@royale.apache.org <ma...@royale.apache.org>>
> Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?
> 
>  
> 
> Hi Ulrich,
> 
>  
> 
> please check ApplicationParametersBead and
> 
> ApplicationParametersCaseInsensitiveBead
> 
>  
> 
> and
> 
> https://github.com/apache/royale-asjs/issues/129 <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773189910&sdata=9cjEQPsYeM58Q%2BoI3WgQ%2FX7zGdtOg7oxeX6JytrlsGY%3D&reserved=0>
>  
> 
> I still didn't use it so others could hopefully give more detail
> 
>  
> 
> Best
> 
>  
> 
> Carlos
> 
>  
> 
>  
> 
>  
> 
>  
> 
> El jue., 25 oct. 2018 a las 17:36, <ulrich.mueller@carnet-gmbh.de <ma...@carnet-gmbh.de>> escribió:
> 
> Hello,
> 
>  
> 
> first of all: Many thanks to all contributers of Apache Royale. It looks very promising.  Thanks.
> 
>  
> 
> We have a large set of customer specific Flex applications targeted to Flash output. We are currently evaluating if we can use Royale/JS to replace them without must redevelopment.
> 
>  
> 
> Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters and the flashvar within the template? We have some variables filled there (by an Tomcat Server via an JSP page).
> 
>  
> 
>  
> 
> App.jsp
> 
>  
> 
> var flashvars = {};
> 
> flashvars.myvar= '<%=request.getAttribute("someindex")%>';
> 
>  
> 
>  
> 
> App.mxml
> 
>  
> 
> var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as String;
> 
>  
> 
>  
> 
>  
> 
> Mit freundlichen Grüßen / Best regards
> 
>  
> 
> Ulrich Müller
> 
> Dipl. Inf.
> 
>  
> 
>  
> 
> CARNET GmbH
> 
> Chemnitz, Germany
> 
>  
> 
>  
> 
>  
> 
> 
> 
>  
> 
> --
> 
> Carlos Rovira
> 
> http://about.me/carlosrovira <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773199919&sdata=tmwcfm0Do6nPkDG%2FcSPHhb8r%2BWHrt%2FCbxTOFQ64uq4g%3D&reserved=0>
>  
> 
> 
> 
>  
> 
> --
> 
> Carlos Rovira
> 
> http://about.me/carlosrovira <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773199919&sdata=tmwcfm0Do6nPkDG%2FcSPHhb8r%2BWHrt%2FCbxTOFQ64uq4g%3D&reserved=0>
>  
> 
> 
> 
>  
> 
> --
> 
> Carlos Rovira
> 
> http://about.me/carlosrovira <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773209924&sdata=2xjcgj29KmAAX2EBpLtIo6JDJiqOmV7OAIazjYTmQAY%3D&reserved=0>
>  
> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira <http://about.me/carlosrovira>
> 


Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Carlos Rovira <ca...@apache.org>.
Yeah, that's right, is just that the browser bar is just very exposed. All
info is easy to get if someone wants to retrieve, is just that they don't
want to expose to people just looking at the address bar. In the other hand
is seems to me more elegant to have a clean addresss without to many long
params there. Anyway, we still need to see the final shape of all this...

El jue., 24 ene. 2019 a las 11:08, Harbs (<ha...@gmail.com>) escribió:

> I hear you, but It’s going to be exposed in the source no matter what you
> do.
>
> FWIW, my apps are loaded in an iframe, so it’s only in the source and not
> in the browser bar.
>
> HTH,
> Harbs
>
> On Jan 24, 2019, at 11:56 AM, Carlos Rovira <ca...@apache.org>
> wrote:
>
> Hi Harbs,
>
> for our case, this is not allowed, since our client will not allow us to
> put some info so exposed. We're in the same case as Ulrich.
> It depends on the use case and the data passed
>
> anyway thanks! :)
>
>
>
> El jue., 24 ene. 2019 a las 10:19, Harbs (<ha...@gmail.com>)
> escribió:
>
>> I think the best practice is to simply include the options in the URL
>> used to launch the app.
>>
>> http://mycoolsite.com/mycoolapp/?option1=foo&option2=baz
>>
>> Easy peasy, and this is how I’m doing it for my apps.
>>
>> On Jan 24, 2019, at 11:02 AM, Carlos Rovira <ca...@apache.org>
>> wrote:
>>
>> Thanks Alex and Harbs
>>
>> I'll try as Harbs says and will not change Jewel Application
>>
>> El mié., 23 ene. 2019 a las 20:09, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>>>
>>> Are you sure you want to hide the startup options from the browser
>>> history?
>>>
>>
>> mm...what do you mean with this latest phrase?
>>
>> thanks!
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Harbs <ha...@gmail.com>.
I hear you, but It’s going to be exposed in the source no matter what you do.

FWIW, my apps are loaded in an iframe, so it’s only in the source and not in the browser bar.

HTH,
Harbs

> On Jan 24, 2019, at 11:56 AM, Carlos Rovira <ca...@apache.org> wrote:
> 
> Hi Harbs, 
> 
> for our case, this is not allowed, since our client will not allow us to put some info so exposed. We're in the same case as Ulrich.
> It depends on the use case and the data passed
> 
> anyway thanks! :)
> 
> 
> 
> El jue., 24 ene. 2019 a las 10:19, Harbs (<harbs.lists@gmail.com <ma...@gmail.com>>) escribió:
> I think the best practice is to simply include the options in the URL used to launch the app.
> 
> http://mycoolsite.com/mycoolapp/?option1=foo&option2=baz <http://mycoolsite.com/mycoolapp/?option1=foo&option2=baz>
> 
> Easy peasy, and this is how I’m doing it for my apps.
> 
>> On Jan 24, 2019, at 11:02 AM, Carlos Rovira <carlosrovira@apache.org <ma...@apache.org>> wrote:
>> 
>> Thanks Alex and Harbs
>> 
>> I'll try as Harbs says and will not change Jewel Application
>> 
>> El mié., 23 ene. 2019 a las 20:09, Alex Harui (<aharui@adobe.com <ma...@adobe.com>>) escribió:
>> 
>> 
>> Are you sure you want to hide the startup options from the browser history?
>> 
>> 
>> mm...what do you mean with this latest phrase?
>> 
>> thanks!
>> 
>> -- 
>> Carlos Rovira
>> http://about.me/carlosrovira <http://about.me/carlosrovira>
>> 
> 
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira <http://about.me/carlosrovira>
> 


Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Harbs,

for our case, this is not allowed, since our client will not allow us to
put some info so exposed. We're in the same case as Ulrich.
It depends on the use case and the data passed

anyway thanks! :)



El jue., 24 ene. 2019 a las 10:19, Harbs (<ha...@gmail.com>) escribió:

> I think the best practice is to simply include the options in the URL used
> to launch the app.
>
> http://mycoolsite.com/mycoolapp/?option1=foo&option2=baz
>
> Easy peasy, and this is how I’m doing it for my apps.
>
> On Jan 24, 2019, at 11:02 AM, Carlos Rovira <ca...@apache.org>
> wrote:
>
> Thanks Alex and Harbs
>
> I'll try as Harbs says and will not change Jewel Application
>
> El mié., 23 ene. 2019 a las 20:09, Alex Harui (<ah...@adobe.com>)
> escribió:
>
>>
>> Are you sure you want to hide the startup options from the browser
>> history?
>>
>
> mm...what do you mean with this latest phrase?
>
> thanks!
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Harbs <ha...@gmail.com>.
I think the best practice is to simply include the options in the URL used to launch the app.

http://mycoolsite.com/mycoolapp/?option1=foo&option2=baz <http://mycoolsite.com/mycoolapp/?option1=foo&option2=baz>

Easy peasy, and this is how I’m doing it for my apps.

> On Jan 24, 2019, at 11:02 AM, Carlos Rovira <ca...@apache.org> wrote:
> 
> Thanks Alex and Harbs
> 
> I'll try as Harbs says and will not change Jewel Application
> 
> El mié., 23 ene. 2019 a las 20:09, Alex Harui (<aharui@adobe.com <ma...@adobe.com>>) escribió:
> 
> 
> Are you sure you want to hide the startup options from the browser history?
> 
> 
> mm...what do you mean with this latest phrase?
> 
> thanks!
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira <http://about.me/carlosrovira>
> 


Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Carlos Rovira <ca...@apache.org>.
Thanks Alex and Harbs

I'll try as Harbs says and will not change Jewel Application

El mié., 23 ene. 2019 a las 20:09, Alex Harui (<ah...@adobe.com>) escribió:

>
> Are you sure you want to hide the startup options from the browser history?
>

mm...what do you mean with this latest phrase?

thanks!

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Alex Harui <ah...@adobe.com>.
For emulation, the SystemManager is the entry point and it’s start() parameter accepts an optional parameter object.  IMO, you can change Jewel if you want, but I wouldn’t change the other Application classes.  Passing in FlashVars is not a practice I think we want to recommend for new applications.

Are you sure you want to hide the startup options from the browser history?

-Alex

From: Carlos Rovira <ca...@apache.org>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 23, 2019 at 10:53 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

So I don't understand this part...I check start() method in Application classes in Basic, Jewel and MX and the signature doesn't allow params, so how Ulrich and other can pass a param if the method doesn't allow it? how this can work?
Or should I modify start to allow params at least in Jewel?

El mié., 23 ene. 2019 a las 19:32, Alex Harui (<ah...@adobe.com>>) escribió:
The parameters for start() depend on the Application class.  I don’t think we’ve required a particular parameter list.

-Alex

From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 23, 2019 at 10:06 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Oh, that's right...didn't see the solution can be so easy :)

I understand that start() accept parameters right?

thanks! :)

Carlos



El mié., 23 ene. 2019 a las 18:45, Alex Harui (<ah...@adobe.com>>) escribió:
The compiler can’t know to generate that.  The compiler has no idea what the html that kicks off the app should look like.  So instead of $body, put in what you need.

-Alex

From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 23, 2019 at 9:41 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Alex,

I'm in a similar need than Ulrich to pass some vars in a "flashvars" object(to avoid be seen in the url) to our Jewel App.
So I'm reading this thread and taking into account that I use the bead (ApplicationParamenterBead), I still can't figure a few things:

1.-  I have this in my html template:


<body>

${body}

</body>


After compilation this generates:


<body>
   <script type="text/javascript">
      new App().start();
   </script>

</body>

But it should be something like this:

<body>
       <script type="text/javascript">
              var flashvars = {};
              flashvars.ntuser = "Something";
              new App().start(flashvars);
       </script>
</body>

in other words, what I really need is compiler can generate this line:

new App().start(flashvars);

since this other lines:

var flashvars = {};
              flashvars.ntuser = "Something";

Can be written in other part of the template without problem.

Note that I'm not using mx:Application, so I need to use this with j:Application

thanks


El lun., 29 oct. 2018 a las 8:35, <ul...@carnet-gmbh.de>> escribió:
Hello Alex,

I can confirm it’s working. Thank you!


Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=lKwuHAB3pbb6U78%2BFvShl7VHaTCHvTir%2FWqzWDlGpnk%3D&reserved=0>



Von: Alex Harui <ah...@adobe.com>>
Gesendet: Freitag, 26. Oktober 2018 18:10
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

While Flex supported two component sets (MX and Spark) and they were more or less interoperable, Royale supports multiple component sets.  There is the Basic set, there is Express, Jewel, and the Emulation Components.  Like Flex, each component set has a different XML namespace.

The changes I made last night were to the Application in the MX Emulation Components.  So you would need to get the latest nightly build, and your application should look something like:

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=27PEgpR4sF52Gmnmp6X56NNCYiIpiRpFE9n3MLgjPwQ%3D&reserved=0>"
                   xmlns:local="*"
                   xmlns:js="library://ns.apache.org/royale/basic<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=q4LNchyZj%2BFOX31buVOKkjni4OQ2lDQOTCiV2VnqM%2B0%3D&reserved=0>"
                   xmlns:mx="library://ns.apache.org/royale/mx<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=hKs%2Bk%2FsCD52MaZivuNyq40YiXdD1L4hzLbCpFm%2BIbv4%3D&reserved=0>"
                   applicationComplete="complete()"
                   >

And you won’t need to specify a valuesImpl, the MX Application will take care of that.  The emulation components are designed to reduce the amount of code changes required to migrate a Flex application to Royale.  The Basic components and other components sets are not guaranteed to be interoperable with other sets.  Basic’s main goal is to produce the smallest, fastest application, but it requires more time to assemble exactly the pieces you need.  Express is designed to make it faster to build a Basic application but you will pay for some overhead.  Jewel is a new look-and-feel and introduces some new UI widgets that didn’t exist in Flex.

Regarding supporting Royale, we are looking for folks like you who want to use it and will hopefully contribute to it.  Apache open source projects are volunteer-driven.  There is no company like Adobe driving it.  We hope that users like yourself will help by, at minimum, using the code and providing feedback, but also by providing patches/pull-requests with fixes and improvements.  Folks who contribute a series of good patches are granted write-access to the repo and then the project and its community grows stronger and faster.  So, we hope you will choose to use Apache Royale and will help find and fix bugs in the process of getting your application to run on Royale.  You can also hire people to help you migrate your code and find and fix bugs.  I think there are at least a couple of folks who might have extra cycles to help.

Thanks,
-Alex


From: "ulrich.mueller@carnet-gmbh.de<ma...@carnet-gmbh.de>" <ul...@carnet-gmbh.de>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, October 26, 2018 at 5:29 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hello Alex,

thanks for the work.

For testing I have created a most simple app:

<?xml version="1.0" encoding="utf-8"?>

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=27PEgpR4sF52Gmnmp6X56NNCYiIpiRpFE9n3MLgjPwQ%3D&reserved=0>"
                   xmlns:local="*"
                   xmlns:js="library://ns.apache.org/royale/basic<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=q4LNchyZj%2BFOX31buVOKkjni4OQ2lDQOTCiV2VnqM%2B0%3D&reserved=0>"
                   applicationComplete="complete()"
                   >

    <fx:Script>
        <![CDATA[
            protected function complete():void{
                var foo:String = "test1234";
            }  // breakpoint
        ]]>
    </fx:Script>

    <js:valuesImpl>
        <js:SimpleCSSValuesImpl />
    </js:valuesImpl>
</js:Application>


In index.html I have put after compiling:

<body>
       <script type="text/javascript">
              var flashvars = {};
              flashvars.ntuser = "Ulrich";
              new TestApp().start(flashvars);
       </script>
</body>

During debugging (now working 😊 thx ) I could not see ntuser, parameters or something. Most likely it did not work as you said it was meant for emulation. We have no problem to redevelop some critical parts of the applications so here we can stick to native Royale.

Anyway how can we support the development of Apache Royale in general?


Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=lKwuHAB3pbb6U78%2BFvShl7VHaTCHvTir%2FWqzWDlGpnk%3D&reserved=0>




Von: Alex Harui <ah...@adobe.com>>
Gesendet: Freitag, 26. Oktober 2018 08:41
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

I think I understand your workflow.  Since you are generating your own html file, you can make it pass the flashvars to the Application.  I just pushed a change to make the Application’s parameters writable and allow you to pass parameters in through the SystemManager.

Currently, the body of the html of a Royale app using the emulation components looks something like:

<body>
                <script type="text/javascript">
                                new MyApp_mx_managers_SystemManager().start();
                </script>
</body>

If your JSP generates a variable called flashvars, then you can pass it into the “start” method.

<body>
                <script type="text/javascript">
                                new MyApp_mx_managers_SystemManager().start(flashvars);
                </script>
</body>

There might be a few other bugs to work out once you get to the point of actually trying this code.

HTH,
-Alex

From: "ulrich.mueller@carnet-gmbh.de<ma...@carnet-gmbh.de>" <ul...@carnet-gmbh.de>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, October 25, 2018 at 10:26 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hello,

the current workflow for some applications for our customers:


https://some-tomcat.local/blazeds/App/App.jsp<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=LIyGA9NJTX%2BkvLL%2FEEdD%2FDmLJhwWyE7IEdjE6PR%2F%2Fwo%3D&reserved=0>


•       The .jsp file is practically the .html template (from Flash Builder)

•       We employ flashvars to configure the applications without using URL parameters that can be seen by users

•       The Tomcat is used to call Waffle to find out the current Windows Domain User (https://github.com/Waffle/waffle<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=%2BrbACVfAjGkO9y2%2F9mvBk9vNMH100c48AHTbWT%2FVgt0%3D&reserved=0>)

•       The user information is passed to the SWF

<script type="text/javascript">
            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
            var swfVersionStr = "11.1.0";
            // To use express install, set to playerProductInstall.swf, otherwise the empty string.
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {};

            flashvars.user = '<%=request.getAttribute("ntuser")%>';  // created by Waffle filter and some processing

            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var attributes = {};
            attributes.id<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.id&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=Jhko1SNZH1WmppYgm%2BBuWCF7hx1dUCBNmNVQ2UJQPcQ%3D&reserved=0> = "MyApp";
            attributes.name<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.name&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=Kk%2BUxchSWSLag8H90pyDrI5qDc6%2BjAkgjAz0dMsWrc4%3D&reserved=0> = "MyApp";
            attributes.align = "middle";
            swfobject.embedSWF(
                "MyApp.swf", "flashContent",
                "100%", "100%",
                swfVersionStr, xiSwfUrlStr,
                flashvars, params, attributes);
            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>


App.mxml

var user:String = FlexGlobals.topLevelApplication.parameters.user as String;
// Show user specific data …




Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=lKwuHAB3pbb6U78%2BFvShl7VHaTCHvTir%2FWqzWDlGpnk%3D&reserved=0>



Von: Alex Harui <ah...@adobe.com>>
Gesendet: Donnerstag, 25. Oktober 2018 19:47
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Those beads or their equivalent are baked in to the emulation components.

FlexGlobals.topLevelApplication.parameters exists in the emulation components.  It may not be wired up correctly yet, but if not, it will be.  However, it will be wired by default to the URL parameters for the hosting webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting web page has set up your flashvars to be different from the URL parameters then you may tweak some code in the hosting web page.  If this is the case, can you share more about how you determine your flashvars?  I couldn’t quite get it from the snippets you provided.  It wasn’t clear if the JSP was putting the flashvars into a global or local variable and when it got passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a global flashvars variable or something like that.

Let us know,
-Alex

From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, October 25, 2018 at 9:46 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

please check ApplicationParametersBead and
ApplicationParametersCaseInsensitiveBead

and
https://github.com/apache/royale-asjs/issues/129<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=jrNo%2FtwLOn%2FtjpE6feh6Y4VQhU3Ue8ZDVcfmbFZGdQE%3D&reserved=0>

I still didn't use it so others could hopefully give more detail

Best

Carlos




El jue., 25 oct. 2018 a las 17:36, <ul...@carnet-gmbh.de>> escribió:
Hello,

first of all: Many thanks to all contributers of Apache Royale. It looks very promising.  Thanks.

We have a large set of customer specific Flex applications targeted to Flash output. We are currently evaluating if we can use Royale/JS to replace them without must redevelopment.

Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters and the flashvar within the template? We have some variables filled there (by an Tomcat Server via an JSP page).


App.jsp

var flashvars = {};
flashvars.myvar= '<%=request.getAttribute("someindex")%>';


App.mxml

var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as String;



Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.


CARNET GmbH
Chemnitz, Germany





--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=MmqtvRfHli9tr8Qy6%2BoybaczhJhP6%2FXicZjriuIIabI%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=MmqtvRfHli9tr8Qy6%2BoybaczhJhP6%2FXicZjriuIIabI%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=MmqtvRfHli9tr8Qy6%2BoybaczhJhP6%2FXicZjriuIIabI%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C821f355f85f340a52bb208d681641100%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838664118685252&sdata=MmqtvRfHli9tr8Qy6%2BoybaczhJhP6%2FXicZjriuIIabI%3D&reserved=0>


Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Carlos Rovira <ca...@apache.org>.
So I don't understand this part...I check start() method in Application
classes in Basic, Jewel and MX and the signature doesn't allow params, so
how Ulrich and other can pass a param if the method doesn't allow it? how
this can work?
Or should I modify start to allow params at least in Jewel?

El mié., 23 ene. 2019 a las 19:32, Alex Harui (<ah...@adobe.com>) escribió:

> The parameters for start() depend on the Application class.  I don’t think
> we’ve required a particular parameter list.
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 23, 2019 at 10:06 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Oh, that's right...didn't see the solution can be so easy :)
>
>
>
> I understand that start() accept parameters right?
>
>
>
> thanks! :)
>
>
>
> Carlos
>
>
>
>
>
>
>
> El mié., 23 ene. 2019 a las 18:45, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> The compiler can’t know to generate that.  The compiler has no idea what
> the html that kicks off the app should look like.  So instead of $body, put
> in what you need.
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 23, 2019 at 9:41 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Alex,
>
>
>
> I'm in a similar need than Ulrich to pass some vars in a "flashvars"
> object(to avoid be seen in the url) to our Jewel App.
>
> So I'm reading this thread and taking into account that I use the bead
> (ApplicationParamenterBead), I still can't figure a few things:
>
>
>
> 1.-  I have this in my html template:
>
>
>
>
>
> <body>
>
>
>
> ${body}
>
>
>
> </body>
>
>
>
>
>
> After compilation this generates:
>
>
>
> <*body*>
>    <*script **type=**"text/javascript"*>
>       *new *App().start();
>    </*script*>
>
> </*body*>
>
>
>
> But it should be something like this:
>
>
>
> <body>
>
>        <script type="text/javascript">
>
>               * var flashvars = {};*
>
> *              flashvars.ntuser = "Something";*
>
>               new App().start(*flashvars*);
>
>        </script>
>
> </body>
>
>
>
> in other words, what I really need is compiler can generate this line:
>
>
>
> new App().start(*flashvars*);
>
>
>
> since this other lines:
>
>
>
> *var flashvars = {};*
>
> *              flashvars.ntuser = "Something";*
>
>
>
> Can be written in other part of the template without problem.
>
>
>
> Note that I'm not using mx:Application, so I need to use this with
> j:Application
>
>
>
> thanks
>
>
>
>
>
> El lun., 29 oct. 2018 a las 8:35, <ul...@carnet-gmbh.de>
> escribió:
>
> Hello Alex,
>
>
>
> I can confirm it’s working. Thank you!
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773119862&sdata=x2nQg8p8nn97NhUYzPqUQuisvx5%2BUP%2FoMMV9sl404H0%3D&reserved=0>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Freitag, 26. Oktober 2018 18:10
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> While Flex supported two component sets (MX and Spark) and they were more
> or less interoperable, Royale supports multiple component sets.  There is
> the Basic set, there is Express, Jewel, and the Emulation Components.  Like
> Flex, each component set has a different XML namespace.
>
>
>
> The changes I made last night were to the Application in the MX Emulation
> Components.  So you would need to get the latest nightly build, and your
> application should look something like:
>
>
>
> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773129867&sdata=A%2B98ZdMojIVYYiWoEXch4TjDGc0risu7Wo6JFJ07efo%3D&reserved=0>
> "
>
>                    xmlns:local="*"
>
>                    xmlns:js="library://ns.apache.org/royale/basic
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773129867&sdata=84FUQmqTuGY47uJsxbjSxCozpEeBmF3ur0jEK2Han80%3D&reserved=0>"
>
>
>                    xmlns:mx="library://ns.apache.org/royale/mx
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773139872&sdata=fAbWQTRW%2Bqau4EPkGNGYCEKvjH%2B0pmPFEovbhDGCgms%3D&reserved=0>"
>
>
>                    applicationComplete="complete()"
>
>                    >
>
>
>
> And you won’t need to specify a valuesImpl, the MX Application will take
> care of that.  The emulation components are designed to reduce the amount
> of code changes required to migrate a Flex application to Royale.  The
> Basic components and other components sets are not guaranteed to be
> interoperable with other sets.  Basic’s main goal is to produce the
> smallest, fastest application, but it requires more time to assemble
> exactly the pieces you need.  Express is designed to make it faster to
> build a Basic application but you will pay for some overhead.  Jewel is a
> new look-and-feel and introduces some new UI widgets that didn’t exist in
> Flex.
>
>
>
> Regarding supporting Royale, we are looking for folks like you who want to
> use it and will hopefully contribute to it.  Apache open source projects
> are volunteer-driven.  There is no company like Adobe driving it.  We hope
> that users like yourself will help by, at minimum, using the code and
> providing feedback, but also by providing patches/pull-requests with fixes
> and improvements.  Folks who contribute a series of good patches are
> granted write-access to the repo and then the project and its community
> grows stronger and faster.  So, we hope you will choose to use Apache
> Royale and will help find and fix bugs in the process of getting your
> application to run on Royale.  You can also hire people to help you migrate
> your code and find and fix bugs.  I think there are at least a couple of
> folks who might have extra cycles to help.
>
>
>
> Thanks,
>
> -Alex
>
>
>
>
>
> *From: *"ulrich.mueller@carnet-gmbh.de" <ul...@carnet-gmbh.de>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, October 26, 2018 at 5:29 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hello Alex,
>
>
>
> thanks for the work.
>
>
>
> For testing I have created a most simple app:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773149881&sdata=zP%2FpGbBYfh5jr7GPDQPLTT0nUBMjVx7qmVQPr9GFk%2FA%3D&reserved=0>
> "
>
>                    xmlns:local="*"
>
>                    xmlns:js="library://ns.apache.org/royale/basic
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773149881&sdata=MTrBO%2FPEmQmJEjzbeKfm8ERlMJTDi3DRMzW49%2BWsMwg%3D&reserved=0>"
>
>
>                    applicationComplete="complete()"
>
>                    >
>
>
>
>     <fx:Script>
>
>         <![CDATA[
>
>             protected function complete():void{
>
>                 var foo:String = "test1234";
>
>             }  // breakpoint
>
>         ]]>
>
>     </fx:Script>
>
>
>
>     <js:valuesImpl>
>
>         <js:SimpleCSSValuesImpl />
>
>     </js:valuesImpl>
>
> </js:Application>
>
>
>
>
>
> In index.html I have put after compiling:
>
>
>
> <body>
>
>        <script type="text/javascript">
>
>               var flashvars = {};
>
>               flashvars.ntuser = "Ulrich";
>
>               new TestApp().start(flashvars);
>
>        </script>
>
> </body>
>
>
>
> During debugging (now working 😊 thx ) I could not see ntuser, parameters
> or something. Most likely it did not work as you said it was meant for
> emulation. We have no problem to redevelop some critical parts of the
> applications so here we can stick to native Royale.
>
>
>
> Anyway how can we support the development of Apache Royale in general?
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773159886&sdata=lQs40d%2BWV7e6Shs8Rn1XoRCbbhdGL6Un%2FGGzRvjawVg%3D&reserved=0>
>
>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Freitag, 26. Oktober 2018 08:41
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> I think I understand your workflow.  Since you are generating your own
> html file, you can make it pass the flashvars to the Application.  I just
> pushed a change to make the Application’s parameters writable and allow you
> to pass parameters in through the SystemManager.
>
>
>
> Currently, the body of the html of a Royale app using the emulation
> components looks something like:
>
>
>
> <body>
>
>                 <script type="text/javascript">
>
>                                 new
> MyApp_mx_managers_SystemManager().start();
>
>                 </script>
>
> </body>
>
>
>
> If your JSP generates a variable called flashvars, then you can pass it
> into the “start” method.
>
>
>
> <body>
>
>                 <script type="text/javascript">
>
>                                 new
> MyApp_mx_managers_SystemManager().start(flashvars);
>
>                 </script>
>
> </body>
>
>
>
> There might be a few other bugs to work out once you get to the point of
> actually trying this code.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *"ulrich.mueller@carnet-gmbh.de" <ul...@carnet-gmbh.de>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, October 25, 2018 at 10:26 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hello,
>
>
>
> the current workflow for some applications for our customers:
>
>
>
>
>
> https://some-tomcat.local/blazeds/App/App.jsp
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773159886&sdata=trgrzk%2B5AooeE7RvOAVImu7sI56Tlb30%2BkBzVwyF5hQ%3D&reserved=0>
>
>
>
> ·       The .jsp file is practically the .html template (from Flash
> Builder)
>
> ·       We employ flashvars to configure the applications without using
> URL parameters that can be seen by users
>
> ·       The Tomcat is used to call Waffle to find out the current Windows
> Domain User (https://github.com/Waffle/waffle
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773169891&sdata=nKwvy5sQJO4ahHzNs53Ypevg6iehYAePMrLJrBouBY4%3D&reserved=0>
> )
>
> ·       The user information is passed to the SWF
>
>
>
> <script type="text/javascript">
>
>             // For version detection, set to min. required Flash Player
> version, or 0 (or 0.0.0), for no version detection.
>
>             var swfVersionStr = "11.1.0";
>
>             // To use express install, set to playerProductInstall.swf,
> otherwise the empty string.
>
>             var xiSwfUrlStr = "playerProductInstall.swf";
>
>             var flashvars = {};
>
>
>
> *            flashvars.user = '<%=request.getAttribute("ntuser")%>';  //
> created by Waffle filter and some processing*
>
>
>
>             var params = {};
>
>             params.quality = "high";
>
>             params.bgcolor = "#ffffff";
>
>             params.allowscriptaccess = "sameDomain";
>
>             params.allowfullscreen = "true";
>
>             var attributes = {};
>
>             attributes.id
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.id&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773169891&sdata=BZHzHP81GLMjdjev0Y9P3frH9ZfxqS1ATsO08NE0qqc%3D&reserved=0>
> = "MyApp";
>
>             attributes.name
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.name&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773179905&sdata=zOZ0QKJdKQ5KRGK9uA7DF%2BC%2BNbpubSCUzC7s7KhSln0%3D&reserved=0>
> = "MyApp";
>
>             attributes.align = "middle";
>
>             swfobject.embedSWF(
>
>                 "MyApp.swf", "flashContent",
>
>                 "100%", "100%",
>
>                 swfVersionStr, xiSwfUrlStr,
>
>                 *flashvars*, params, attributes);
>
>             // JavaScript enabled so display the flashContent div in case
> it is not replaced with a swf object.
>
>             swfobject.createCSS("#flashContent",
> "display:block;text-align:left;");
>
> </script>
>
>
>
>
>
> App.mxml
>
>
>
> var user:String = FlexGlobals.topLevelApplication.parameters.*user* as
> String;
>
> // Show user specific data …
>
>
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773189910&sdata=6UWIzNRfr6wC263K2VzOJhWyuJAJTmof79oDUl1d0Tk%3D&reserved=0>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Donnerstag, 25. Oktober 2018 19:47
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Those beads or their equivalent are baked in to the emulation components.
>
>
>
> FlexGlobals.topLevelApplication.parameters exists in the emulation
> components.  It may not be wired up correctly yet, but if not, it will be.
> However, it will be wired by default to the URL parameters for the hosting
> webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting
> web page has set up your flashvars to be different from the URL parameters
> then you may tweak some code in the hosting web page.  If this is the case,
> can you share more about how you determine your flashvars?  I couldn’t
> quite get it from the snippets you provided.  It wasn’t clear if the JSP
> was putting the flashvars into a global or local variable and when it got
> passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe
> we’ll make it so the parameters first look for a global flashvars variable
> or something like that.
>
>
>
> Let us know,
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, October 25, 2018 at 9:46 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> please check ApplicationParametersBead and
>
> ApplicationParametersCaseInsensitiveBead
>
>
>
> and
>
> https://github.com/apache/royale-asjs/issues/129
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773189910&sdata=9cjEQPsYeM58Q%2BoI3WgQ%2FX7zGdtOg7oxeX6JytrlsGY%3D&reserved=0>
>
>
>
> I still didn't use it so others could hopefully give more detail
>
>
>
> Best
>
>
>
> Carlos
>
>
>
>
>
>
>
>
>
> El jue., 25 oct. 2018 a las 17:36, <ul...@carnet-gmbh.de>
> escribió:
>
> Hello,
>
>
>
> first of all: Many thanks to all contributers of Apache Royale. It looks
> very promising.  Thanks.
>
>
>
> We have a large set of customer specific Flex applications targeted to
> Flash output. We are currently evaluating if we can use Royale/JS to
> replace them without must redevelopment.
>
>
>
> Is there an infrastructure to use
> FlexGlobals.topLevelApplication.parameters and the flashvar within the
> template? We have some variables filled there (by an Tomcat Server via an
> JSP page).
>
>
>
>
>
> App.jsp
>
>
>
> var flashvars = {};
>
> flashvars.myvar= '<%=request.getAttribute("someindex")%>';
>
>
>
>
>
> App.mxml
>
>
>
> var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as
> String;
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
>
>
>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773199919&sdata=tmwcfm0Do6nPkDG%2FcSPHhb8r%2BWHrt%2FCbxTOFQ64uq4g%3D&reserved=0>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773199919&sdata=tmwcfm0Do6nPkDG%2FcSPHhb8r%2BWHrt%2FCbxTOFQ64uq4g%3D&reserved=0>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773209924&sdata=2xjcgj29KmAAX2EBpLtIo6JDJiqOmV7OAIazjYTmQAY%3D&reserved=0>
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Alex Harui <ah...@adobe.com>.
The parameters for start() depend on the Application class.  I don’t think we’ve required a particular parameter list.

-Alex

From: Carlos Rovira <ca...@apache.org>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 23, 2019 at 10:06 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Oh, that's right...didn't see the solution can be so easy :)

I understand that start() accept parameters right?

thanks! :)

Carlos



El mié., 23 ene. 2019 a las 18:45, Alex Harui (<ah...@adobe.com>>) escribió:
The compiler can’t know to generate that.  The compiler has no idea what the html that kicks off the app should look like.  So instead of $body, put in what you need.

-Alex

From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, January 23, 2019 at 9:41 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Alex,

I'm in a similar need than Ulrich to pass some vars in a "flashvars" object(to avoid be seen in the url) to our Jewel App.
So I'm reading this thread and taking into account that I use the bead (ApplicationParamenterBead), I still can't figure a few things:

1.-  I have this in my html template:


<body>

${body}

</body>


After compilation this generates:


<body>
   <script type="text/javascript">
      new App().start();
   </script>

</body>

But it should be something like this:

<body>
       <script type="text/javascript">
              var flashvars = {};
              flashvars.ntuser = "Something";
              new App().start(flashvars);
       </script>
</body>

in other words, what I really need is compiler can generate this line:

new App().start(flashvars);

since this other lines:

var flashvars = {};
              flashvars.ntuser = "Something";

Can be written in other part of the template without problem.

Note that I'm not using mx:Application, so I need to use this with j:Application

thanks


El lun., 29 oct. 2018 a las 8:35, <ul...@carnet-gmbh.de>> escribió:
Hello Alex,

I can confirm it’s working. Thank you!


Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773119862&sdata=x2nQg8p8nn97NhUYzPqUQuisvx5%2BUP%2FoMMV9sl404H0%3D&reserved=0>



Von: Alex Harui <ah...@adobe.com>>
Gesendet: Freitag, 26. Oktober 2018 18:10
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

While Flex supported two component sets (MX and Spark) and they were more or less interoperable, Royale supports multiple component sets.  There is the Basic set, there is Express, Jewel, and the Emulation Components.  Like Flex, each component set has a different XML namespace.

The changes I made last night were to the Application in the MX Emulation Components.  So you would need to get the latest nightly build, and your application should look something like:

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773129867&sdata=A%2B98ZdMojIVYYiWoEXch4TjDGc0risu7Wo6JFJ07efo%3D&reserved=0>"
                   xmlns:local="*"
                   xmlns:js="library://ns.apache.org/royale/basic<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773129867&sdata=84FUQmqTuGY47uJsxbjSxCozpEeBmF3ur0jEK2Han80%3D&reserved=0>"
                   xmlns:mx="library://ns.apache.org/royale/mx<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773139872&sdata=fAbWQTRW%2Bqau4EPkGNGYCEKvjH%2B0pmPFEovbhDGCgms%3D&reserved=0>"
                   applicationComplete="complete()"
                   >

And you won’t need to specify a valuesImpl, the MX Application will take care of that.  The emulation components are designed to reduce the amount of code changes required to migrate a Flex application to Royale.  The Basic components and other components sets are not guaranteed to be interoperable with other sets.  Basic’s main goal is to produce the smallest, fastest application, but it requires more time to assemble exactly the pieces you need.  Express is designed to make it faster to build a Basic application but you will pay for some overhead.  Jewel is a new look-and-feel and introduces some new UI widgets that didn’t exist in Flex.

Regarding supporting Royale, we are looking for folks like you who want to use it and will hopefully contribute to it.  Apache open source projects are volunteer-driven.  There is no company like Adobe driving it.  We hope that users like yourself will help by, at minimum, using the code and providing feedback, but also by providing patches/pull-requests with fixes and improvements.  Folks who contribute a series of good patches are granted write-access to the repo and then the project and its community grows stronger and faster.  So, we hope you will choose to use Apache Royale and will help find and fix bugs in the process of getting your application to run on Royale.  You can also hire people to help you migrate your code and find and fix bugs.  I think there are at least a couple of folks who might have extra cycles to help.

Thanks,
-Alex


From: "ulrich.mueller@carnet-gmbh.de<ma...@carnet-gmbh.de>" <ul...@carnet-gmbh.de>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, October 26, 2018 at 5:29 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hello Alex,

thanks for the work.

For testing I have created a most simple app:

<?xml version="1.0" encoding="utf-8"?>

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773149881&sdata=zP%2FpGbBYfh5jr7GPDQPLTT0nUBMjVx7qmVQPr9GFk%2FA%3D&reserved=0>"
                   xmlns:local="*"
                   xmlns:js="library://ns.apache.org/royale/basic<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773149881&sdata=MTrBO%2FPEmQmJEjzbeKfm8ERlMJTDi3DRMzW49%2BWsMwg%3D&reserved=0>"
                   applicationComplete="complete()"
                   >

    <fx:Script>
        <![CDATA[
            protected function complete():void{
                var foo:String = "test1234";
            }  // breakpoint
        ]]>
    </fx:Script>

    <js:valuesImpl>
        <js:SimpleCSSValuesImpl />
    </js:valuesImpl>
</js:Application>


In index.html I have put after compiling:

<body>
       <script type="text/javascript">
              var flashvars = {};
              flashvars.ntuser = "Ulrich";
              new TestApp().start(flashvars);
       </script>
</body>

During debugging (now working 😊 thx ) I could not see ntuser, parameters or something. Most likely it did not work as you said it was meant for emulation. We have no problem to redevelop some critical parts of the applications so here we can stick to native Royale.

Anyway how can we support the development of Apache Royale in general?


Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773159886&sdata=lQs40d%2BWV7e6Shs8Rn1XoRCbbhdGL6Un%2FGGzRvjawVg%3D&reserved=0>




Von: Alex Harui <ah...@adobe.com>>
Gesendet: Freitag, 26. Oktober 2018 08:41
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

I think I understand your workflow.  Since you are generating your own html file, you can make it pass the flashvars to the Application.  I just pushed a change to make the Application’s parameters writable and allow you to pass parameters in through the SystemManager.

Currently, the body of the html of a Royale app using the emulation components looks something like:

<body>
                <script type="text/javascript">
                                new MyApp_mx_managers_SystemManager().start();
                </script>
</body>

If your JSP generates a variable called flashvars, then you can pass it into the “start” method.

<body>
                <script type="text/javascript">
                                new MyApp_mx_managers_SystemManager().start(flashvars);
                </script>
</body>

There might be a few other bugs to work out once you get to the point of actually trying this code.

HTH,
-Alex

From: "ulrich.mueller@carnet-gmbh.de<ma...@carnet-gmbh.de>" <ul...@carnet-gmbh.de>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, October 25, 2018 at 10:26 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hello,

the current workflow for some applications for our customers:


https://some-tomcat.local/blazeds/App/App.jsp<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773159886&sdata=trgrzk%2B5AooeE7RvOAVImu7sI56Tlb30%2BkBzVwyF5hQ%3D&reserved=0>


•       The .jsp file is practically the .html template (from Flash Builder)

•       We employ flashvars to configure the applications without using URL parameters that can be seen by users

•       The Tomcat is used to call Waffle to find out the current Windows Domain User (https://github.com/Waffle/waffle<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773169891&sdata=nKwvy5sQJO4ahHzNs53Ypevg6iehYAePMrLJrBouBY4%3D&reserved=0>)

•       The user information is passed to the SWF

<script type="text/javascript">
            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
            var swfVersionStr = "11.1.0";
            // To use express install, set to playerProductInstall.swf, otherwise the empty string.
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {};

            flashvars.user = '<%=request.getAttribute("ntuser")%>';  // created by Waffle filter and some processing

            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var attributes = {};
            attributes.id<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.id&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773169891&sdata=BZHzHP81GLMjdjev0Y9P3frH9ZfxqS1ATsO08NE0qqc%3D&reserved=0> = "MyApp";
            attributes.name<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.name&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773179905&sdata=zOZ0QKJdKQ5KRGK9uA7DF%2BC%2BNbpubSCUzC7s7KhSln0%3D&reserved=0> = "MyApp";
            attributes.align = "middle";
            swfobject.embedSWF(
                "MyApp.swf", "flashContent",
                "100%", "100%",
                swfVersionStr, xiSwfUrlStr,
                flashvars, params, attributes);
            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>


App.mxml

var user:String = FlexGlobals.topLevelApplication.parameters.user as String;
// Show user specific data …




Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773189910&sdata=6UWIzNRfr6wC263K2VzOJhWyuJAJTmof79oDUl1d0Tk%3D&reserved=0>



Von: Alex Harui <ah...@adobe.com>>
Gesendet: Donnerstag, 25. Oktober 2018 19:47
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Those beads or their equivalent are baked in to the emulation components.

FlexGlobals.topLevelApplication.parameters exists in the emulation components.  It may not be wired up correctly yet, but if not, it will be.  However, it will be wired by default to the URL parameters for the hosting webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting web page has set up your flashvars to be different from the URL parameters then you may tweak some code in the hosting web page.  If this is the case, can you share more about how you determine your flashvars?  I couldn’t quite get it from the snippets you provided.  It wasn’t clear if the JSP was putting the flashvars into a global or local variable and when it got passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a global flashvars variable or something like that.

Let us know,
-Alex

From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, October 25, 2018 at 9:46 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

please check ApplicationParametersBead and
ApplicationParametersCaseInsensitiveBead

and
https://github.com/apache/royale-asjs/issues/129<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773189910&sdata=9cjEQPsYeM58Q%2BoI3WgQ%2FX7zGdtOg7oxeX6JytrlsGY%3D&reserved=0>

I still didn't use it so others could hopefully give more detail

Best

Carlos




El jue., 25 oct. 2018 a las 17:36, <ul...@carnet-gmbh.de>> escribió:
Hello,

first of all: Many thanks to all contributers of Apache Royale. It looks very promising.  Thanks.

We have a large set of customer specific Flex applications targeted to Flash output. We are currently evaluating if we can use Royale/JS to replace them without must redevelopment.

Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters and the flashvar within the template? We have some variables filled there (by an Tomcat Server via an JSP page).


App.jsp

var flashvars = {};
flashvars.myvar= '<%=request.getAttribute("someindex")%>';


App.mxml

var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as String;



Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.


CARNET GmbH
Chemnitz, Germany





--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773199919&sdata=tmwcfm0Do6nPkDG%2FcSPHhb8r%2BWHrt%2FCbxTOFQ64uq4g%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773199919&sdata=tmwcfm0Do6nPkDG%2FcSPHhb8r%2BWHrt%2FCbxTOFQ64uq4g%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C4fee32bd9d9b41ba3dbc08d6815d7644%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838635773209924&sdata=2xjcgj29KmAAX2EBpLtIo6JDJiqOmV7OAIazjYTmQAY%3D&reserved=0>


Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Carlos Rovira <ca...@apache.org>.
Oh, that's right...didn't see the solution can be so easy :)

I understand that start() accept parameters right?

thanks! :)

Carlos



El mié., 23 ene. 2019 a las 18:45, Alex Harui (<ah...@adobe.com>) escribió:

> The compiler can’t know to generate that.  The compiler has no idea what
> the html that kicks off the app should look like.  So instead of $body, put
> in what you need.
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, January 23, 2019 at 9:41 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Alex,
>
>
>
> I'm in a similar need than Ulrich to pass some vars in a "flashvars"
> object(to avoid be seen in the url) to our Jewel App.
>
> So I'm reading this thread and taking into account that I use the bead
> (ApplicationParamenterBead), I still can't figure a few things:
>
>
>
> 1.-  I have this in my html template:
>
>
>
>
>
> <body>
>
>
>
> ${body}
>
>
>
> </body>
>
>
>
>
>
> After compilation this generates:
>
>
>
> <*body*>
>    <*script **type=**"text/javascript"*>
>       *new *App().start();
>    </*script*>
>
> </*body*>
>
>
>
> But it should be something like this:
>
>
>
> <body>
>
>        <script type="text/javascript">
>
>               * var flashvars = {};*
>
> *              flashvars.ntuser = "Something";*
>
>               new App().start(*flashvars*);
>
>        </script>
>
> </body>
>
>
>
> in other words, what I really need is compiler can generate this line:
>
>
>
> new App().start(*flashvars*);
>
>
>
> since this other lines:
>
>
>
> *var flashvars = {};*
>
> *              flashvars.ntuser = "Something";*
>
>
>
> Can be written in other part of the template without problem.
>
>
>
> Note that I'm not using mx:Application, so I need to use this with
> j:Application
>
>
>
> thanks
>
>
>
>
>
> El lun., 29 oct. 2018 a las 8:35, <ul...@carnet-gmbh.de>
> escribió:
>
> Hello Alex,
>
>
>
> I can confirm it’s working. Thank you!
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799660901&sdata=H9RDBCj%2Bu8vGQJp%2Fk3WCf%2BeAXBA%2Fsx%2BE2ULvXBZZibc%3D&reserved=0>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Freitag, 26. Oktober 2018 18:10
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> While Flex supported two component sets (MX and Spark) and they were more
> or less interoperable, Royale supports multiple component sets.  There is
> the Basic set, there is Express, Jewel, and the Emulation Components.  Like
> Flex, each component set has a different XML namespace.
>
>
>
> The changes I made last night were to the Application in the MX Emulation
> Components.  So you would need to get the latest nightly build, and your
> application should look something like:
>
>
>
> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799670914&sdata=w7TzZUypWcimlWcPJseSx1M%2BY%2Brx%2FrfpXY2HWFHJBvQ%3D&reserved=0>
> "
>
>                    xmlns:local="*"
>
>                    xmlns:js="library://ns.apache.org/royale/basic
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799670914&sdata=4yF5O%2F7pjIADVj6F%2F5JtxUDukY8KD3zKPI8vCPydaRU%3D&reserved=0>"
>
>
>                    xmlns:mx="library://ns.apache.org/royale/mx
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799680919&sdata=aGp7qLdKtkGnxy%2B0DPVsQi26QqyKcEcClNsvLhATFRk%3D&reserved=0>"
>
>
>                    applicationComplete="complete()"
>
>                    >
>
>
>
> And you won’t need to specify a valuesImpl, the MX Application will take
> care of that.  The emulation components are designed to reduce the amount
> of code changes required to migrate a Flex application to Royale.  The
> Basic components and other components sets are not guaranteed to be
> interoperable with other sets.  Basic’s main goal is to produce the
> smallest, fastest application, but it requires more time to assemble
> exactly the pieces you need.  Express is designed to make it faster to
> build a Basic application but you will pay for some overhead.  Jewel is a
> new look-and-feel and introduces some new UI widgets that didn’t exist in
> Flex.
>
>
>
> Regarding supporting Royale, we are looking for folks like you who want to
> use it and will hopefully contribute to it.  Apache open source projects
> are volunteer-driven.  There is no company like Adobe driving it.  We hope
> that users like yourself will help by, at minimum, using the code and
> providing feedback, but also by providing patches/pull-requests with fixes
> and improvements.  Folks who contribute a series of good patches are
> granted write-access to the repo and then the project and its community
> grows stronger and faster.  So, we hope you will choose to use Apache
> Royale and will help find and fix bugs in the process of getting your
> application to run on Royale.  You can also hire people to help you migrate
> your code and find and fix bugs.  I think there are at least a couple of
> folks who might have extra cycles to help.
>
>
>
> Thanks,
>
> -Alex
>
>
>
>
>
> *From: *"ulrich.mueller@carnet-gmbh.de" <ul...@carnet-gmbh.de>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, October 26, 2018 at 5:29 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hello Alex,
>
>
>
> thanks for the work.
>
>
>
> For testing I have created a most simple app:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799680919&sdata=a99Gd5CvdtB%2Fh2ybTD0PK95mjcMjSs%2FyslufoGzvlHA%3D&reserved=0>
> "
>
>                    xmlns:local="*"
>
>                    xmlns:js="library://ns.apache.org/royale/basic
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799690924&sdata=dd8TWegPCuGJ1yP7GRHfL%2BOFaGRN6BmaKNZbzO8%2Fpqg%3D&reserved=0>"
>
>
>                    applicationComplete="complete()"
>
>                    >
>
>
>
>     <fx:Script>
>
>         <![CDATA[
>
>             protected function complete():void{
>
>                 var foo:String = "test1234";
>
>             }  // breakpoint
>
>         ]]>
>
>     </fx:Script>
>
>
>
>     <js:valuesImpl>
>
>         <js:SimpleCSSValuesImpl />
>
>     </js:valuesImpl>
>
> </js:Application>
>
>
>
>
>
> In index.html I have put after compiling:
>
>
>
> <body>
>
>        <script type="text/javascript">
>
>               var flashvars = {};
>
>               flashvars.ntuser = "Ulrich";
>
>               new TestApp().start(flashvars);
>
>        </script>
>
> </body>
>
>
>
> During debugging (now working 😊 thx ) I could not see ntuser, parameters
> or something. Most likely it did not work as you said it was meant for
> emulation. We have no problem to redevelop some critical parts of the
> applications so here we can stick to native Royale.
>
>
>
> Anyway how can we support the development of Apache Royale in general?
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799690924&sdata=n9vhk3IlIU0tMvW8O0nxZn1TamRdu7344pGTsFkO4iM%3D&reserved=0>
>
>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Freitag, 26. Oktober 2018 08:41
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> I think I understand your workflow.  Since you are generating your own
> html file, you can make it pass the flashvars to the Application.  I just
> pushed a change to make the Application’s parameters writable and allow you
> to pass parameters in through the SystemManager.
>
>
>
> Currently, the body of the html of a Royale app using the emulation
> components looks something like:
>
>
>
> <body>
>
>                 <script type="text/javascript">
>
>                                 new
> MyApp_mx_managers_SystemManager().start();
>
>                 </script>
>
> </body>
>
>
>
> If your JSP generates a variable called flashvars, then you can pass it
> into the “start” method.
>
>
>
> <body>
>
>                 <script type="text/javascript">
>
>                                 new
> MyApp_mx_managers_SystemManager().start(flashvars);
>
>                 </script>
>
> </body>
>
>
>
> There might be a few other bugs to work out once you get to the point of
> actually trying this code.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *"ulrich.mueller@carnet-gmbh.de" <ul...@carnet-gmbh.de>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, October 25, 2018 at 10:26 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hello,
>
>
>
> the current workflow for some applications for our customers:
>
>
>
>
>
> https://some-tomcat.local/blazeds/App/App.jsp
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799700938&sdata=Gvzl14F3bACW9U82xL2vjoOT3yCor2CymgKgr0z4zzA%3D&reserved=0>
>
>
>
> ·       The .jsp file is practically the .html template (from Flash
> Builder)
>
> ·       We employ flashvars to configure the applications without using
> URL parameters that can be seen by users
>
> ·       The Tomcat is used to call Waffle to find out the current Windows
> Domain User (https://github.com/Waffle/waffle
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799700938&sdata=mXTJJNuHQDwtrm19kGuPvsZJmtNL8TY1LxJiNDpVB%2B8%3D&reserved=0>
> )
>
> ·       The user information is passed to the SWF
>
>
>
> <script type="text/javascript">
>
>             // For version detection, set to min. required Flash Player
> version, or 0 (or 0.0.0), for no version detection.
>
>             var swfVersionStr = "11.1.0";
>
>             // To use express install, set to playerProductInstall.swf,
> otherwise the empty string.
>
>             var xiSwfUrlStr = "playerProductInstall.swf";
>
>             var flashvars = {};
>
>
>
> *            flashvars.user = '<%=request.getAttribute("ntuser")%>';  //
> created by Waffle filter and some processing*
>
>
>
>             var params = {};
>
>             params.quality = "high";
>
>             params.bgcolor = "#ffffff";
>
>             params.allowscriptaccess = "sameDomain";
>
>             params.allowfullscreen = "true";
>
>             var attributes = {};
>
>             attributes.id
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.id&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799710938&sdata=%2F%2Bj93nwmZ1u%2Bq6Bihtx%2FYDtzPViu7lhkgBuXU2Vmu8o%3D&reserved=0>
> = "MyApp";
>
>             attributes.name
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.name&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799710938&sdata=qZ7KUm9jhrPFdYZOJ2ANeEJZ%2BpsKEDAjtlzauFZ5ySo%3D&reserved=0>
> = "MyApp";
>
>             attributes.align = "middle";
>
>             swfobject.embedSWF(
>
>                 "MyApp.swf", "flashContent",
>
>                 "100%", "100%",
>
>                 swfVersionStr, xiSwfUrlStr,
>
>                 *flashvars*, params, attributes);
>
>             // JavaScript enabled so display the flashContent div in case
> it is not replaced with a swf object.
>
>             swfobject.createCSS("#flashContent",
> "display:block;text-align:left;");
>
> </script>
>
>
>
>
>
> App.mxml
>
>
>
> var user:String = FlexGlobals.topLevelApplication.parameters.*user* as
> String;
>
> // Show user specific data …
>
>
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
> www.carnet-gmbh.de
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799720952&sdata=cQwYAewg9leHpl1z%2FPmS0Z2rJgFXuirbmeRI2FxNLN4%3D&reserved=0>
>
>
>
>
>
>
>
> *Von:* Alex Harui <ah...@adobe.com>
> *Gesendet:* Donnerstag, 25. Oktober 2018 19:47
> *An:* users@royale.apache.org
> *Betreff:* Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Those beads or their equivalent are baked in to the emulation components.
>
>
>
> FlexGlobals.topLevelApplication.parameters exists in the emulation
> components.  It may not be wired up correctly yet, but if not, it will be.
> However, it will be wired by default to the URL parameters for the hosting
> webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting
> web page has set up your flashvars to be different from the URL parameters
> then you may tweak some code in the hosting web page.  If this is the case,
> can you share more about how you determine your flashvars?  I couldn’t
> quite get it from the snippets you provided.  It wasn’t clear if the JSP
> was putting the flashvars into a global or local variable and when it got
> passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe
> we’ll make it so the parameters first look for a global flashvars variable
> or something like that.
>
>
>
> Let us know,
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, October 25, 2018 at 9:46 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: How to use FlexGlobals.topLevelApplication.parameters?
> Alternatives?
>
>
>
> Hi Ulrich,
>
>
>
> please check ApplicationParametersBead and
>
> ApplicationParametersCaseInsensitiveBead
>
>
>
> and
>
> https://github.com/apache/royale-asjs/issues/129
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799720952&sdata=6HDCMr55eqYQ%2Bvx6vhDv76tluE%2FCoBXZcXnluhkoVOs%3D&reserved=0>
>
>
>
> I still didn't use it so others could hopefully give more detail
>
>
>
> Best
>
>
>
> Carlos
>
>
>
>
>
>
>
>
>
> El jue., 25 oct. 2018 a las 17:36, <ul...@carnet-gmbh.de>
> escribió:
>
> Hello,
>
>
>
> first of all: Many thanks to all contributers of Apache Royale. It looks
> very promising.  Thanks.
>
>
>
> We have a large set of customer specific Flex applications targeted to
> Flash output. We are currently evaluating if we can use Royale/JS to
> replace them without must redevelopment.
>
>
>
> Is there an infrastructure to use
> FlexGlobals.topLevelApplication.parameters and the flashvar within the
> template? We have some variables filled there (by an Tomcat Server via an
> JSP page).
>
>
>
>
>
> App.jsp
>
>
>
> var flashvars = {};
>
> flashvars.myvar= '<%=request.getAttribute("someindex")%>';
>
>
>
>
>
> App.mxml
>
>
>
> var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as
> String;
>
>
>
>
>
>
>
> Mit freundlichen Grüßen / Best regards
>
>
>
> Ulrich Müller
>
> Dipl. Inf.
>
>
>
>
>
> CARNET GmbH
>
> Chemnitz, Germany
>
>
>
>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799730956&sdata=B9x6DZRzZ8hiedD1EuCW4uxRN6DjvS%2Fmd1wAgUtgYxA%3D&reserved=0>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799730956&sdata=B9x6DZRzZ8hiedD1EuCW4uxRN6DjvS%2Fmd1wAgUtgYxA%3D&reserved=0>
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Posted by Alex Harui <ah...@adobe.com>.
The compiler can’t know to generate that.  The compiler has no idea what the html that kicks off the app should look like.  So instead of $body, put in what you need.

-Alex

From: Carlos Rovira <ca...@apache.org>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, January 23, 2019 at 9:41 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Alex,

I'm in a similar need than Ulrich to pass some vars in a "flashvars" object(to avoid be seen in the url) to our Jewel App.
So I'm reading this thread and taking into account that I use the bead (ApplicationParamenterBead), I still can't figure a few things:

1.-  I have this in my html template:


<body>

${body}

</body>


After compilation this generates:


<body>
   <script type="text/javascript">
      new App().start();
   </script>

</body>

But it should be something like this:

<body>
       <script type="text/javascript">
              var flashvars = {};
              flashvars.ntuser = "Something";
              new App().start(flashvars);
       </script>
</body>

in other words, what I really need is compiler can generate this line:

new App().start(flashvars);

since this other lines:

var flashvars = {};
              flashvars.ntuser = "Something";

Can be written in other part of the template without problem.

Note that I'm not using mx:Application, so I need to use this with j:Application

thanks


El lun., 29 oct. 2018 a las 8:35, <ul...@carnet-gmbh.de>> escribió:
Hello Alex,

I can confirm it’s working. Thank you!


Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799660901&sdata=H9RDBCj%2Bu8vGQJp%2Fk3WCf%2BeAXBA%2Fsx%2BE2ULvXBZZibc%3D&reserved=0>



Von: Alex Harui <ah...@adobe.com>>
Gesendet: Freitag, 26. Oktober 2018 18:10
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

While Flex supported two component sets (MX and Spark) and they were more or less interoperable, Royale supports multiple component sets.  There is the Basic set, there is Express, Jewel, and the Emulation Components.  Like Flex, each component set has a different XML namespace.

The changes I made last night were to the Application in the MX Emulation Components.  So you would need to get the latest nightly build, and your application should look something like:

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799670914&sdata=w7TzZUypWcimlWcPJseSx1M%2BY%2Brx%2FrfpXY2HWFHJBvQ%3D&reserved=0>"
                   xmlns:local="*"
                   xmlns:js="library://ns.apache.org/royale/basic<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799670914&sdata=4yF5O%2F7pjIADVj6F%2F5JtxUDukY8KD3zKPI8vCPydaRU%3D&reserved=0>"
                   xmlns:mx="library://ns.apache.org/royale/mx<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799680919&sdata=aGp7qLdKtkGnxy%2B0DPVsQi26QqyKcEcClNsvLhATFRk%3D&reserved=0>"
                   applicationComplete="complete()"
                   >

And you won’t need to specify a valuesImpl, the MX Application will take care of that.  The emulation components are designed to reduce the amount of code changes required to migrate a Flex application to Royale.  The Basic components and other components sets are not guaranteed to be interoperable with other sets.  Basic’s main goal is to produce the smallest, fastest application, but it requires more time to assemble exactly the pieces you need.  Express is designed to make it faster to build a Basic application but you will pay for some overhead.  Jewel is a new look-and-feel and introduces some new UI widgets that didn’t exist in Flex.

Regarding supporting Royale, we are looking for folks like you who want to use it and will hopefully contribute to it.  Apache open source projects are volunteer-driven.  There is no company like Adobe driving it.  We hope that users like yourself will help by, at minimum, using the code and providing feedback, but also by providing patches/pull-requests with fixes and improvements.  Folks who contribute a series of good patches are granted write-access to the repo and then the project and its community grows stronger and faster.  So, we hope you will choose to use Apache Royale and will help find and fix bugs in the process of getting your application to run on Royale.  You can also hire people to help you migrate your code and find and fix bugs.  I think there are at least a couple of folks who might have extra cycles to help.

Thanks,
-Alex


From: "ulrich.mueller@carnet-gmbh.de<ma...@carnet-gmbh.de>" <ul...@carnet-gmbh.de>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, October 26, 2018 at 5:29 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hello Alex,

thanks for the work.

For testing I have created a most simple app:

<?xml version="1.0" encoding="utf-8"?>

<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799680919&sdata=a99Gd5CvdtB%2Fh2ybTD0PK95mjcMjSs%2FyslufoGzvlHA%3D&reserved=0>"
                   xmlns:local="*"
                   xmlns:js="library://ns.apache.org/royale/basic<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fbasic&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799690924&sdata=dd8TWegPCuGJ1yP7GRHfL%2BOFaGRN6BmaKNZbzO8%2Fpqg%3D&reserved=0>"
                   applicationComplete="complete()"
                   >

    <fx:Script>
        <![CDATA[
            protected function complete():void{
                var foo:String = "test1234";
            }  // breakpoint
        ]]>
    </fx:Script>

    <js:valuesImpl>
        <js:SimpleCSSValuesImpl />
    </js:valuesImpl>
</js:Application>


In index.html I have put after compiling:

<body>
       <script type="text/javascript">
              var flashvars = {};
              flashvars.ntuser = "Ulrich";
              new TestApp().start(flashvars);
       </script>
</body>

During debugging (now working 😊 thx ) I could not see ntuser, parameters or something. Most likely it did not work as you said it was meant for emulation. We have no problem to redevelop some critical parts of the applications so here we can stick to native Royale.

Anyway how can we support the development of Apache Royale in general?


Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799690924&sdata=n9vhk3IlIU0tMvW8O0nxZn1TamRdu7344pGTsFkO4iM%3D&reserved=0>




Von: Alex Harui <ah...@adobe.com>>
Gesendet: Freitag, 26. Oktober 2018 08:41
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

I think I understand your workflow.  Since you are generating your own html file, you can make it pass the flashvars to the Application.  I just pushed a change to make the Application’s parameters writable and allow you to pass parameters in through the SystemManager.

Currently, the body of the html of a Royale app using the emulation components looks something like:

<body>
                <script type="text/javascript">
                                new MyApp_mx_managers_SystemManager().start();
                </script>
</body>

If your JSP generates a variable called flashvars, then you can pass it into the “start” method.

<body>
                <script type="text/javascript">
                                new MyApp_mx_managers_SystemManager().start(flashvars);
                </script>
</body>

There might be a few other bugs to work out once you get to the point of actually trying this code.

HTH,
-Alex

From: "ulrich.mueller@carnet-gmbh.de<ma...@carnet-gmbh.de>" <ul...@carnet-gmbh.de>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, October 25, 2018 at 10:26 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hello,

the current workflow for some applications for our customers:


https://some-tomcat.local/blazeds/App/App.jsp<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsome-tomcat.local%2Fblazeds%2FApp%2FApp.jsp&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799700938&sdata=Gvzl14F3bACW9U82xL2vjoOT3yCor2CymgKgr0z4zzA%3D&reserved=0>


•       The .jsp file is practically the .html template (from Flash Builder)

•       We employ flashvars to configure the applications without using URL parameters that can be seen by users

•       The Tomcat is used to call Waffle to find out the current Windows Domain User (https://github.com/Waffle/waffle<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FWaffle%2Fwaffle&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799700938&sdata=mXTJJNuHQDwtrm19kGuPvsZJmtNL8TY1LxJiNDpVB%2B8%3D&reserved=0>)

•       The user information is passed to the SWF

<script type="text/javascript">
            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
            var swfVersionStr = "11.1.0";
            // To use express install, set to playerProductInstall.swf, otherwise the empty string.
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {};

            flashvars.user = '<%=request.getAttribute("ntuser")%>';  // created by Waffle filter and some processing

            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var attributes = {};
            attributes.id<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.id&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799710938&sdata=%2F%2Bj93nwmZ1u%2Bq6Bihtx%2FYDtzPViu7lhkgBuXU2Vmu8o%3D&reserved=0> = "MyApp";
            attributes.name<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fattributes.name&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799710938&sdata=qZ7KUm9jhrPFdYZOJ2ANeEJZ%2BpsKEDAjtlzauFZ5ySo%3D&reserved=0> = "MyApp";
            attributes.align = "middle";
            swfobject.embedSWF(
                "MyApp.swf", "flashContent",
                "100%", "100%",
                swfVersionStr, xiSwfUrlStr,
                flashvars, params, attributes);
            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>


App.mxml

var user:String = FlexGlobals.topLevelApplication.parameters.user as String;
// Show user specific data …




Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.

CARNET GmbH
Chemnitz, Germany
www.carnet-gmbh.de<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.carnet-gmbh.de%2F&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799720952&sdata=cQwYAewg9leHpl1z%2FPmS0Z2rJgFXuirbmeRI2FxNLN4%3D&reserved=0>



Von: Alex Harui <ah...@adobe.com>>
Gesendet: Donnerstag, 25. Oktober 2018 19:47
An: users@royale.apache.org<ma...@royale.apache.org>
Betreff: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Those beads or their equivalent are baked in to the emulation components.

FlexGlobals.topLevelApplication.parameters exists in the emulation components.  It may not be wired up correctly yet, but if not, it will be.  However, it will be wired by default to the URL parameters for the hosting webpage.  I don’t think we’ve dealt with flashvars yet.  If your hosting web page has set up your flashvars to be different from the URL parameters then you may tweak some code in the hosting web page.  If this is the case, can you share more about how you determine your flashvars?  I couldn’t quite get it from the snippets you provided.  It wasn’t clear if the JSP was putting the flashvars into a global or local variable and when it got passed to the SWFObject.  There won’t be a SWFObject in Royale.  Maybe we’ll make it so the parameters first look for a global flashvars variable or something like that.

Let us know,
-Alex

From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, October 25, 2018 at 9:46 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: How to use FlexGlobals.topLevelApplication.parameters? Alternatives?

Hi Ulrich,

please check ApplicationParametersBead and
ApplicationParametersCaseInsensitiveBead

and
https://github.com/apache/royale-asjs/issues/129<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F129&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799720952&sdata=6HDCMr55eqYQ%2Bvx6vhDv76tluE%2FCoBXZcXnluhkoVOs%3D&reserved=0>

I still didn't use it so others could hopefully give more detail

Best

Carlos




El jue., 25 oct. 2018 a las 17:36, <ul...@carnet-gmbh.de>> escribió:
Hello,

first of all: Many thanks to all contributers of Apache Royale. It looks very promising.  Thanks.

We have a large set of customer specific Flex applications targeted to Flash output. We are currently evaluating if we can use Royale/JS to replace them without must redevelopment.

Is there an infrastructure to use FlexGlobals.topLevelApplication.parameters and the flashvar within the template? We have some variables filled there (by an Tomcat Server via an JSP page).


App.jsp

var flashvars = {};
flashvars.myvar= '<%=request.getAttribute("someindex")%>';


App.mxml

var myvar:String = FlexGlobals.topLevelApplication.parameters.myvar as String;



Mit freundlichen Grüßen / Best regards

Ulrich Müller
Dipl. Inf.


CARNET GmbH
Chemnitz, Germany





--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799730956&sdata=B9x6DZRzZ8hiedD1EuCW4uxRN6DjvS%2Fmd1wAgUtgYxA%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C70a5c08c7ccb4642d6a208d68159fb02%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636838620799730956&sdata=B9x6DZRzZ8hiedD1EuCW4uxRN6DjvS%2Fmd1wAgUtgYxA%3D&reserved=0>