Accessing components vars.

Hi,
How do I access a var in a differint component? I have two custom components in the same application and need to get the variable (arrayCollection) from one to populate a chart in the other.

Thanks Benji,
ListItems Component
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init(), reloadData()" height="95%" width="100%" backgroundAlpha="0">
<mx:Script>
     <![CDATA[
          import mx.core.Application;
          import mx.collections.ArrayCollection;
          import mx.containers.Box;
          import mx.controls.Alert;
          import mx.events.DragEvent;
          import flash.net.navigateToURL;
          import mx.events.StateChangeEvent;
          import mx.controls.ComboBox;
          import mx.controls.LinkButton;
          import mx.containers.VBox;
          import mx.controls.CheckBox;
          import mx.controls.Text;
          import mx.containers.HBox;
          import mx.collections.XMLListCollection;
          import mx.rpc.events.ResultEvent;
          import mx.managers.CursorManager;
          import flash.text.TextField;
          namespace ink = "http://www.inktomi.com/";
          use namespace ink;
          //     Archive Vars
          [Bindable] private var xmlList:XMLList;
          [Bindable] private var listCollection:XMLListCollection;
          [Bindable] private var listData:XML;
          [Bindable] public var serviceURL:String = "http://boss.yahooapis.com/ysearch/news/v1/";
          [Bindable] public var searchFor:String = "biotechnology%20AND%20biotech";  
          private const PROXY:String = "http://localhost/employeePhoneDesktop/src/php/proxy.php?url=";
          private const APIID:String = "?appid=######
          private const PARAMS:String = "&format=xml&orderby=date";
          private var reload:Timer;
          //     Archive Vars
          private var vBox:VBox;
          private var hBox:HBox;
          private var titleText:LinkButton;
          private var itemInfo:Text;
          private var abstract:Text;
          private var archive:CheckBox;
          private var rateItem:ComboBox;
          private var category:ComboBox;
          private var container:VBox;
          private var clickURL:Text;
          private var canvas:Canvas;
          private var titleFormat:TextFormat;
          //     Archive Vars
          /*[Bindable]
          public var newsDB:ArrayCollection = new ArrayCollection( [
                 { title: null, clickURL: null, info: null, abstract: null, category: null, rateItem: null }
         public var newsDB:ArrayCollection = new ArrayCollection;
          private function init():void {
               listService.send()
               CursorManager.setBusyCursor();
          private function getData(e:TimerEvent):void{
               listService.send()
               CursorManager.setBusyCursor();
               removeChild(container);
          private function reloadData():void {
               reload = new Timer(10000, 10);
               //reload.start();
               reload.addEventListener(TimerEvent.TIMER, getData);
               //trace(reload.delay);
               //reload.addEventListener(TimerEvent.TIMER_COMPLETE,
          private function resultHandler(e:ResultEvent):void {
               listData = e.result as XML;
               // add the imems to an XMLList and XMLListCollection
               // so that they can be used with the repeater class
               // and update automatically
               xmlList = e.result.resultset_news.result as XMLList;
               listCollection = new XMLListCollection(xmlList);
               CursorManager.removeBusyCursor();
               // populate the layout with datd
               createLayout();
          private function createLayout():void {
               container = new VBox();
               var categoryLabels:Array = new Array("Health","Industrial","Emerging Tech","Food & Ag");
               var rateLabels:Array = new Array("Positive","Neutral","Negative");
               for(var i:int=0; i<listCollection.length; i++) {
                    //vBox = new VBox();
                    canvas = new Canvas();
                    hBox = new HBox();
                    titleText = new LinkButton();
                    titleFormat = new TextFormat();
                    itemInfo = new Text();
                    abstract = new Text();
                    archive = new CheckBox();
                    rateItem = new ComboBox();
                    category = new ComboBox();
                    clickURL = new Text();
                    titleText.label = listCollection.getItemAt(i).title;
                    //titleText.addEventListener(MouseEvent.DOUBLE_CLICK, getURL);
                    titleText.addEventListener(MouseEvent.CLICK, getURL);
                    titleText.width = 400;
                    clickURL.text = listCollection.getItemAt(i).clickurl;
                    clickURL.visible = false;
                    clickURL.includeInLayout = false;
                    itemInfo.text = listCollection.getItemAt(i).source + " | " + listCollection.getItemAt(i).date;
                    itemInfo.y = 25;
                    abstract.text = listCollection.getItemAt(i).abstract;
                    abstract.y = 42;
                    abstract.visible = true;
                    abstract.includeInLayout = true;
                    abstract.width = 400;
                    abstract.height= 60;;
                    archive.label = "Archive";
                    category.prompt = "Category";
                    category.dataProvider = categoryLabels;
                    category.rowCount = categoryLabels.length;
                    category.visible = false;
                    category.includeInLayout = false;
                    category.width = 95;
                    category.height = 20;
                    rateItem.prompt = "Rate";
                    rateItem.dataProvider = rateLabels;
                    rateItem.visible = false;
                    rateItem.includeInLayout = false;
                    rateItem.width = 95;
                    rateItem.height = 20;
                    canvas.addChild(titleText);
                    canvas.addChild(clickURL);
                    canvas.addChild(itemInfo);
                    canvas.addChild(abstract);
                    canvas.addChild(hBox);
                    hBox.addChild(archive);     
                    hBox.addChild(category);
                    hBox.addChild(rateItem);
                    hBox.y = abstract.y + 60;
                    hBox.percentWidth = 80;
                    hBox.percentHeight = 80;
                    archive.addEventListener(Event.CHANGE, toggleArchive);     
                    container.addChild(canvas);          
               container.x = 10;
               container.y = 10;
               addChild(container);
   // If someone chooses to archive the item, set the properties of the
   // ComboBoxes (visible & includeInLayout) to true
   private function toggleArchive(e:Event):void {
         var chb:CheckBox = e.currentTarget as CheckBox;
         var hBox:HBox = chb.parent as HBox;
         var len:int = hBox.numChildren;
         for(var i:int=0; i<len; i++) {
               var cb:DisplayObject = hBox.getChildAt(i);
               if((cb is ComboBox)) {
                // toogle visibility and include in layout
                (cb as ComboBox).visible = chb.selected;
                (cb as ComboBox).includeInLayout = chb.selected;
   // Called when someone clicks on the titleLink. This function pulls the
   // origional website URL up in a seperate browser window
   private function getURL(e:MouseEvent):void {
             var link:LinkButton = e.currentTarget as LinkButton;
             var canvas:Canvas = link.parent as Canvas;
             var clickURL:Text = canvas.getChildAt(1) as Text;
             var url:URLRequest = new URLRequest(clickURL.text);
             navigateToURL(url);
          trace(clickURL.text);
  /* private function showAbstract(e:MouseEvent):void {
                var link:LinkButton = e.currentTarget as LinkButton;
             var canvas:Canvas = link.parent as Canvas;
             var abstract:Text = canvas.getChildAt(3) as Text;
             var hBox:HBox = canvas.getChildAt(4) as HBox;
             link.removeEventListener(MouseEvent.CLICK, showAbstract);
             link.addEventListener(MouseEvent.CLICK, hideAbstract);
             abstract.visible = true;
             abstract.includeInLayout = true;
             while(abstract.hitTestObject(hBox) == true){
                  hBox.y += 1;
             trace(canvas.getChildren());
   private function hideAbstract(e:MouseEvent):void {
                var link:LinkButton = e.currentTarget as LinkButton;
             var canvas:Canvas = link.parent as Canvas;
             var abstract:Text = canvas.getChildAt(3) as Text;
             var hBox:HBox = canvas.getChildAt(4) as HBox;
             link.removeEventListener(MouseEvent.CLICK, hideAbstract);
             link.addEventListener(MouseEvent.CLICK, showAbstract);
             abstract.visible = false;
             abstract.includeInLayout = false;
          hBox.y = 35;
             trace(abstract.text);
   public function archiveData():void {
             var containerArray:Array = container.getChildren() as Array;
             for(var i:int=0;i<containerArray.length;i++){
             //for(var i:int=0;i<1;i++){
                  var canvas:Canvas = container.getChildAt(i) as Canvas;
                  var titleText:LinkButton = canvas.getChildAt(0) as LinkButton;
                  var clickURL:Text = canvas.getChildAt(1) as Text;
                  var itemInfo:Text = canvas.getChildAt(2) as Text;
                  var abstract:Text = canvas.getChildAt(3) as Text;
                  var hBox:HBox = canvas.getChildAt(4) as HBox;
                  var archive:CheckBox = hBox.getChildAt(0) as CheckBox;
                  var category:ComboBox = hBox.getChildAt(1) as ComboBox;
                  var rateItem:ComboBox = hBox.getChildAt(2) as ComboBox;     
                  if(archive.selected == true){
                    newsDB.addItem( {
                    title: titleText.label,
                    clickURL: clickURL.text,
                    info: itemInfo.text,
                    abstract: abstract.text,
                    category: category.selectedLabel,
                    rateItem: rateItem.selectedItem });                    
                  trace(newsDB[0].title);
   private function archiveSuccess():void {
             Alert.show("Your clips have been successfully saved","Archive Complete");        
   private function archiveFault():void {
             Alert.show("Your clips have not been saved. Please contact an administrator.","Archive Error");
     ]]>
</mx:Script>
     <mx:HTTPService id="listService" url="{serviceURL + searchFor + APIID + PARAMS}" result="resultHandler(event)" resultFormat="e4x"/>
</mx:Canvas>
Main mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
     layout="absolute"
     xmlns:com="components.*"
     backgroundGradientAlphas="[1.0, 1.0]"
     backgroundGradientColors="[#EDF4FF, #C6D9FF]"
     width="800" height="600"
     backgroundAlpha=".75"
     title="  Media Trap Beta V1.1"
     titleAlignment="left"
     creationComplete="init()">
     <mx:Script>
          <![CDATA[
          ]]>
     </mx:Script>
     <mx:Style source="assets/style.css" />
     <mx:Label x="19" y="14" text="Media Trap" fontWeight="bold" fontSize="20"/>
     <mx:Label x="20" y="38" text="beta 1.1"/>
     <mx:TabNavigator id="navigator" width="450" height="89%"  x="20" y="61">
          <mx:VBox label="News">
               <com:listItems id="newsFeed" name="newsFeed" backgroundColor="#FFFFFF" x="0" y="0" height="100%">
               </com:listItems>
          </mx:VBox>
          <mx:VBox label="Blogs">
               <mx:Text text="Blog Coverage"/>
          </mx:VBox>
          <mx:VBox label="Twitter">
               <mx:Text text="Twitter Coverage"/>
          </mx:VBox>
          <mx:VBox label="Video">
               <mx:Text text="Video Coverage"/>
          </mx:VBox>
     </mx:TabNavigator>
     <mx:Button x="348" y="36" label="Archive Selected" click="newsFeed.archiveData()"/>
     <!--<com:currentArchiveChart id="currentCats" x="478" y="81" height="212" />-->
</mx:WindowedApplication>
Charting Component
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="346" xmlns:com="components.*" creationComplete="init()" >
    <mx:Script>
        <![CDATA[
        import mx.core.Application;
        import mx.collections.ArrayCollection;
          // testing variable
        [Bindable]
        private var medalsAC:ArrayCollection = new ArrayCollection( [
            { Country: "USA", Gold: 35, Silver:39, Bronze: 29, Test: 20000 }
        private function init():void{
             trace(mx.core.Application.application.myListItems.newsDB as ArrayCollection);
             medalsAC.addItem( { Country: "Canada", Gold: 75, Silver:39, Bronze: 29 });
             medalsAC.addItem( { Country: "England", Gold: 100, Silver: 200, Bronze: 100 });
        private function displayGold(data:Object, field:String, index:Number, percentValue:Number):String {
            var temp:String= (" " + percentValue).substr(0,6);
            return data.Country + ": " + '\n' + "Total Gold: " + data.Gold + '\n' + temp + "%";
        ]]>
    </mx:Script>
         <mx:Label id="archiveTitle" x="10" y="10" text="Current Archive " fontSize="14" fontWeight="bold"/>
         <mx:PieChart id="chart" height="130" width="300" color="0x323232"
            showDataTips="false" dataProvider="{medalsAC}"  y="22">
            <mx:series>
                <mx:PieSeries labelPosition="callout" field="Gold">
                </mx:PieSeries>
            </mx:series>
        </mx:PieChart>
</mx:Canvas>

Similar Messages

  • In onLoad JavaScript, I'm getting "Error: Permission denied to access property 'classes'" when I access Components.classes; how do I enable that permission?

    I need to emulate several ActiveX functions in my client's web application. I have located several Mozilla web pages that describe how to do the things I need, and I have attempted to implement those instructions. However, I can't seem to get past the first line of code. In my web page, I am calling a JavaScript function using the onLoad attribute of the <body> tag. I am using the Navigator object to determine that the browser is Firefox. I then attempt to access the extension classes using the following code on lines 51 and 52 of the Download.js file:
    var C = Components;
    var CC = C.classes;
    The Web Console gives me these two messages:
    [13:51:55.621] The Components object is deprecated. It will soon be removed. @ http://distribution:781/NewDDI/DownLoad.js:51
    [13:51:55.621] Error: Permission denied to access property 'classes' @ http://distribution:781/NewDDI/DownLoad.js:52
    How do I enable adequate permission to be able to access the Components classes?

    I think Components is available only in extensions (or otherwise privileged code) and not in ordinary web pages.

  • How to Install Oracle Data Access Components (ODAC) on Windows Server 2003?

    I recently installed "32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio" on my computer (Windows 7, 64bit). Everything seems fine and I can develop and run my application in Visual Studio 2010 and IIS 7.
    Now, when I deploy my application to the Server, it raises error:
    Exception: System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
    Obviously I need to install ODAC on the server, too. My server is:
    - Windows 2003 32 bit R2 (I know, I know!)
    - IIS 6
    So. I downloaded the same installation from Oracle website (ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio [11.2.0.3.20]) and installed it on the server. But still getting the same error.
    PS: When I was installing, I chose Oracle Data Access Component for Oracle Client 11.2.0.3.20 in Oracle Universal Installer. hmmmm. Should I choose "Oracle Server" instead? Screenshot
    Edited by: 1000434 on Apr 17, 2013 6:35 AM
    Edited by: 1000434 on Apr 17, 2013 6:36 AM

    ODP.NET, Unmanaged Driver uses unmanaged dependencies in the Oracle Client. The error you see means you have another Oracle Client installed on the Win2003 machine and ODP.NET is attempting to load the incorrect Oracle Client version, rather than the version you installed ODP.NET with.
    What you need to do is direct ODP.NET where to find the correct version of its unamanaged Oracle Client dependencies. This will be generally the bin directory of your Oracle Client home that was installed with ODP.NET.
    You can learn more about DllPath here:
    http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/InstallODP.htm#sthref94
    If you're not familiar with how to set ODP.NET settings in the Registry or .NET config files, you can read how to do that here:
    http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/featConfig.htm#sthref106

  • How to check if Oracle Data Access Components  is installed?

    How to check if  Oracle Data Access Components is installed and version on my computer?
    Also How to check if Oracle Data Provider is installed and version?
    TIA
    Steve42

    Regedit HKLM->Software->Oracle.  See what's there...
    At the very least, that can give you paths and can check file versions from there.

  • No Setup.exe in 64-bit Oracle Data Access Components (ODAC) Dowload

    Why is there no Setup.exe in the 64-bit Oracle Data Access Components (ODAC) Download? Are the only instructions for installing in the dowloaded readme file?

    You're probably looking at an XCOPY bundle.
    If you're looking for an x64 11.2 bundle installed via the Oracle Installer, you'd need to get either the 11201 full client on OTN, or the 11202 full client on My Oracle Support. The 11202 full client includes support for .NET 4 if you need that.
    Hope it helps,
    Greg

  • Accessing CFLOGIN Vars

    Accessing CFLOGIN Vars
    I've got a basic CFLOGIN framework going to secure an application.  Everything is working fine, except after they log in I need to query a database for to pull info for each user.  I used to use session variables, set in the login script, to do this. 
    I'd like to user cflogin.name and cflogin.password to identify the correct DB record.  But the Adobe documentation says "You can use these values in the cflogin tag body to authenticate the user, and, in the cfloginuser tag, to log the user in. The structure is only available in the cflogin tag body."
    This seems like it defeats the point of using CFLOGIN, since the code between <cflogin> and </cflogin> only executes when a user IS NOT logged in. Does this mean that upon entering the correct user/pass, I have to also  set a session variable to identify the user outside of the CFLOGIN tag?  It seems redundant...
    Anyone have an explanation/solution?  Below is my query and error.
    THANKS!
              <cfquery datasource="DS" name="QName" username="username" password="password">
          SELECT *
          FROM table
          WHERE username = #cflogin.name#
        </CFQUERY>
    Error:  Element NAME is undefined in CFLOGIN.

    Accessing CFLOGIN Vars
    I've got a basic CFLOGIN framework going to secure an application.  Everything is working fine, except after they log in I need to query a database for to pull info for each user.  I used to use session variables, set in the login script, to do this. 
    I'd like to user cflogin.name and cflogin.password to identify the correct DB record.  But the Adobe documentation says "You can use these values in the cflogin tag body to authenticate the user, and, in the cfloginuser tag, to log the user in. The structure is only available in the cflogin tag body."
    This seems like it defeats the point of using CFLOGIN, since the code between <cflogin> and </cflogin> only executes when a user IS NOT logged in. Does this mean that upon entering the correct user/pass, I have to also  set a session variable to identify the user outside of the CFLOGIN tag?  It seems redundant...
    Anyone have an explanation/solution?  Below is my query and error.
    THANKS!
              <cfquery datasource="DS" name="QName" username="username" password="password">
          SELECT *
          FROM table
          WHERE username = #cflogin.name#
        </CFQUERY>
    Error:  Element NAME is undefined in CFLOGIN.

  • Accessing components in TabNavigator on unselected tabs

    Hi there,
    I want to set the value of components (says a rich text
    editor, or image source attribute value, etc.) in tabs that are NOT
    selected. So if I have three tabs say, and I currently have tab 1
    selected and I want to set the value of a text field that is
    visible when tab 2 is selected...how can I achieve this? I know the
    TabNavigator extends the ViewStack class but I'm new to Flex and am
    having difficulty with this. In Java it's a very easy process so
    I'm assuming it would be quite similar in Flex...any help is
    greatly appreciated. Thanks!

    quote:
    I would think this code works, but it gives an error. Anyone
    know why?
    You can't use dot syntax to refer to components that way. If
    you know what that component's id ("futuresLbl") is, why would you
    use such a roundabout way to refer to it anyway? From the Flex
    docs:
    The IDs for all tags in an MXML component, no matter how deeply
    nested they are, generate public variables of the component being
    defined. As a result, all id properties must be unique within a
    document. This also means that if you specified an ID for a
    component instance, you can access that component from anywhere in
    the application: from functions, external class files, imported
    ActionScript files, or inline scripts.
    I imagine if you want to do it the roundabout way, you'd have
    to cast the individual DisplayObjects to the proper type and then
    set the text property on the Label. Note that I use a name
    attribute "futuresLbl" for the Label
    private function clickHandler():void{
    var myVBox:VBox = tb.getChildByName("futures") as VBox;
    var myLabel:Label = myVBox.getChildByName("futuresLbl") as
    Label;
    myLabel.text = "New Futures Information";
    TS

  • Accessing components created thru AS addChild

    I am working on an application that requires me to add
    componts on the fly, based on the field type as entered into the
    database. (code attached).
    So, I have no idea how many componets will be added, or what
    types they will be.
    On click of a save button, I need to be able to access the
    values typed in to the boxes. Normall its textbox.text, but since I
    don't know the names of the boxes, I'm stumped.
    I have tried adding the name of the component to an array
    just before I use the .addChild() in the switch statments, but that
    only gives me an array of the names, and looping through the array,
    using array(i).text gives me an error.
    Any ideas? I'm stuck on this. Maybe there is a better way of
    adding the boxes to the page than what I'm doing.
    Thanks!

    I strongly urge you to consider using mx:Repeater. It does a
    lot of work for you , including creating arrays of references to
    repeated components. If you give some tag in the repeater an id,
    say mytext", then you can access the instances of that component
    using mytext[n].text, where "n" is the index of the dataProvider
    item.
    Doing this below does NOT create an id you can use to
    reference the component instance:
    myEditor.id = "Answer"+i.toString();
    If you want to stick with manual addChild, you will need to
    keep a reference to the created components yourself. One effective
    way is to use an associative array, like a hash table. This is just
    a dynamic "Object".
    private var _myEditors:Object = new Object();
    myEditor = new RichTextEditor();
    myEditor.text = "Answer question here";
    _myEditors["Answer"+i] = myEditor; //toString is not
    necessary here
    vbLabBk.addChild(myEditor);
    Then you can later access those instances like this:
    var myEditor:RichTextEditor = _myEditors["Answer"+i];
    But consider Repeater. It does this and much more for you,
    such as destroying unwanted child components when the data changes.
    Tracy

  • Accessing components

    I have upgraded an existing WebDB 2.2 application to Portal 3.0.6.6.5 and I am still able to access the ported procedures directly thru URL (like http://<hostname.domain>:7777/pls/NATT/OSNASS.NSARS_RPT.show). In my previous application one of the reports was the actual starting page with links to other components and forms added as PL/SQL code at the bottom of the report. When creating new applications in Portal the procedure doesn't seem to be accessible the same way as before, the procedure does not show up in the user schema and can not be addressed directly thru URL. Is this true or am I missing something?

    I'm sorry, this was probably the wrong forum. I've reposted this item under Portal Content Areas.
    Peres

  • How to access components in a iview from program

    Hi,
        Can we access the iview components from program dynamically? I have a Table Control , i want to refresh it in my program.
        How to set Mandatory (*) mark for a label? Is there any property for that?
    Thanks,
    Sridhar

    If table is displayed in current view, it will be refreshed with most of the events(There are few exceptions) from that view. You don't need to do anything for that.
    Suppose You have one Input Fields - Inp, and Lable - Lb.
    From the label properties select "Label For" with Inp from DropDown menu. From properties of the inputfield change property "Status" to required.
    Now u would get required mandatory mark.
    Note that, selecting the status "Required" for inputfield only displays the asterisk. But it doesnt stop you from navigating to another view with out entering a value.

  • Accessing components in a different state

    There's probably a more elegant way of doing this.
    Right now I'm setting certain components to be available in all states, but that means I need to make them visible or invisible depending on the state... which is a pain.
    How can I access a component in a different state.
    Maybe I'm missing something simple like stateName.component.text or something?

    I am currently using this, but I'm getting the error that states that what I'm after doesn't exist... when it clearly does.
    Here's that code.
    private function stateChangeHandler(e:StateChangeEvent):void {
         if (e.newState == "State1") {
              dg.visible = true;
              optionsPanels.visible = false;
         } else if (e.newState == "options") {
              dg.visible = false;
              optionsPanels.visible = true;
              if (preferences["searchType"] == 0) {
                   googleLocalChoice.selected = true;
              } else {
                   yahooLocalChoice.selected = true;
              yahooID.text = preferences["yahooAPI"];
         } else if (e.newState == "notes") {
              dg.visible = false;
              optionsPanels.visible = false;
         } else if (e.newState == "password") {
              dg.visible = false;
              optionsPanels.visible = false;
    What I'm having trouble with is in the if e.newstate == "options" - I'm getting the error on yahooLocalChoice, because preferences["searchType"] does not equal 0.

  • UCCX 8.0 Accessing ECC Vars through custom Java

    In a UCCX script, how can I access the ECC Vars within custom Java?
    I  know how to pull them in the UCCX script using the "Get Enterprise Call  Info" step.  I want to grab all of the ECC key value pairs without  knowing how many there are or their names.
    I'm new at this so any help would be wonderful thank you.

    Lauren Beal wrote:I'm new at this so any help would be wonderful thank you.
    I can assure you that your being new to this is not relevant in regards to what you are asking for.  I have been doing this a long time, and would bet there is maybe one person on this forum that can answer your question.
    Until he answers, I will offer you this:
    Instead of trying to access the ECC directly from within the Custom Java, how about storing the data for ECC into a two-dimensional array.  Now, you can write your ECC values by accessing the array indices, as well as pass your array into the a method of your custom class.  It's a workaround for what you really asked for, but I'm not knowledgeable enough to know that it's even possible.
    E.g.,
    String[][] my_ecc_data = new String[] {new String {"first_ecc", "value1"}, new String[] {"second_ecc", "value2"}}
    Good luck and happy scripting!
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • How to access application vars into JavaBeans or Java File?

    I have the application directory strcuture like this. I am using Apache Tomcat/6.0.14 and Eclipse IDE.
    -/MyFirstServlet
    -/MyFirstServlet/WebContent
    -/MyFirstServlet/WebContent/WEB-INF/web.xml
    -/MyFirstServlet/WebContent/web.jsp
    -/MyFirstServlet/Src
         - com.model.DAO/userDAO.java (java class within package)
    I have put following code into "web.xml".
    ==================================
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
         <display-name>
         MyFirstServlet
         </display-name>
         <context-param>
              <param-name>DBDriver</param-name>
              <param-value>com.microsoft.sqlserver.jdbc.SQLServerDriver</param-value>
         </context-param>
         <context-param>
              <param-name>connectionUrl</param-name>
    <param-value>jdbc:sqlserver://localhost:1433;databaseName=MyFirstServletDB;user=hitesh;password=hit
    esh;</param-value>
         </context-param>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>          
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>
    I am easily able to access from "web.jsp"
    ===================================
    String DBDriver = application.getInitParameter("DBDriver");
    out.println("<br>DBDriver:==="+DBDriver);
    String connectionUrl = application.getInitParameter("connectionUrl");
    out.println("<br>connectionUrl:==="+connectionUrl);
    BUT when I try to access withing userDAO.java it gives "application is not resolved"
    ========================================================================
    String DBDriver = (String)application.getInitParameter("DBDriver");
    NOTE: I understand I need to import some inbuilt java package which will allow to use applcation vars
    within java class.
    What is that package? and how to do that?
    Is there any other easy method to use global/application vars which can be used in all
    JSP/JavaBeans/Java files?
    Thanks in advance.

    It might be easier to put that code somewhere else. JSP's are for presentation, not for accessing databases, business logic, etc.

  • UCCX Accessing ECC Vars through custom Java

    In a UCCX script, how can I access the ECC Vars within custom Java?
    I know how to pull them in the UCCX script using the "Get Enterprise Call Info" step.  I want to grab all of the ECC key value pairs without knowing how many there are or their names.
    I'm new at this so any help would be wonderful thank you.

    Hi Lauren,
    You are probably better off posting this over in Contact Centre section of the boards
    https://supportforums.cisco.com/community/netpro/collaboration-voice-video/contact-center?view=discussions
    Cheers!
    Rob
    "And if I should fall behind
    Wait for me" - Springsteen

  • Accessing components from Action, ActionListener

    Our backend does not map well into a bean model. Rather than force it to fit, we have decided to skip the Update Model phase and instead read form inputs in Action/ActionListener classes, then persist. What is the preferred way to access nodes in the component tree? I was thinking something like:
      public void processAction(ActionEvent event)
           String s = NamingContainer.SEPARATOR_CHAR + "form01" + NamingContainer.SEPARATOR_CHAR  + "input 01";
           UIComponent source = event.getComponent();
           UIComponent result = source.findComponent(searchString);
           // persist result value 

    I'm fond of using the "binding" attribute to force the component you're searching for to be available directly on the same object as the "actionListener" (which I'd implement using a method binding, rather than implementing ActionListener). I rather dislike findComponent().
    -- Adam Winer (EG member)

Maybe you are looking for

  • Is there a way to speed up Get-QADUser or Get-ADUser?

    Hello,  I was wondering if there was a way to speed the commands up to query faster?  My one-liner looks like: Get-ADUser -SearchBase "OU=People,DC=Domain,DC=Company,DC=Net" -Filter {Title -eq "Job Title"} -ResultSetSize $null -Properties * | Select

  • WIS 10901 when trying to debug in ABAP

    Hi, We get a WIS 10901 in Webi when trying to debug in the MDX part of the ABAP stack with external breakpoints. I wonder how XI gets the event that ABAP stack should start the debugger. This usually works for other RFC connected applications as well

  • Component binding inside h:dataTable fails

    Hi, I'd like to create a component binding for each commandLink to a distinct child bean inside an h:dataTable like so: <h:dataTable value="#{parent.children}" var="child">     <h:column>         <h:commandLink binding="#{child.command1}" value="do i

  • Bug with use of TRn and nX editting in formatting and non advancing output

    Hello. I am using non-advancing output to print data values in columns in tables. Where a column doesn't have values I use the TRn editor to skip over the column field. However, this doesn't work with non advancing output. e.g., the following code do

  • Including jspx page into Panel Tabbed !!

    Hi all, Jdeveloper 11g is really powerful .. I want to create windows explorer interface which consists of two main areas: First one represented as a tree and the second to show the details of the selected item in the tree. I want the detail area to