How to reference a Constants.as actionscript in another actionscript class

Hi,
How can I use constant variables from a Constatnst file (.as file) in another actionscript class?
Thanks.

What id I don't have the Constants.as not defined as a class.
Constants.as
public static const BASE_NAME = "ABC";
public static const EQUIPMENT_NAME = "777";
I can't import is file as its not a class file, right?
So, how can I access BASE_NAME, etc.
In a mxml file, I use the <mx:Script source="/../Constants.as"/>
but how about in an actionscript class file.

Similar Messages

  • How to get properties of a bean from another java class

    Hi,
    I am new to JSF. Currently I am facing a problem, and hope you experts can give me some guidance.
    The JSF app i am working on has one Java class for handling a tree structure, MyTreeNode.java, and it also has a bean, NameBean.java, which has two properties, username and password.
    I can easily associate an input text with the #{name.username} to store the user's login... but later on, I need to fetch that information inside of MyTreeNode.java. How do I do that? Thanks!
    -- Jim

    <managed-bean>
         <managed-bean-name>Person</managed-bean-name>
         <managed-bean-class>demo.PersonBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
         <managed-property>
              <property-name>bank</property-name>
              <property-class>demo.BankBean</property-class>
              <value>#{bank}</value>
         </managed-property>
    <managed-bean>
    <managed-bean>
         <managed-bean-name>bank</managed-bean-name>
         <managed-bean-class>demo.BankBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
    <managed-bean>this version doesnt work for me.
    does the single beans have to look any special?
    some demo code out there?
    thx!

  • How to reference the Parent view Object attribute in Child View object

    Hi , I have the requirememt to generate Tree like struture to display Salary from joining date to retirement date in yearly form.I have writtent two Pl/SQL function to return parent node and child nodes(based on selected year).
    1.First function --> Input paramter (employee id, retirement date , joining date) --> return parent node row with start_date and end_date
    2. 2nd function --> input paarmter(employee id, startDate, end_date) --> return child node based on selected parent node i.e. start date and end date
    I have created two ADF view object based on two function return
    Parent Node --> select * from Table( EUPS.FN_GET_CONTR_SAL_BY_YR(employeeId,retirement Date, dateOf joining)) ;
    Child Node --> select * FROM TABLE( EUPS.FN_GET_CONTR_SAL_FOR_YEAR( employeId,startDate, endDate) ) based on selected parent node.
    I am giving binding variable as input for 2nd function (child node) . I don't know how to reference the binding variable value in child view from parent view.
    Like I have to refernce employeId,startDate, endDate values in 2nd function from parent view object. some thing like parentNode.selectedStart_date parentNode.employeeId.
    I know we can achive this writing the code in backing bean.But i want to know how can we refernce parent view object attribute values in child view object using Groovy or otherway?
    I will appreciate your help.
    Thanks

    I have two view com.ContractualSalaryByYearlyView for Parent Node and com.ContractualSalaryByYearlyView for child Node.
    I have created view link(ContractualSalYearlyByYearViewLink) betweem two view by giving common field empId, stDate , endDate.(below is the view link xml file).
    I tried give the binding attribute values using parent object reference like below in com.ContractualSalaryByYearlyView xml file but getting error
    Variable ContractualSalaryByYearlyView not recognized.I think i am using groovy expression.
    Thanks for quick response.
    com.ContractualSalaryByYearlyView xml
    <ViewObject
    <DesignTime>
    <Attr Name="_isExpertMode" Value="true"/>
    </DesignTime>
    <Variable
    Name="empId"
    Kind="where"
    Type="java.lang.Integer">
    <TransientExpression><![CDATA[adf.object.ContractualSalaryByYearlyView.EmpId]]></TransientExpression>
    </Variable>
    ContractualSalYearlyByYearViewLink.xml file
    <ViewLinkDefEnd
    Name="ContractualSalaryByYearlyView"
    Cardinality="1"
    Owner="com.ContractualSalaryByYearlyView"
    Source="true">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryByYearlyView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryByYearlyView.EmpId"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.StDate"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="ContractualSalaryForYearView"
    Cardinality="-1"
    Owner="com.ContractualSalaryForYearView">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryForYearView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryForYearView.EmpId"/>
    <Item
    Value="com.ContractualSalaryForYearView.StDate"/>
    <Item
    Value="com.ContractualSalaryForYearView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>

  • How to reference a user parameter in program unit

    I tried to define a user parameter in Oracle Report 6i and I could reference it (&p_where_clause) in the main query but I failed to reference it in one of the program units. Here is the logic:
    function CF_OTHER_COURSESFormula return Char is
    cnt           number;
    priority     number;
    class_code     varchar2(8);
    oc           varchar2(100) := null;
    cursor oc_cur is
    select class_code, branch_priority
    from nominations n, employments e
    where n.hkic_no = e.hkic_no
    and e.staff_status_code = 'EMP'
    and &p_where_clause --> contain "n.course_code in ('A','B','C')"
    and n.hkic_no = :hkic_no
    and n.class_code != :class_code;
    begin
    cnt := 1;
    open oc_cur;
    loop
    fetch oc_cur into class_code, priority;
    if oc_cur%notfound then
         exit;
    end if;
    if cnt = 1 then
    oc := oc||class_code||'('||priority||')';
    else
    oc := oc||', '||class_code||'('||priority||')';
    end if;
    cnt := cnt + 1;
    end loop;
    close oc_cur;
    return oc;
    exception
    when no_data_found then      
    return '';
    end;
    Does anyone tell me how to reference it in program unit? Does Oracle Reports 6i support this operation?

    There hasn't been any changes to the way lexicals and bind variables work in Reports between 2.5 and 6i. There are different versions of PL/SQL and you might be hitting some problem here.
    In your case, you shouldn't be using the query lexical "&p_where_clause" just the PL/SQL bind variable syntax ":p_where_clause". Since you're creating a PL/SQL cursor, you should probably use dynamic sql creation with a concatenation of the where clause to build up the SQL for the cursor. Check out the PL/SQL documentation for this.

  • How to fix the constant noise in the left corner of the Macbook Air which is connected not with a fan?

    How to fix the constant noise in the left corner of the Macbook Air which is connected not with a fan?

    Unfortunately if there are various colours across the screen then you have broken the LCD Screen and it will need replacing. If the colours change when you press the area lightly then this is another symptom that you've broken the screen.
    Sorry to give the bad news!

  • How to reference the selected row on a report by click a radiobox

    I created a report with a column displayed as a radiobox.The report source is like "select htmldb_item.radiogroup(1,.....),rec_id,....from .... where ....",after click one radiobox,i want to get other column's value in the selected row in the after submit process ,can anyone help me?????? how to reference "rec_id" of the selected row?

    Hello,
    First, please tell us your first name, and update your forum handle. It’s make it easier to track your threads, and help you.
    >> apex_application.g_f01(1)" only return the first record's rec_id,if i click radiobox in other rows,it returns the same result as click radiobox in the first row?
    The ‘G_F01’ is an array of values, so apex_application.g_f01(1) will always bring you the first element of this array. If you want to retrieve other values from this array, which will include the values of the radiogroup value of the other lines, you need to use a loop. Something like that should work:
    for i in 1.. apex_application.g_f01.count loop
    … apex_application.g_f01(i) …
    end loop;
    >> after click one radiobox,i want to get other column's value in the selected row in the after submit process
    That means that the value of your radiogroup item should include some indication to the line you are on. If, like in Andy’s example, you can retrieve your record from a table, based on a PK, your radiogroup can return this kind of information. However, if the data on the other columns of the select raw, were just entered/updated by the user (like in a tabular form), the radiogroup item should include information about the row you are in, in order for you to be able to access the corresponding array elements – other G-Fxx arrays – of the other columns in the row. In this case, I believe using checkboxes is preferable.
    Regards,
    Arie.

  • How to reference JAR files in stored java class ?

    I don't know if it's exactly the right place to post this, I hope it could be :-)
    Here is the problem :
    I developped a Java class with some public static functions.
    To store this class in Oracle, I use the SQL below :
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "SYSTEM"."MYCLASS" AS
    // ... (Java source code) ...
    This works pretty well with simple functions, but we need to import specific class. Here is for MQSeries : import com.ibm.mq.*;
    When using the SQL to put the Java class, we get an error message saying that the class wasn't correctly compiled. It seems it's about the import.
    The question is : how to proceed to reference the JAR files needed so that my class can correctly import the needed packages ?
    Thanks in advance,

    Here is a simple example of code :
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "SYSTEM"."TEST" AS
    import com.ibm.mq.*;
    public class Test {
    public Test() {
    try{
    MQQueueManager manager = new MQQueueManager("");
    catch(Exception e){
    In this way, I get message "Warning : Java create with compilation errors".
    When I comment the line of the MQQueueManager object creation, it is well created.
    Any ideas ?

  • How to reference the class-instance, created in parent class.

    Hi, I have following scenario. During compilation I am gettting error message -- "cannot resolve symbol - symbol : Variable myZ"
    CODE :
    under package A.1;
         ClassZ
         Servlet1
              ClassZ myZ = new ClassZ;
    under package A.2;
         Servlet2 extends Servlet1
              myZ.printHi();
    How to reference the class-instance created in the parent class?

    some corrections ...
    under package A.1;
         ClassZ
         Servlet1
              init()
                   ClassZ myZ = new ClassZ;
    under package A.2;
         Servlet2 extends Servlet1
              myZ.printHi();

  • How to construct the constant pool?

    Greetings,
    I seems to have a little bit of a problem.
    I have a text file, generated by the javap -c <class_name> command,
    i.e.:
    javap -c myClass > myClass.txt
    This myClass.txt is the input I've got. I do not have the myClass.class, from which it was generated.
    What I wish to do, is to generate, from this text file, a leagal, runnable, class file (i.e., myClass.class).
    But, I have problems understanding how to construct the constant pool array.
    I have read the VM spec (java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html).
    The thing is, that it does not explain how to extract the needed information from the text file.
    Can someone assist?
    Would appreciate,
    Ohad.

    Compiled from Hello.java
    public class Hello extends java.lang.Object {
        public Hello();
        public static void main(java.lang.String[]);
    Method Hello()
       0 aload_0
       1 invokespecial #6 <Method java.lang.Object()>
       4 return
    Method void main(java.lang.String[])
       0 new #4 <Class java.util.Timer>
       3 dup
       4 invokespecial #7 <Method java.util.Timer()>
       7 new #2 <Class Hello$1>
      10 dup
      11 invokespecial #5 <Method Hello$1()>
      14 lconst_0
      15 lconst_1
      16 invokevirtual #8 <Method void schedule(java.util.TimerTask, long, long)>
      19 returnWell in this example, you have opcodes with arguments which are expressed as (for example) "#7 <Method java.util.Timer()>". This describes a constant pool element. I assume #7 refers to the location within the constant pool, and the text description tells you that it's an item of type method, and gives you the method name. So for all arguments expressed in this form, you'll need to reconstruct a constant pool item.

  • Custom icon strip - how to reference it in the HHC?

    I could not get the custom icon strip to work for me. I think that I understood the overall concept but I do not know how to reference the bmp file in the HHC.Ricks Tips and Tricks file only states "make the reference inside the HHC file". Where exactly do I place the <param name="..." value="C:..BMP"> reference?
    Perhaps there is an example?

    Rick,
    thanks for your efforts despite my ignorance! My HHC file does not look like that, it has a different structure without an HTML list. After some fiddeling I got it to work now, even though I still did not find out why my TOC structure does not match yours (the binary TOC option is not active).
    Instead of using the <param name="ImageList" value="C:tocimages.bmp"> line, I inserted the reference into the properties tag. My HHC looks like this now and it works:
    <?xml version="1.0" encoding="utf-8"?>
    <toc version="1.0">
    <properties imagelist="C:tocimages.bmp">
    </properties>
    <item name=".." link="...html">
    (here the TOC items follow)
    </item>
    </toc>

  • How to reference a Planning Application in Workspace

    Hello,
    I've developped several Planning applications.
    But when I open workspace / Applications / Planning, (with an admin user)
    I only see one Planning application. So I want to know how to reference a Planning application in Workspace ??
    Thanks for your help
    Best regards

    Some details :
    My Planning applications seems to works correctly. Essbase is Okay. Shared services is okay too but the Workspace is out (and with it Financial Reporting Studio).
    Before that problem, In the configurator, I've deleted all Planning clusters except one (Default). I've selected Re-associate Clusters and Applications and I've successfully re-Associate all Planning Application to Default Cluster. Then I've Activated Cluster Default.
    But Anyway, Since I've deleted Planning Clusters my Workspace doesn't work anymore.
    I've a doubt: I've tried to redeploy Workspace (Configurator / Hyperion Foundation / Workspace / Deploy to Application Server and Configure web Server.
    It doesn't work because it says that Workspace already exists :p.
    Anyway I'm surprised about something : To access Workspace we use the 19000 port but In Configuration we I try to deploy it I see it is on the 45000 port. If I click on advanced / Setup a little window open "Set up Logical Address". And it is writtend Edit Default Cluster : gl-dev-budget : 45000 meanwhile when (still in Configurator) I open Planning / Manage Planning Cluster the server port is 8300 ??
    Is someone can helps me ?
    Thanks
    Best regards

  • How to reference a field statically in a program?

    Hi Everyone,
    Can any one explain me how to reference a field statically.
    As the error on Extended program check is as follows:
    Field FLAG is not referenced statically in the program   
    where as the particular field has been defined as below in the program :
    when 'SMTP_ADDR'.
              DATA: flag type i.
    I think is there a need to define the field globally.
    Thanks and Regards,
    Johny

    Hi,
    We can avoid this EPC check by deleting or putting a comment Or By passeing the EPC to it ie
    DATA:
    w_flag type i." #EPC
    we can also avoid the EPC error by this way.then this willnt be aa part of EPC check
    Thanks & Regards,
    Chandralekha.

  • How to reference session state in a list entry label

    You can use &<item>. to reference session state values which can then be used in titles and item labels but it seems it does not work in the label for a list entry (i.e. to build a menu).  Is there a workaround?
    thanks in advance
    PaulP

    OK I just realized that referencing session state doesn't work for lists used by Enkitec's NavBar plugin solution.  It does reference the &<ITEM>. correctly for normal APEX lists. Anyone know how to reference session state when using Enkitec's NavBar plugin solution?
    PaulP

  • How to define a constant in TSQL ?

    I need to define a group of int constants and use them by a group of functions . 
    so how I define a constant ?
    and how to make it accessible by multiple functions ?

    Hi, 
    I am guessing that you are developer by your nickname, so i will add something for developers :-)
    This is actually a good question and the answer is that you can use database (and this is where this forum come to help you, and
    Kalman Toth gave you the basic answer), but if your need is for application that you are developing then there are several more option which you need to check what is best for you.
    define a group of int constants in application can be done:
    >> Using database table (best for big collection or a Collection that you need some changing)
    >> Using ini file (very useful for constant Collection)
    >> Using app config file (useful for constant Collection, remember that changing the file will restart the app and all users sessions will end in some cases)
    >> Using static class
    and so on
    I hope this is useful :-)
    [Personal Site] [Blog] [Facebook]

  • How to reference current tab on page zero?

    Hi,
    I have regions placed on page zero. How could I reference the current tab? I have to many pages, so using display condition by using page ID is little uncomfortable. I thought I could make a condition by using SQL expression and referring the label or name of the currently active tab. I think, this is a trivial question, but I can not find how to referre to the current tab's name or label.
    Tamas

    Hi
    I have the exact same problem.
    I cant have multiple navigators on page 0.
    Therefore my navigator on the left hand side should be dynamic, based on the tab I click.
    I've gotten this far (select statement below), but I don't know how to reference the current tab that I've clicked on / the current tab is active (see :P0_TAB_NAME)
    select "MENU_CODE" id,
    "PARENT_MENU_CODE" pid,
    decode(menu_type,'FL','<img src="#APP_IMAGES#folder.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description,
    'PG','<img src="#APP_IMAGES#pgm.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description,
    'PG','<img src="#APP_IMAGES#tree_group.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description) name,
    decode(page_name,null,null,'f?p=&APP_ID.:'||page_name||':&SESSION.') link,
    null a1,
    null a2
    from "CANELAB_NAVIGATOR" a, APEX_APPLICATION_TABS b
    where b.display_sequence = a.menu_group
    and b.tab_name = :P0_TAB_NAME
    order by MENU_CODE

Maybe you are looking for

  • Problem in F.19, F.13

    Hi all, Many a times even after doing IV for an item, it does not get cleared from F.19. In such cases, we clear the item thru F.13 wherein the debit and credit amount (i.e MIGO doc & IV doc) are matched against a PO and the transaction gets cleared

  • Exception write to event log when user not found in active directory

    I'm trying to use a exception to write to a event log to show which user did not get imported from my csv file. Any help to write this exception is appreciated. Thanks Import-CSV $importfile | ForEach-Object{ $samaccountname = $_.sAMAccountName.ToLow

  • My camera (iphone 3g) wont open. What's wrong and how do I fix it?

    If I click the camera the sprial gray "shutter" never opens. It stays frozen.

  • Why are my administrator name and password rejected now?

    I tried to install some app upgrades (on my G4 PB) and was 'asked' to provide an administrator's name and password. My entries were rejected; I tried the only combinations I always use. No luck. I clicked on the hard disk icon, selected "get Info", a

  • About round off values

    Hi Abapers,                        i am using 'ZTOOL' transaction code which is plant maintainence. my requirement is i am handling bdc table control which fields are give below when i am putting the given values work centre    :      140-296 short t