How to get the properties of application anywhere in the project?

Hello,
Application
     |__Component1
               |___Component2
                             |___Component3 -----> Component4 ( as Popup)
this is the actal scenario in my flex application..
Do you know any best way to access the properties on the Application Object ??
i want to set the popup component in the middle of the browser screen..
for that i have tried the way...
- Component 4
<!-- PopupWindow.mxml -->
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx">
     <s:layout>
          <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
     </s:layout>
     <s:BorderContainer id="bcPopupWindow" width="700" height="500" backgroundAlpha="0.8" borderAlpha="0.5"
                       borderVisible="true" cornerRadius="20" dropShadowVisible="true">
==     Some designing part   ==
     </s:BorderContainer>
</s:Group>
and for showing this
in Component 3 -
protected function btnShowPopup_clickHandler(event:MouseEvent):void
     myPopup= new PopupWindow();
     myPopup.width = this.parent.parent.parent.width;
     myPopup.height =this.parent.parent.parent.height;
     PopUpManager.addPopUp(myPopup,this,true);

hi
try changing this line:
PopUpManager.addPopUp(myPopup,this,true);  //adds popup to current object
to this:
PopUpManager.addPopUp(myPopup, root, true); //adds popup to top level object
it should fix the popup not centering properly - it is centering itself, but with respect to the current visual object (where your open popup code is). changing to root will add the popup to the top level and so centering it there will center it with respect to the application itself.
also, add this line below the one above:
trace(FlexGlobals.topLevelApplication.width);
and see what it traces out (in debug mode) - is it giving the correct value?

