You can turn off CORS restrictions for localhost in your browser. That might make development easier.
Harbs > On May 4, 2024, at 11:11 PM, MARK HARTNETT <m_hartn...@comcast.net> wrote: > > The CORs policy restricts unknown servers from exchanging data. Tomcat needs > a CorsFilter.jar and CorsFilter defined in the Tomcat6/conf/Web.xml and an > entry for localhost:3000. I did that and still the same error. > > When I press the login button, the connection is actually successful. I see > it in the db log. > Somewhere between the connection and the return the cors error is thrown. > "http://localhost:3000' has been blocked by CORS policy" - Seems to say > Tomcat did the blocking > > It's funny that I need to get by the login screen to work on the rest of the > system. > > Access to XMLHttpRequest at > 'http://localhost:8080/rootmodel/securityCommand.flex?reqType=login&userId=randy&userPwd=steak' > from origin 'http://localhost:3000' has been blocked by CORS policy: No > 'Access-Control-Allow-Origin' header is present on the requested resource. > >> On 05/04/2024 8:47 AM EDT MARK HARTNETT <m_hartn...@comcast.net> wrote: >> >> >> Hi all, >> >> My db server is up and running on 8080 and I get CORS policy: No >> 'Access-Control-Allow-Origin' error on connection. I'm guessing this is a >> server setting but I haven't been able to find the solution. >> >> Access to XMLHttpRequest at >> 'http://localhost:8080/rootmodel/securityCommand.flex?reqType=login&userId=randy&userPwd=steak' >> from origin 'http://localhost:3000' has been blocked by CORS policy: No >> 'Access-Control-Allow-Origin' header is present on the requested resource. >> >> Thanks >>> On 05/04/2024 8:36 AM EDT MARK HARTNETT <m_hartn...@comcast.net> wrote: >>> >>> >>> Almost every error has been a null reference and Iv'e either moved the code >>> to creationComplete or did as did as Maria said used ternary statements. >>> >>> The spark and mx comboBox always fails when the dataProvider is initially >>> null. The JS checks to see if the labelField is blank and adds "label" as >>> the labelField. (I think it's supposed to exit here)The the dp is accesed >>> using the labelField and throws an error. >>> >>> I switched to the Jewel comboBox and all of the null errors disappeared but >>> a lot of extra attribute errors. I have a lot of ComboBoxes with some >>> special functionality so I extended the Jewel CB and added some attributes >>> that get created as beads if not null. I did a global change from >>> s:ComboBox to my extended CL:ComboBox, and the system opened login with no >>> errors in the log. >>> >>> <j:ComboBox xmlns:fx="http://ns.adobe.com/mxml/2009" >>> xmlns:j="library://ns.apache.org/royale/jewel"> >>> >>> <fx:Script> >>> <![CDATA[ >>> [Bindable]public var editable:Boolean = true; >>> [Bindable]public var enabled:Boolean = true; >>> [Bindable]public var selected:Boolean = true; >>> [Bindable]public var restrict:String=null; >>> ]]> >>> </fx:Script> >>> </j:ComboBox> >>> >>> >>> >>>> On 05/02/2024 2:29 PM EDT Maria Jose Esteve <mjest...@iest.com> wrote: >>>> >>>> >>>> Hi Mark, >>>> >>>> I don't know how the binding in Flex worked internally but if gp is null >>>> an error would surely occur, perhaps it was an internal error that was >>>> intercepted but... >>>> >>>> I can share with you how I do it, although I don't know if it is the best >>>> way: >>>> >>>> <ns7:CustomButtonBar id="topCBB" >>>> btnA="['Home','Statistics','Network','MCA Grid']" >>>> btnBoxA="{!gp?[]:[gp.hpc, gp.statisticsCtrl, gp.siteNetworkCtrl, >>>> gp.dgBOX]}" >>>> itemH="36" >>>> fntSz="16"/> >>>> >>>> >>>> Or >>>> btnBoxA="{!gp?null:[gp.hpc, gp.statisticsCtrl, gp.siteNetworkCtrl, >>>> gp.dgBOX]}" >>>> >>>> Or >>>> btnBoxA="{!gp?[null,null,null,null]:[gp.hpc, gp.statisticsCtrl, >>>> gp.siteNetworkCtrl, gp.dgBOX]}" >>>> >>>> >>>> It depends on what works for you. >>>> >>>> >>>> Hiedra >>>> >>>> De: MARK HARTNETT <m_hartn...@comcast.net> >>>> Enviado el: jueves, 2 de mayo de 2024 18:44 >>>> Para: users@royale.apache.org >>>> Asunto: JS questions >>>> >>>> >>>> Hi all, >>>> >>>> All of my errors right now are null references. >>>> >>>> >>>> In this code gp.hpc crashes because hpc is null at this point. >>>> >>>> In Flex, I didn't care about that because once init() was done it was no >>>> longer null. >>>> >>>> >>>> <ns7:CustomButtonBar id="topCBB" >>>> btnA="['Home','Statistics','Network','MCA Grid']" >>>> btnBoxA="{[gp.hpc, gp.statisticsCtrl, gp.siteNetworkCtrl, gp.dgBOX]}" >>>> itemH="36" >>>> fntSz="16"/> >>>> >>>> >>>> With JS the null hpc throws an error. >>>> >>>> Moving those variables to creationComplete solves the problem. >>>> >>>> >>>> What is the difference with JS binding and Flex in terms of timing and >>>> object creation? >>>> >>>> Is there a a bead that allows nulls? >>>> >>>> >>>> Thanks >>>> >>>> >>>>