Flex properties file

Hi. I've got some URL's in my Flex app that I'd like to pull
into a properties file; the values will differ between our
development and production systems. How do you get/set a properties
file in Flex? Thanks.

The Flex project properties files do not exist at run-time.
Are you speaking in general, of needing to initialize your
application at run time with some values?
The simplest way to do this is to pass the values into the
Flex app from the html wrapper, via flashvars. You just need a
different version of the wrapper for each different deployment.
This is the way I do it. It also makes it easy to have different
launch configurations in FlexBuilder.
Another solution is to use HTTPService to load an xml file
containing your initialization data. Of course that way you have to
have an URL for the HTTPService...
Tracy

Similar Messages

  • How to read JBoss server 'app.properties' file in the deployed Flex application?

    Hi, my current Flex project is using LCDS server to make call (Remote object call and Data managements services' call) to the backend Java services and consume data to render. I have defined the AMF and RTMP channels in the services-config.xml file and destinations for the Java services' in the remoting-config.xml and data-management-config.xml files.
         <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://localhost:8080/eqcFlex/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>false</polling-enabled>
                </properties>
         </channel-definition>
    As of now both the Flex application WAR file and Java services EAR files are depolyed on the JBoss server on my machine, therefore I can hardcode the endpoint URL as http://localhost:8080 in the services-config file and hit the Java services.
    But the requirement is that the Flex application WAR file needs to be deployed on JBoss servers deployed on different machines and hence the endpoint URL cann't be hardcoded in the services-config.xml file. Is there a way we can pick up the endpoint URL from the JBoss server's app.properties file so that we can dynamically create channels in Actionscript code and make call to the backend services with dynamic endpoint URL?

    But in Command prompt I found out that My properties file by name
    'cedrelay.properties' is not recognised by web.xml.My web.xml structure is
    How does web.xml "recognize" anything?
    You specify the properties file as an init parameter. Do you read it in the init method of the servlet? If so, what does the code look like for reading the properties file?
    You'll have better luck if you put that properties file in WEB-INF/classes and load it as a resource input stream from the CLASSPATH.
    %

  • [svn] 1978: Bug: vendors. properties file which is used in vendor specific login commands was not being read properly and as a result some login related error messages were not being displayed correctly .

    Revision: 1978
    Author: [email protected]
    Date: 2008-06-06 08:05:34 -0700 (Fri, 06 Jun 2008)
    Log Message:
    Bug: vendors.properties file which is used in vendor specific login commands was not being read properly and as a result some login related error messages were not being displayed correctly.
    QA: Yes - we need automated tests to make sure that errors.properties and vendors.properties in BlazeDS/LCDS are loaded properly.
    Doc: No
    Modified Paths:
    blazeds/branches/3.0.x/modules/common/src/java/flex/messaging/util/PropertyStringResource Loader.java
    blazeds/branches/3.0.x/modules/opt/src/jrun/flex/messaging/security/JRunLoginCommand.java
    blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. java

    I have a lot of grief with this version of Windows Media Player.
    It is very buggy and frustrating to use.
    I have my Music library on a QNAP NAS, which is as reliable as they come.
    System notifications make it not save changes.  It also does not do a good job of interpreting albums and artists from folders.  Changes to track names are not saved, nor are tracks moved to other albums, renamed albums, changes to genre, artist
    or date.  It separates and merges albums/tracks without sense or reason.  Some changes I've made up to 4 times, then closed WMP and re-started my machine to check if it has/hasn't saved the changes.  Often it has not.
    This is the first time I've used WMP in this capacity, and I do not recommend it.
    New service pack please.

  • [svn] 2200: The main package will now also include the ja swc' s and properties files.

    Revision: 2200
    Author: [email protected]
    Date: 2008-06-24 07:46:04 -0700 (Tue, 24 Jun 2008)
    Log Message:
    The main package will now also include the ja swc's and properties files.
    -it will not include the samples, these will still be in the ja zip
    bug:http://bugs.adobe.com/jira/browse/SDK-15852
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-15852
    Modified Paths:
    flex/sdk/branches/3.0.x/build.xml

    Hi,
    First up thanks for helping out, I really appreciate it.
    Is there a way to change that or should I simply add the file to the Classpath?
    The config file at present sits in c:\Temp\ESFGFL\servicelayer\config\maysqlconfig.properties with the code in the servicelayer directory.
    My classpath is set as .;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\Program Files\Java\jre6\lib\javamail-1.4.2\mail.jar
    What do I need to change here? Ultimately te code will be on a servera nd so will the config file but learning some lessons by testing locally is proving invaluable.
    Thanks again for your help
    nathj

  • [svn:bz-trunk] 9665: Fix minor typo in errors.properties file.

    Revision: 9665
    Author:   [email protected]
    Date:     2009-08-26 14:13:27 -0700 (Wed, 26 Aug 2009)
    Log Message:
    Fix minor typo in errors.properties file. Change "wilcard" to "wildcard" in the following error string.
    10560=Attempt to subscribe to the subtopic, '''', on destination, '''', that does not allow wilcard subtopics failed.
    Checkintests: passed
    Modified Paths:
        blazeds/trunk/modules/common/src/flex/messaging/errors.properties
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/dynamicDestinat ions/subtopicsEnabledWildcardsNotAllowed.mxml

    onearm wrote:
    Svn revision 442 doesn't compile on Arch64:
    [ 4%] [ 5%] Building CXX object src/CMakeFiles/guayadeque.dir/AlListBox.o
    Building CXX object src/CMakeFiles/guayadeque.dir/ArListBox.o
    In file included from /tmp/yaourt-tmp-gianluca/aur-guayadeque-svn/guayadeque-svn/src/guayadeque/Trunk/src/LastFMPanel.h:25,
    from /tmp/yaourt-tmp-gianluca/aur-guayadeque-svn/guayadeque-svn/src/guayadeque/Trunk/src/MainFrame.h:27,
    from /tmp/yaourt-tmp-gianluca/aur-guayadeque-svn/guayadeque-svn/src/guayadeque/Trunk/src/AlListBox.cpp:27:
    /tmp/yaourt-tmp-gianluca/aur-guayadeque-svn/guayadeque-svn/src/guayadeque/Trunk/src/PlayerPanel.h:25:28: error: AutoScrollText.h: No such file or directory
    [ 7%] Building CXX object src/CMakeFiles/guayadeque.dir/ArrayStringArray.o
    [ 8%] Building CXX object src/CMakeFiles/guayadeque.dir/AudioScrobble.o
    make[2]: *** [src/CMakeFiles/guayadeque.dir/AlListBox.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[1]: *** [src/CMakeFiles/guayadeque.dir/all] Error 2
    make: *** [all] Error 2
    Thanks for the bug report. It was a test i was doing but finally decided to not include it but left this line by error.
    It have been fixed in svn 443.
    Thanks again

  • [svn:fx-trunk] 8057: Some errant renames in the project properties files.

    Revision: 8057
    Author:   [email protected]
    Date:     2009-06-22 12:27:26 -0700 (Mon, 22 Jun 2009)
    Log Message:
    Some errant renames in the project properties files.
    Modified Paths:
        flex/sdk/trunk/development/eclipse/flex/airframework/.actionScriptProperties
        flex/sdk/trunk/development/eclipse/flex/flash-integration/.project
        flex/sdk/trunk/development/eclipse/flex/sparkTest/.actionScriptProperties

    Thats good news.

  • Flex properties panel

    Hi,
    I am try to create a test application with the flexbuilder
    plugin. But when I look into the Flex properties panel I see only
    basic properties. I have already re-install the flex builder to
    lookup the details of the properties panel without success.
    I don't see in the properties panel the "Styles", "layout"
    and other advanced options... How can I get those settings back.
    Or where can I put those settings on.
    Regards,
    Guy

    The "Specific component with style name" acts as a hint to
    CSS Design View and serves to document the purpose of the style.
    However, Flex itself ignores the component name portion of the
    name.
    So, if you have Label.myLabel{} in a css file and open that
    file in CSS Design View, you will see a preview of that style with
    a Label as the sample component. If you have just myLabel{}, CSS
    Design View will not know what to use as the sample component, so
    you would need to select the sample component from the combo box at
    the top of CSS Design View.
    In the MXML source code, Flex considers Label.myLabel and
    myLabel to be the same thing. This is a limitation of Flex and the
    MXML compiler. It ignores all characters before the dot in the
    style name.
    So, the Label.myLabel syntax is only useful in Flex Builder
    CSS Design View. It saves you from having to select Label as the
    sample component. We also consider it to be a good practice because
    it makes it clear from the name that the style is intended for use
    with a Label and not some other kinds of components.
    -- Greg Dow
    -- Adobe Flex Builder Team

  • Help with localization of a unicode .properties file

    Hi everyone, this is my first time posting anything.  I've googled like crazy but can't find an answer but if this is a repeat just forward me on along to the right spot!
    I'm using Flex Builder 3 for this project.
    We have several .properties files set up that we're converting to Russian.  I have the file set as UTF-8 encoding.  I use the mxmlc command to convert this to a SWF just like we do for our other languages.
    %flex_location%\mxmlc -locale=ru_RU -source-path=%viewMap_resource_sourcePath%\locale\{locale} -include-
    resource-bundles=collections,containers,controls,core,effects,skins,styles,ViewMapBundleSt ringResources
    -output %onefourtwo_loc%\core\framework\NxFramework\bin-
    debug\locale\strings\ViewMapBundleStringResources_ru_RU.swf
    In the code, I call something along the lines of:
    toolBar.title = ResourceManager.getInstance().getString(
    'ViewMapBundleStringResources', 'VIEW_SELECT_TOOLBAR_TITLE');
    this works for every other language, but none of our other languages are Unicode.  In this case, I get null back as the title.
    Any idea what could be going on here?  It seems like something is lost in the conversion from the properties file to a swf.  Like maybe I need to set the encoding somewhere else?  I've run the copylocale command so I have a russian folder in my flex folders, I'm generating the russian swf file and it has a decent size to it, comparable to the English version, just a little bigger.  I have Russian set as my locale, and my browser is displaying russian for sites like Google.  I'm running firefox although we support IE as well.
    Any advice would be helpful, we've been banging our heads on this one for a while!

    We actually got this working just in case any one else runs into this, I had it ENCODED to UTF-8, we actually needed to CONVERT it to UTF-8.  We did this through notepad++ and recompiled and everything is working fine now.

  • [svn:fx-trunk] 8056: More updated project properties files for the sparkTest project.

    Revision: 8056
    Author:   [email protected]
    Date:     2009-06-22 12:13:58 -0700 (Mon, 22 Jun 2009)
    Log Message:
    More updated project properties files for the sparkTest project.
    Modified Paths:
        flex/sdk/trunk/development/eclipse/flex/sparkTest/.actionScriptProperties
        flex/sdk/trunk/development/eclipse/flex/sparkTest/.project

    Thats good news.

  • Flex Locale Files, add langauges such as Welsh

    Hello All.
    Being a Welsh man and trying to create a little flex application that i intend allowing the user to change its language i have come across a problem in adding extra languages.
    I can add English, French, Spanish etc because in the following directory C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0\frameworks\locale
    I have a number of differnt languages.
    I have then created customStrings.properties files so that i can create my own terms.  In my application i then give a label the following text attribute
    {resourceManager.getString('customStrings','helloWorld')}
    Which looks at my customStrings file and checks for the hellowWorld tag and then prints the relevant word.
    My problem comes when i want to add languages like welsh which is not listed in the C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.1.0\frameworks\locale  directory.
    Is it possible to create a standard locale file here so i can add languages files for welsh etc?
    Thanks in advance!!

    Hi,
    To add another locale to the SDK you should use the 'copylocal' application found in the sdk directory in the \bin directory.
    You should duplicate a locale and create your local in the sdk, for example: bin\copylocal en_US we_WE and them add the local in the project configuration file.
    You can find the details here: http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_1.html
    Lior

  • [svn:fx-trunk] 8055: Updating development project properties files.

    Revision: 8055
    Author:   [email protected]
    Date:     2009-06-22 12:10:47 -0700 (Mon, 22 Jun 2009)
    Log Message:
    Updating development project properties files.
    Modified Paths:
        flex/sdk/trunk/development/eclipse/flex/airframework/.project
        flex/sdk/trunk/development/eclipse/flex/spark/.actionScriptProperties
        flex/sdk/trunk/development/eclipse/flex/spark/.flexLibProperties
        flex/sdk/trunk/development/eclipse/flex/spark/.project

    I had downloaded it for test, and requested for evaluation license...
    But I haven't got license, and also I am not able to find Flash Builder Plugins from HFCD site....
    I think those plugins are removed from site....
    Please help me, if anyone have those plugins...

  • [svn:fx-trunk] 11314: add the empty properties file to svn to fix the build .properties

    Revision: 11314
    Author:   [email protected]
    Date:     2009-10-30 10:38:34 -0700 (Fri, 30 Oct 2009)
    Log Message:
    add the empty properties file to svn to fix the build.properties
    QE notes: 
    Doc notes:
    Bugs: fix the build
    Reviewer: Pete
    Tests run: checkintests
    Is noteworthy for integration: no
    Added Paths:
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/de_DE/empty.properties
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/fr_FR/empty.properties
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/ja_JP/empty.properties
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/ru_RU/empty.properties
        flex/sdk/trunk/frameworks/projects/playerglobal/bundles/zh_CN/empty.properties

    Thats good news.

  • Error reading properties file upon deployment

    hi. i'm still relatively new with regards to the Java programming language. in any case... i am developing a simple project wherein the application has to make a database connection to a server. the application is finished already however.. i am having problems deploying it.
    my project has a "resources" package containing the file "config.properties" which contains various information (connection details among others). correct me if im doing something wrong, but in deploying in, i copied the "dist" folder of my compiled code and then tried to run the java exe independently which resulted in an error. i already tried copying the "config.properties" file to the dist folder and even creating a "resources\config.properties" file but it still results in an error. could you please help me figure out how to deploy the application with the properties file. the code i used in referencing my .properties file is as follows:
    Properties configFile = new Properties();
                configFile.load(this.getClass().getClassLoader().getResourceAsStream("Resources\\config.properties"));
                String username = configFile.getProperty("username");
                String password = configFile.getProperty("password");
                String url = configFile.getProperty("url");
                String dbtype = configFile.getProperty("dbtype");
                Class.forName(dbtype);
                conn = DriverManager.getConnection(url, username, password); thanks in advance. ^^

    thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
    configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
    Edited by: xnofate on Sep 23, 2008 6:21 PM

  • Error reading Properties file

    I have a main method which i am using to call a servlet located in the same Development Component. Until recently i had the servlet location hard coded and it was working without issues. Now i decided to make the location configurable. For this i created an sap.application.global.properties file in the EAR DC which contains the WAR of this DC.
    The contents of the above file are as follows:
    SAP application properties
    SERVLET.LOCATION=http://<server-name>/ControllerServlet/servlet/com.nike.xapps.eqptsp.swem.controller.ControllerServlet
    The code i am using in the main method to call this properties file and access the property is as follows:
    Context ctx = new InitialContext();
    ApplicationConfigHandlerFactory cfgHdlr = (ApplicationConfigHandlerFactory)ctx.lookup("ApplicationConfiguration");          
    Properties props = cfgHdlr.getApplicationProperties();
    String servlet = props.getProperty("SERVLET.LOCATION");
    contained in a try...catch block.
    On dubugging i get a NoInitialContextException repeatedly in the statement where the lookup is performed.
    These are all the additions i have made for reading this properties file. Does anyone know if there is anything more that needs to be done for this to work.
    Thanks,
    Murtaza.

    thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
    configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
    Edited by: xnofate on Sep 23, 2008 6:21 PM

  • Display data on ADF table using a VO binded to a message.properties file

    Hi,
    I want to display data in a JSPX page using ADF table which is based on a ViewObject. The attributes of the ViewObject should get it's value from a abc.properties file(static file).How can i achieve this.
    thanks in advance.
    regards,
    Himanshu.

    Hi Himanshu,
    When you create a VO based on static values, all of the records from your VO are generated into the MessageBundel.properties file like this
    devguide.entity.ViewObj.SL_0_0=1
    devguide.entity.ViewObj.SL_0_1=<val1>
    devguide.entity.ViewObj.SL_0_2=<val2>
    devguide.entity.ViewObj.SL_1_0=2
    devguide.entity.ViewObj.SL_1_1=<val1>
    devguide.entity.ViewObj.SL_1_2=<val2>
    You could add more lines to the properties files maintaining the same pattern. Also noticed that you can read all the values from a CSV file as well.
    The last resource is to programmatically read the file and start creating new rows on the VO, which won't use any of the declarative tools for VOs.
    -Juan Camilo.

Maybe you are looking for

  • How do i remove an email account from the app store on my macbook?

    When my Macbook was set up at my company the tech updated Photobooth with his iTunes account email address. I want to get rid of his account and use mine. I can't find a simple solution on line. Suggestions please!

  • How to export from Final Cut Pro after downloading Maverick

    Final Cut Pro no longer exports after installing Maverick.  I get this: The operation couldn't be completed. (com.apple.Compressor.CompressorKit.ErrorDomain error -1.)  - have paid for Compressor and instaled it - but it makes no difference.

  • Key volume button not working

    Recently installed SSD and now my volume keys are not working. In/outputs seem to be fine. Any ideas

  • Problem in creating DLL for a LabVIEW VI

    Hi I am facing problems in creating DLL for a LabVIEW VI. Previously i had no problems in creating DLL for the VI that transmits a message from serial port to NI - PXI 7831-R Reconfigurable I/O card (configured by FPGA MOdule). When i try the same VI

  • Strange phone setup in new build

    Just moved into a brand new house and while trying to improve my (dreadful) broadband speed came across what I think might be incorrect wiring of the telephone system. My setup is as follows: The BT drop wire comes out from undergound in a grey BT br