Similar Messages

  • How to get the project path ?

    In my servlet, how do I get the project path ?
    I have the following dir structure :
    Web_App
      + build
        lib
      + nbproject
      + src
        test
      + web ( index.jsp , my.jsp , my.html )
        + Dir_Docs ( my file : ABC.txt ) My Servlet is :
    public class My_Servlet extends HttpServlet
      public void init(ServletConfig config) throws ServletException
        super.init(config);
      public void destroy() { }
      protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
        response.setContentType("text/html");
        PrintWriter out=response.getWriter();
        out.println(System.getProperty("user.dir"));   
    }What I got was : C:/apache-tomcat-6.0.14/bin/
    How to get the project path ? Which is : C:/Web_App/ ?

    Yes, config.getServletContext().getRealPath("index.jsp"); got the job done !
    Thanks.

  • How to get the project name in workspace in eclipse?

    Hi,
    I want to get the file in the project in the workspace when eclipse is run time.
    But I don't know how to get?
    Thanks in advance!

    Hi,
    It is a plug-in project.
    I open two eclipse environments.
    one is main environment.
    the other is run time eclipse environment.
    In run time eclipse environment, I have a project.
    In the main environment, I want to access the file in the project in run time eclipse environment.
    How to do it?
    Thanks!

  • How to get the project name in a Reporting Services Report in a Project Site?

    Hi,
    I developed a report using Reporting Services where I need to choose a project to see the report. I want to include it in a Project Site template using a SSRS Web part. As the report will be in a project web site, I would like the report appears automatically
    showing the project of the site without the need of choose of the project.
    Can it be done without developing a complex code?
    PS: Project Server 2013 and SQL Reporting Services 2012.
    Thank you.
    Best regards, Ricardo Segawa - Segawas Projetos / Microsoft Partner

    Unfortunately there are a number of ways to navigate to a project site. (From Project Center is another) - Covering them all is not an option.
    Like I said before there are two options, using a server-side web part - or using client-side code like the following: (just put this in a content editor on the page of your report and it will ensure there is a ProjUid on the query string)
    <script
    type="text/javascript">
    //(c) 2014 James Boman - IPMO.
    //License granted under creative commons CC BY-SA
    //http://creativecommons.org/licenses/by-sa/3.0/au/
    var PDP;
    var web;
    var ProjectUID;
    var PWAURL;
    ExecuteOrDelayUntilScriptLoaded(CheckProjectUid, "sp.js");
    function CheckProjectUid() {
    if (!urlHasProjectUid()) {
    getAppWeb(function () {
    getWebProperties(function () {
    NavigateMe()
    function urlHasProjectUid() {
    strDest = document.URL
    if (strDest.split('?').length
    > 1) {
    return (getQueryStringParameter('ProjUid')
    != null);
    } else {
    return
    false;
    function NavigateMe() {
    var strDest = document.URL;
    if (strDest.split('?').length
    > 1) {
    strDest += '&';
    } else {
    strDest += '?'
    strDest += 'ProjUid=' + ProjectUID;
    window.location = strDest;
    function getAppWeb(functionToExecuteOnReady) {
    var context = SP.ClientContext.get_current();
    web = context.get_web();
    context.load(web);
    context.executeQueryAsync(functionToExecuteOnReady, onFailure);
    function getWebProperties(functionToExecuteOnReady) {
    webProperties = web.get_allProperties();
    var context = SP.ClientContext.get_current();
    context.load(webProperties);
    context.executeQueryAsync(function () {
    var allProperties = webProperties.get_fieldValues();
    PWAURL = allProperties['PWAURL'];
           ProjectUID = allProperties['MSPWAPROJUID'];
    functionToExecuteOnReady();
    , onFailure);
    function onFailure(sender, args) {
    alert('CSOM Error: ' + args.get_message());
    function getQueryStringParameter(urlParameterKey) {
    var params = document.URL.split('?')[1].split('&');
    for (var
    i = 0; i < params.length; i = i + 1) {
    var singleParam = params[i].split('=');
         if (singleParam[0] == urlParameterKey)
    return decodeURIComponent(singleParam[1]);
    </script>
    James Boman - http://www.boman.biz Software Consultant for IPMO - http://www.ipmo.com.au

  • Get the project name to use in a procedure?

    How to get the project name to use in a procedure?
    example <% = odiRef.getOption ("COMPATIBLE")%> - but the project name or your id?
    in ODI 11.
    thanks
    Edited by: user ODI Dev on 01/12/2010 16:42

    I also need solution for this issue.
    I want to set ODI variable value in Jython script, this method described there: How to assign value for a ODI variable from Jython Script
    I need to update snp_var_data table. For more flexible solution i need to know project name where variable declared, because variable name in snm_var_data consist of two part <PROJECT_NAME>.<VAR_NAME>. Also this name convention don't changed after import scenarios from dev to execution repository
    Edited by: 822130 on 19.12.2010 4:31

  • How to get the source code of a PRT application in the portal

    Hi!
    Does anybody know how to get the source code of a PRT application in the portal?
    Thanks in advance,
    Celso

    Celso,
    If its Java-based code have a look at the properties of an iView that belongs to the application in question and copy the value of the Code Link parameter e.g. 'com.sap.pct.hcm.rc_vacancyrequestov.default'.
    Search the Portal installation directory under /j233/cluster/server/ for a .par.bak file of the same name, removing .default from the codelink parameter
    e.g. com.sap.pct.hcm.rc_vacancyrequestov.par.bak
    Copt this locally and import into Netweaver Developer Studio. You will have to decompilte the class files with a decompiler such as DJ Decompiler or Cavaj (search with Google).
    Cheers,
    Steve

  • How to get the device token in windows phone 8 sliverlight application?

    Hi,
    I am developing a windows phone 8 silverlight application . For my application I want to add push notification service , for this service I have to call one web service in my app . This api requires device token , device id ..etc , I am able to get the all
    the things except devicetoken .
    How to get the device token of a device ?
    any help?
    Thanks...
    Suresh.M

    Most probably device token is the push channel url which is returned by MPNS when a request is made to it.
    Step 3 here: Push notifications for Windows Phone 8
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How to get the current path of my application in java ?

    how to get the current path of my application in java ?
    thanks

    To get the path where your application has been installed you have to do the following:
    have a class called "what_ever" in the folder.
    then you do a litte:
    String path=
    what_ever.class.getRessource("what_ever.class").toString()
    That get you a string like:
    file:/C:/Program Files/Cool_program/what_ever.class
    Then you process the result a little to remove anything you don't want:
    path=path.substring(path.indexOf('/')+1),path.lastIndexOf('/'))
    //Might be a little error here but you should find out //quickly if it's the case
    And here you go, you have a nice
    C:/Program Files/Cool_program
    which is the path to your application.
    Hooray

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • How to get the user created at and modified at properties for a site collection using powershell

    Hi guys, I Know how to get the list of users of a site collection by Get-SPUser cmdlet but hte problem is that this cmdlet doesnt give me the user Created at and modifed at properties 
    can any one tell me how to get these values via powershell???? 
    ps: ignore the 2013 screenshot.. i just want a way to get those values .. if you provide me solution in either 2010 or 2013 , i will crack the other..
    plz guys help me ...

    Get the User Information list and then get the user from that list
    $web = Get-SPWeb "siteUrl"
    $userInfoList = $web.SiteUserInfoList
    $userItem = $userInfoList.Items[0]; #0 here is just for demonstration. You take the user you want here or loop through all users.
    $created = $userItem["Created"]
    $modified = $userItem["Modified"]

  • How to get the enclosing folder of an Application?

    Ok. re-visiting my Applescript to compare installed apps versus a list of predefined apps... here is my test code so far:
    set appsPath to (path to applications folder)
    tell application "Finder"
      set appList to name of every application file of entire contents of folder appsPath
    end tell
    set theApps to {"iMovie.app", "Microsoft Excel", "Microsoft Excel.app", "Adobe Acrobat 7.0 Professional.app", "Adobe After Effects CS4.app", "ColorEyes Display Pro.app", "Corel Painter X.app", "DiskTracker 2.3.2", "EPSON Scan.app", "Flash 8.app", "Product Ingest.app", "Product Tag.app", "Art Ingest.app", "TextWrangler.app", "Toast Titanium.app", "Suitcase Fusion 2.app", "Suitcase Fusion 3.app", "Fetch.app"}
    repeat with anApp in theApps
      set vers to version of (application anApp)
      -- get parent path of anApp!!!!
      if (parentFolder is equal to "Applications" or parentFolder is equal to "Utilities") then
      set parentFolder to ""
      end if
      display alert anApp & ": Version: " & vers & " " & parentFolder
    end repeat
    The only thing I'm stuck on is how to get the parent folder of anApp. Basically we use several versions of software here that are not easily identifiable by the version attribute. However their enclosing folder has all the versioning info I need (e.g.: MS Excel 04's vers would be 110113, but the enclosing folder is "Microsoft Office 2004", and some departments get Office 2008, Office 2011, etc., so I need a human-friendly way to get the right versions)
    I don't know if the "if" statement to check whether the parent is Applications or Utilities is correct as I haven't gotten that far in testing. I'm only interested in getting the parent of apps that have parent folder that is a sub-folder of Applications or Utilities.
    Basically what I am trying to do here is write a text file containing all departmental apps, homefolder sizes, relevant partition sizes, etc. and spit it out at the tech responsible for migrating a user to a new mac (display alert is just convenient for testing purposes). In the past we've had too many "missed" items in QC like wrong apps installed, or wrong versions, or data not copied over properly, etc. So this way they can run this on the old system beforehand and the new system after, line everything up and check off if it matches. This is just a snippet...
    TIA!
    Andrew

    Hi,
    Andrew Caldwell wrote:
    Is there a way to invoke these without the script opening each one?
    You must use the bundle identifier instead of the name
    Here a example :
    set theApps to {"com.microsoft.excel", "com.adobe.Acrobat.Pro", "com.barebones.textwrangler", "com.roxio.Toast", "com.fetchsoftworks.Fetch"}
    repeat with anApp in theApps
           tell application "Finder" to tell (application file id anApp)
                  set vers to version
                  set parentFolder to name of its container
           end tell
           if parentFolder is in {"Applications", "Utilities"} then set parentFolder to ""
           display alert anApp & ": Version: " & vers & " " & parentFolder
    end repeat

  • How To get the number of request's for a single Composite Application

    Hi can any body tell how to get the number requst's for a single composite application.
    Thanks
    Mani

    Hi,
    There are lots of STATE is available for composite instances, like mentioned in the below query. I hope you will get answer from the below query.
    SELECT (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
    WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
    WHEN STATE=3 THEN 'OPEN AND FAULTED'
    WHEN STATE=4 THEN 'CLOSED AND PENDING'
    WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
    WHEN STATE=6 THEN 'CLOSED AND FAULTED'
    WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
    WHEN STATE=8 THEN 'CLOSED AND ABORTED'
    WHEN STATE=9 THEN 'CLOSED AND STALE'
    WHEN STATE=10 THEN 'NON-RECOVERABLE'
    ELSE STATE || ''
    END) AS STATE, component_name, COUNT(*) AS NUM_OF_CUBE_INST FROM CUBE_INSTANCE where composite_name='PASS THE COMPOSITE NAME HERE..........'
    group by (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
    WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
    WHEN STATE=3 THEN 'OPEN AND FAULTED'
    WHEN STATE=4 THEN 'CLOSED AND PENDING'
    WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
    WHEN STATE=6 THEN 'CLOSED AND FAULTED'
    WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
    WHEN STATE=8 THEN 'CLOSED AND ABORTED'
    WHEN STATE=9 THEN 'CLOSED AND STALE'
    WHEN STATE=10 THEN 'NON-RECOVERABLE'
    ELSE STATE || ''
    END), component_name;
    Thanks,
    Vijay

  • How to get the network details in flex4.5 web application

    How to get the network details in flex 4.5 web application
    similar to the nativeinterface in air application

    checkout this document for secure web application
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6167e-7fff.html    

  • How to get the rows gap in the application file...?

    Hi All,
    Im working with Application server and I have a query like after transferring / printing 100 rows in the App server, I need 2 to 3 rows gap and then remaining will print.
    How to get the gap in the application file.
    Pls let me know.
    Puppy.

    Hi,
    when you are transfering the data to file
    loop at itab in wa_itab.
    counter  = count + 1.
    transfer wa_itab to fiel.
    if counter = 100
        clear wa_itab.
        transfer wa_itab to fiel.
        transfer wa_itab to fiel.
        transfer wa_itab to fiel.
       clear counter.
    endif.
    endloop.
    regards,
    Munibbau.K

  • How to get the ablolute path of the web application in WebSphere?

    How to get the ablolute path of the web application in WebSphere?
    For example:
    I have installed IBM WebSphere on D:\WebSphere\Appserver, and I created a new appliction named "myapp" on D:\myapp,. How can I get the absolute path of application "myapp"? In other words,how can I get the absolute path of the application's
    root directory?

    In the WebSphere(default), what directory is the Java Bean's root directory ?

  • How to get the value of sessionbean's properties in JSP?

    Hi,All
    I want to invoke setInterval() in JSP,and invoke clearInterval() when sessionbean's property is not null.But I don't know how to get the sessionbean's property.
    Thanks
    Smile.

    I'm not sure you can directly access a session bean from JSP.
    Although I haven't tried this with sessionBean1, you might try using JSP's useBean tag.
        <jsp:useBean id=<localName> type=<classPath> scope=<scope> />localName is the name you want to use to refer to the bean. classPath is the fully qualified class path. scope is either page, request, session, or application.
    I use this approach for accessing Java Beans. But before you can use the bean you have to add it as a session attribute. This makes it accessible to the page.
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ExternalContext externalContext = facesContext.getExternalContext();
        HttpSession session = (HttpSession)externalContext.getSession(false);
        session.setAttribute(<attributeName>, <attributeValue>);You can then access the bean. I use scriptlets although you could also use JSP expressions or EL. I use scriptlets because I'm more comfortable with it.
    <jsp:scriptlet>
        Address address = (Address)session.getAttribute("Address");
        if(address != null) {
            value = address.getAddress1();
            if(value != null) {
                out.println(value);
            value = address.getAddress2();
            if(value != null) {
                out.println(" " + value);
    </jsp:scriptlet>I use this approach for accessing Java Beans. But before you can use it you have to add it as a session attribute.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    HttpSession session = (HttpSession)externalContext.getSession(false);
    session.setAttribute(<attributeName>, <attributeValue>);

Maybe you are looking for

  • Expanding Text Glossary Terms into Popup windows

    I am using RH6 and I have a help project that uses expanding text glossary terms throughout all the topics. When the topic is printed out, the glossary terms are auto expanded and it disrupts the flow of the text. My questions are: Is there a way to

  • Time Machine Backup to Shared Firewire Drive Not Working

    Hello I know this may have been posted before, but I am looking for a simple troubleshooting / diagnostic process I can follow to resolve my issue: I have a Imac running Lepoard with all possible software updates. A WD Studio 500GB drive is attached

  • How to relate the Fixed Asset module to Purchase Order?

    Hello experts, Good day! How can I relate the fixed assets to purchase order? Is there a ways, so that we can't create different item code for purchase cycle and fixed asset module... 2nd, how to Increase the net  value of fixed assets ( vehicle, mac

  • Create po in backend

    hi I am on SRM 7.01 and using the classic scenario process SC created in SRM - > SC goes to approving ->Manager approved the Sc -> system create PR or PO or RS Automatically in backend as a follow on doc problem:  when purchaser create sc and manager

  • Setting data in the context

    Ok, I will admit I'm very much a Web Dynpro newbie, and this whole context thing is really confusing for me, though I've been a Java programmer for 6 years. Here's what's going on.  Basically, I'm trying to make a more simplified version of the spell