Question on event object

In the official flex tutorial. They called a function and
passed in the event object, but they never used that object in that
function. Why is that? I have realized several times in Day1 and
Day2 tutorials. Here is the tutorial video:
Link
Here is partial of the code:
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var account:ArrayCollection;
private function resultHandler(event:ResultEvent):void {
employeeData = event.result.employees.employee;
]]>
</mx:Script>
<mx:HTTPService id="employeeService"
url="data/employees.xml result="resultHandler(event)" />

In the official flex tutorial. They called a function and
passed in the event object, but they never used that object in that
function. Why is that? I have realized several times in Day1 and
Day2 tutorials. Here is the tutorial video:
Link
Here is partial of the code:
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var account:ArrayCollection;
private function resultHandler(event:ResultEvent):void {
employeeData = event.result.employees.employee;
]]>
</mx:Script>
<mx:HTTPService id="employeeService"
url="data/employees.xml result="resultHandler(event)" />

Similar Messages

  • How to use ThreadPoolExecutor / ArrayBlockingQueue with event objects

    I am having some trouble figuring out how to use the new java.util.concurrent library for a simple thread pool that has custom threads pulling off event objects from a queue.
    I started with this kind of code below, which I know is not right but am having trouble seeing the correct approach. Any help is appreciated. Thank You!
    -Paul
    public class testThreadPool {
    public static void main( String [] args ) {
    //work queue actaully only takes runnables,
    //but I need to add my event objects to this queue ??
    ArrayBlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<Runnable>(20);
    ThreadPoolExecutor pool = new ThreadPoolExecutor(10,//pool size
    20,//max pool size
    1,
    TimeUnit.SECONDS,
    workQueue);//the work queue
    //this will ensure that the pool executor creates worker
    //threads of type MyThreadWorker
    pool.setThreadFactory(new MyThreadFactory());
    pool.prestartAllCoreThreads();
    //throw some events on the queue and let the pool workers
    //start to execute with the given event object
    workQueue.add(MyEvent);
    workQueue.add(AnotherEvent);
    class MyThreadFactory implements ThreadFactory {
    public Thread newThread(Runnable runnable) {
    return new (Thread)MyThreadWorker();
    class MyThreadWorker implements Runnable {
    private boolean m_run = true;
    public void run(){
    Object obj;
    while (m_run) {
    obj = null;
    //get the event object from the blocking queue
    try {
    obj = workQueue.take();
    } catch (InterruptedException e) {
    if ( obj == null ) continue;
    if ( obj == null ) continue;
    if (obj instanceof MyEvent) {
    //do this
    } else if (obj instanceof AnotherEvent) {
    //do this
    public void stopRunning(){
    m_run = false;
    this.interrupt();
    }

    What database and connection type are you using? Are you connecting the report directly to the database, or trying to assign the datasource to object data?
    It sounds like you might be trying to use a linked list, collection or other C# construct to pass your data in. This currently isn't supported by the Crystal Reports SDK. You can use a DataSet or a DataTable, and possibly also an IDataReader depending on which version of Crystal Reports you're referencing in your project. Of course you can also connect directly to the database, even if the database isn't on the same machine as the application.
    The way to show master records with detail information is through the use of subreports and linked subreport parameters. Linked subreports take their parameter value from a record in the main report, so that only the data appropriate to that master record is displayed. The guys over in the [report design|SAP Crystal Reports; forum can help you out with this if you have questions on the specifics.

  • Technical interview questions on this objects

    Hi every one  i am putting some objects in my resume can any one tell me the all possible questions on these objects.
    my id is [email protected]
    Reports:
    &#61607;     Developed a Report to display the values of Total Finished Goods filtered by Plant.
    &#61607;     Created an Interactive Report for displaying vendor information. Based on the selection made the corresponding Vendor Details are listed such that the line selected in the basic list was visible along with the secondary list.
    &#61607;     Developed a Report, which calculates the delivery values and sales for a particulars month and year including total quantities.
    &#61607;     Created reports in SD module such as sales order report, which covers all organization levels, delivery status, invoice status, shipping details and partner function details.
          Conversions:
    &#61607;     Designed and coded a BDC program to migrate Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to Update and Change Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to migrate Material Master Data from legacy system to SAP R/3 database.
          SAP Scripts:
    &#61607;     Modified Standard Script MEDRUCK according to client requirements.
    &#61607;     Modified Standard Script SAPFM06P according to client requirements.

    Hi every one  i am putting some objects in my resume can any one tell me the all possible questions on these objects.
    my id is [email protected]
    Reports:
    &#61607;     Developed a Report to display the values of Total Finished Goods filtered by Plant.
    &#61607;     Created an Interactive Report for displaying vendor information. Based on the selection made the corresponding Vendor Details are listed such that the line selected in the basic list was visible along with the secondary list.
    &#61607;     Developed a Report, which calculates the delivery values and sales for a particulars month and year including total quantities.
    &#61607;     Created reports in SD module such as sales order report, which covers all organization levels, delivery status, invoice status, shipping details and partner function details.
          Conversions:
    &#61607;     Designed and coded a BDC program to migrate Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to Update and Change Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to migrate Material Master Data from legacy system to SAP R/3 database.
          SAP Scripts:
    &#61607;     Modified Standard Script MEDRUCK according to client requirements.
    &#61607;     Modified Standard Script SAPFM06P according to client requirements.

  • Determining Oracle Auditing events/objects

    I am testing some software using an Oracle database and I have confirmed that auditing has been enabled (and I can find the logs ok). I have not been able to figure out what events/objects are being audited however.
    Does anyone know which table contains this information??
    Thanks,
    dirby.

    DBA_OBJ_AUDIT_OPTS lists auditing options for all objects.
    DBA_PRIVS_AUDIT_OPTS lists system privileges being audited.

  • Event object and who create it?

    Hi all:
    i am using JAVA to create application . What really confusing me is that WHERE all event objects come from, who creates them and if there is any document about it?
    thanks a lot.

    http://java.sun.com/docs/books/tutorial/uiswing/overview/event.html

  • Differences between Oracle BAM and Oracle BI and Question BAM  Data Objects

    Hi,
    I have two questions.
    1. Can someone tell me differences between Oracle BAM and Oracle BI?
    My understanding about Oracle BAM is, we use BAM to build Dashboards or Reports.
    We can also build DashBoards or reports using Oracle BI.
    I am not able to understand why Oracle has two tools for same purpose?
    Which tool is more powerful and user friendly(Oracle BI or Oracle BAM)?
    2. Every time we plan to develop Dashboard or report in BAM, we need to create BAM ADC Data Object to store Data (i.e first step is to get data from external database or application and second step is to store data in BAM ADC data object).
    My understanding is we have an extra step(i.e creating Data Object) in Oracle BAM to develop a report or DashBoard
    I am wrong pl correct me?
    Regards,
    Shanti Nagulapalli.

    Oracle 11g has many advanced features in PL/SQL over Oracle 9i.
    refer here,
    http://www.oracle.com/technetwork/database/features/manageability/9i-to-11g-real-world-customer-exper-133754.pdf
    http://www.oracle.com/global/de/upgradecommunity/artikel/upgrade11gr2_workshop2.pdf
    http://www.compuworks.com/events/view/233.pdf
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getCourseDesc?dc=D52601GC10&p_org_id=15942&lang=US
    Thanks

  • Question on event

    What's the type of the new value for many condition in a event loop. The wire has a dark mauve color ?
    Thx

    Ok, the reason that you have a variant datatype is because you have two controls with different datatypes assigned to the same event. The attached code shows how you can tell which one actually fired the event and convert the variant back into a standard LV datatype.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    question-1.vi ‏15 KB

  • MDM iView resultset problem and question about eventing

    Hi experts,
    I created a MDM iView resultset for my main table as search table (comparison is not supported). When I click on preview I get an empty table ("Found <Tablename>: 0 of 10", table contains 10 entries at the moment). I tried the same with a subtable and everything works fine (all entries have been in the preview table). Any ideas why I don't get a result?
    My 2nd question: can I choose the parameter name in eventing (EPCF) on my own? So if I have Vendor_Id as field can I use vendorid as parameter name? Do I have to define anything in the listener iView (e.g. in detail iView for an event from resultset iView)? Maybe you have a useful tutorial link (please not SAP help section)?
    Thanks for your answers.
    Regards, bd

    It is possible to retrieve the number of rows from a resultset --
    Statement stmt= con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                        ResultSet.CONCUR_READONLY);
    ResultSet rs= stmt.executeQuery("<your select query here>");
    int totalRows;
    if (rs.last()) // can it move to the last row?
       totalRows= rs.getRow(); // get its row number
    else
       totalRows= 0; // no rows in the resultset
    rs.first() // set the cursor back to the startNote that the resultset has to be scrollable (TYPE_SCROLL_INSENSITIVE).
    kind regards,
    Jos

  • Questions on events in a multi-class GUI

    I have a GUI application that is constructed as follows:
    1. Main Class - Actually creates the JFrame, contains main method, etc.
    2. MenuBar Class - Constructor creates a new JMenuBar structure and populates it with various JMenus and JMenuItems. A new instance of this class is instantiated in the Main Class to be used in the setMenuBar() method.
    3. ContentPane Class - Constructor creates a vertical JSplitPane. A new instance of this class is instantiated in the Main Class to be used in the setContentPane() method.
    4. BottomPane Class - Constructor creates a JPanel and populates it with various stuff. A new instance of this class is instantiated in the Content Pane Class to be used as the bottom pane in the vertical JSplitPane.
    5. TopPane Class - Constructor creates a horizontal JSplitPane and populates the left pane with a JScrollPane containing a JList. A new instance of this class is instantiated in the Content Pane Class to be used as the top pane in the vertical JSplitPane.
    6. TabbedPane Class - Constructor creates a JTabbedPane. A new instance of this class is instantiated in the Top Pane Class to be used as the right pane in the horizontal JSplitPane.
    7. DisplayPane Class - Constructor creates a JPanel. A new instance of this class is instantiated in the Tabbed Pane Class as the first tab. The user has the ability to click at points in this pane and a dialog box will pop up prompting the user for a string. Once the user enters something and clicks "OK", an instance of a custom Java2D component that I've created will be added to the DisplayPane where the user had clicked, with the string the user inputted being used as its name. The user can then drag the component around, enter a key combination to display all the names, etc.
    8. Custom Java2D Component Class - Constructor creates my custom Java2D component. Instances of this are added to the Display Pane Class, as I have described.
    Now, originally, I was going to ask "How do you work with events between these multiple classes?" but I have solved half of that problem myself with the following class:
    9. Listener Class - A new instance of this class is declared in the constructor of the Main Class, and is thus passed down through the GUI hierachy via the constructors of the various classes. I then use the addActionListener() method on various components in the other classes, and then the Listener Class can capture an event using the getActionCommand() method to figure out what fired the event.
    So that covers the "How do I capture events in multiple classes?" question. Now I'm left with "How do I affect changes on those classes based on events?"
    For example: In my MenuBar class, I have a "Save" menu item. When this is clicked, I want to declare a new JFileChooser and then use the showSaveDialog() method, which throws up a dialog for saving a file. The problem is, the showSaveDialog() method takes a Component which is the parent frame. Obviously the Listener Class is not a frame. I want to use the Main Class as the parent frame. How would I do this sort of thing?
    Another example: In my MenuBar class, I have a "New" menu item. For now, I want this to invoke a method in the DisplayPane Class that erases all of my custom Java2D components that have been made, thus giving the user a clean slate. How would I give my Listener Class access to that method?
    A final example: Every time the user adds one of my custom Java2D components, I want that component's name to be added to the JList that is in my TopPane class. Vice versa with deleting a component: its name should be removed from the JList. How would I listen for new components being added? (A change listener on the pane? One on the ArrayList<> that contains all of the components? Something else?) And, of course, how would I give the Listener Class the ability to change the contents of the JList?
    One idea I've come up with so far is to instantiate a new instance of each of my GUI classes in the Listener class, but that doesn't really make much sense. Wouldn't those be new instances that are totally separate from the instances the rest of my program is using? Another thought is to make the Listener Class an internal class inside the Main Class so that it can use the accessor methods of the GUI classes, but a.) I would like to avoid stuffing everything in one class and b.) this brings up the question of "How would I get an accessor method that is in a class that is two or three deep in the hierarchy?" (.getSomething().getSomethingInsideThat().getSomethingInsideTheInsideThing()?)
    Help with answering any or all of my questions would be much appreciated.

    Hrm. At the moment, for my first attempt, I'm doing something similar, it just strikes me as quite unwieldy.
    Start of Listener class, with method for setting what it listens to. (I can't use a constructor for this because the MenuBar and the ContentPane take an instance of
    this Listener class in through their constructors. You can't pass the Listener in through their constructors while simultaneously passing them in through this
    Listener's constructor. That would be an endless cycle of failure. So I just instantiate an instance of this Listener class, then pass it in through the MenuBar and
    ContentPane constructors when I instantiate instances of them, and then call this setListensTo() method.)
    public class Listener implements ActionListener
      private MenuBar menuBar;
      private ContentPane contentPane;
      public void setListensTo(MenuBar menuBar, ContentPane contentPane)
        this.menuBar = menuBar;
        this.contentPane = contentPane;
      }The part of my actionPerformed() method that does some rudimentary saving, which I will make more complicated later:
    else if (evt.getActionCommand() == "saveMenuItem")
      JFileChooser fileChooser = new JFileChooser();
      int returnVal = fileChooser.showSaveDialog(menuBar.getTopLevelAncestor());
      if (returnVal == JFileChooser.APPROVE_OPTION)
        File file = fileChooser.getSelectedFile();
        ArrayList<Node> nodes = contentPaneClass.getTopPaneClass().getTabbedPane().getDisplayPane().getNodes();
        try
          BufferedWriter out = new BufferedWriter(new FileWriter(file));
          for (int i = 0; i < nodes.size(); i++)
            Node node = nodes.get(i);
            out.write(node.getIndex() + "," + node.getXPos() + "," + node.getYPos() + "," + node.getName());
            out.newLine();
          out.close();
        catch (IOException e)
          //To be added                    
    }That part that seems unwieldy is the
    ArrayList<Node> nodes = contentPaneClass.getTopPaneClass().getTabbedPane().getDisplayPane().getNodes();The reason I'm using a separate Listener class is because if I put, say, the actions for the MenuBar in the MenuBar class, and then want to save stuff in the JPanel
    at the bottom of the hierachy, I would have to go up from the MenuBar into the JFrame, and then back down the hierachy to the JPanel, and vice versa. Kind of like
    walking up a hill and then down the other side. I imagine this would be even more unwieldy than what I'm doing now.
    On the plus side, I am making progress, so thanks all for the help so far!

  • Question on view objects

    Hi I have couple of question both might be related.
    1. In one jsf page I have several items. They are selectInputText, InputText,Shuttle,Select one choice etc. Select input text,Select one choice and Shuttle gets populated from different view objects. For others user has to enter data. I need all entered data to go to the next page for confirmation and from confirmation page once user click confirm button data should be entered in data base.
    How do you take all the data from first page to confirmation page. I have seen SRdemo tutorial where suggestion was to create Global view Object with transient column and drop them as ADF form in first page so that in next page we can get the data from Global view object. But looking at my requirement when I bring ADF form it doesn't allow to have input items as select InputText or Shuttle.
    How do I do this?
    Second question is
    2. In one jsf page I have a table with Select Many. I want to update one of the column for selected row. So if user selects the rows and click continue I need to first go on confirmation page and show him all the selected row and then when user confirms, my custom method should go and update those rows in database with predefined value. If user doesn't selects any row I should throw a warning.
    I am using Jdev10.1.3.4.0
    thanks
    Ajay

    Hi,
    1. The ADF form that you see when dragging a collection from he data control palette to the page is a "template". You can change each attribute and input component added to teh page. Just delete the field the gets created and drag and drop the attribute of teh Collection again. Then you can choose the input item you like to have.
    2. If the rows have a primary key, you can get the PK from the selected rows and then pass them to a ExecuteWithParameters method that you can create for a VO that uses bind variables. So the bind variable could be used like select ... from ... where pk_col in (:bindVariable)
    Frank

  • Question about Events stored on an external drive

    Hello guys! I recently freed up a TON of space on my iMac by adding an external hard drive and you guys advised me on how to get iMovie '08 to store my Events there.
    Question: I'm going to Rome Italy tomorrow and I'm going to be doing a ton of video footage. My Macbook doesn't have the hard drive space to hold what I'm going to be shooting.
    So, my question is......considering that I'm using this external drive to store Events from my iMac will I be able to to use that same external drive on this trip to manage Events on my MacBook?
    In other words, I just want to make sure that I don't confuse either version of iMovie that I have operating on these two different machines. Can I use this same external hard drive to manage Events from both machines?
    Thanks in advance for the speedy assistance. I'm leaving tomorrow and need to get this issue nailed down.
    Thanks!
    Tony

    I actually have no set-up to test my speculations but...:
    when you tell iM08 to store Events on some ext. drive, it creates on 'Top Level' of that drive the 'iMovie Events' folder..
    so, when you do that with a second Mac/iMovie... I guess, it will confuse the file management.. (=you can not create two indentically named folders... ) ... and, I guess, you can not create/select a sub-folder for the Events...
    best practise would be to partition the drive.. but that isn't possible without erasing any content on your drive..
    Plan B) invest 100$ for a 2nd drive.. ? (last week offer: 79€ for 500 gigs.. no bad... )

  • Question about using objects in SQL query.

    I had posted this question in the SQL/PLSQL forum but I guess nobody took the time to understand exactly what I am asking so I decided to try here hoping to get the answer. So here is the thing:
    I have created generic object type "tree" - the constructor takes as a parameter sql query which returns "node_id" and "parent_node_id" - this is all we need to have a tree. The object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Not exactly sure what the question is...
    As I understand, you are comparing the following two constructor calls:
    +select..  tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") ... FROM ...+
    +select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') ... FROM dual+
    These calls are the same (besides the 1st one doing an immediate implicit call to a method of the object being constructed). The number of times these are being called depends on the number of times this SQL projection is applied - and that is determined by the number of rows being projected by the SELECT.
    The latter one is against DUAL which only has a single row. So that constructor is only called once. The former can be against multiple rows. Obviously a single pass through a data set is desirable - which means that the sub-select (use by the constructor) should ideally only be executed once and makes the 2nd method more desirable.
    However, I'm having a hard time understanding why the class and constructor are at all needed. Why pull data from a SQL table into PL memory? As that is where the class will need to cache and store the results of that construction parameter SQL SELECT. And once in PL memory, how does the object effectively access, search and use this cached data?
    PL memory is expensive. It is not sharable.
    PL data structures are primitive - these cannot be compared to SQL structures in the form of tables and columns that can be stored in a number of physical ways (index tables, hash tables, partitioned tables, clustered tables, etc). Cannot be indexed like SQL structures using B+tree, bitmap, function and other indexing methods. Cannot be sorted, grouped, analysed, filtered, etc like SQL structured data.
    It makes very little sense to read SQL data into a class and then deal with that data, cached in expensive PL memory, using primitive PL structures.
    And the same would be true if Java or C# was used. The best place for data is inside the SQL engine. That is the most superior environment for data. It can processes more data, scale better, perform better and offer more flexibility, than pulling data from it and then crunch that data using PL or Java or C#.

  • Question about Using Objects

    Hi Guys,
    Need some help here with understanding the basics. Basically i'm getting a bit confused on how objects are instantiated and used in java. Firstly an object of a class is instantiated with the following piece of code;
    ClassA obj = new ClassA();This would allow you to use the variable and method of ClassA. Say ClassA has the method set(). You could call it via the obj object with the code;
    obj.set();that I understand. You can also declare an annonymous object which is an object that is only really going to be used once for the purposes of the statement. For example, something like;
    System.out.println(new Date());That I understand too. However what is confusing me is this type of object instantiation;
    public static ClassA obj; You cannot not call the set() method of the ClassA in the same way so why use this? Also this code is confusing me;
    obj = new ClassA();Are you saying that a precreated object is now equal to ClassA. Meaning that you can call its set() method in the same way?
    What do they mean? Why are they used? Can anyone give me an example of how they would be used?
    Any help would be appreciated.

    public static ClassA obj;This is a declaration, basically you are telling the
    computer that you intend to make a "ClassA" object
    and the program will allocate enough memory to hold a
    "ClassA" object, although the object "obj" does not
    actually "exist" at this time. This is why you can't
    use the set() method, because obj doesn't have any
    methods at all since it hasn't fully been created
    yet.
    obj = new ClassA();This is what actually creates the object, according
    to the instructions in the object's "ClassA()"
    method, which is known as a constructor.
    ClassA obj = new ClassA();This statement simply combines the two previous ones
    into one line. You are declaring "obj" to be a
    "ClassA" which allocates memory to store it, and then
    immediately executing the "ClassA()" constructor to
    build a new ClassA and store it in the memory space
    referenced by "obj". Does any of that make sense?
    I'm not exactly a teacher, but I think I understand
    your problem enough to explain it.Yes that does make sense. However i have some more questions now if you dont mind answering.
    If the code
        public static ClassA obj;simply allocates the memory (instantiate) and does not name (declare) the object then why cant you do something like this afterwards;
    obj = new ClassC();or this;
    obj1 = new ClassA();The object doesn't yet exist you only putting memory aside for it. Its only at this point that your naming the object and setting the parameters for it.
    Why bother even allocating memory for the object without actually declaring the object? Surely combing the two statements is more efficient and makes more sense than separating them. Why do you need to allocate the memory and then give it a name?
    Also the following piece of code;
    ClassA objA = obj;Since obj is already intialized as being a new ClassA object, then is this simply declaring and instantiating a new object of type ClassA? And what is the difference between this and;
    ClassA objA = new ClassA();Thank You

  • Another question about using objects in SQL queries

    Hi gurus, I need your thoughts on this:
    I have created generic object type "tree" - the constructor takes as a parameter sql query returning "node_id" and "parent_node_id". As a tree - the object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Hi, TREE is not a function but PL/SQL object type I have written representing tree structure. The Oracle version is 10g.

  • Questions about ALV object model

    Hi,
    for a new report i´m planing to use the "new" ALV object model to create the ALV list. Now I´ve got two questions concerning this topic:
    - is it possible to switch the ALV into the edit mode like it´s possible if  the "old" CL_GUI_ALV_GRID class  
      is used?
    - how I can encolor specific cells?
    I couldn´t find any hints or demo programms for these questions
    Regards,
    Andy

    it is not possible to Edit the ALV using Object Model.
    For coloring...check this code.
    DATA: alv TYPE REF TO cl_salv_table.
    TYPES: BEGIN OF ty_tab,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
             color  TYPE lvc_t_scol,
           END OF ty_tab.
    DATA: wt_color TYPE  lvc_t_scol,
          wa_color TYPE  lvc_s_scol,
          w_color  TYPE  lvc_s_colo.
    DATA: wa_flight TYPE ty_tab.
    DATA: column_tab TYPE REF TO cl_salv_columns_table,
          column TYPE REF TO cl_salv_column_table.
    DATA: column_ref TYPE   salv_t_column_ref,
          wa LIKE LINE OF column_ref.
    DATA: it_flight TYPE STANDARD TABLE OF ty_tab.
    SELECT carrid connid FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    UP TO 10 ROWS.
    w_color-col = 4.
    w_color-int = 0.
    w_color-inv = 0.
    LOOP AT it_flight INTO wa_flight.
      w_color-col = 4.
      wa_color-fname = 'CARRID'.
      wa_color-color = w_color.
      APPEND wa_color TO wt_color.
      w_color-col = 6.
      wa_color-fname = 'CONNID'.
      wa_color-color = w_color.
      APPEND wa_color TO wt_color.
      wa_flight-color = wt_color.
      MODIFY it_flight FROM wa_flight.
    ENDLOOP.
    cl_salv_table=>factory(
      IMPORTING
        r_salv_table   = alv
      CHANGING
        t_table        = it_flight
    "get all the columns
    column_tab = alv->get_columns( ).
    column_tab->set_color_column( value = 'COLOR' ).
    column_ref = column_tab->get( ).
    "loop each column
    LOOP AT column_ref INTO wa.
      "Conditionally set the column type as key or non key
      IF wa-columnname   = 'CARRID'.
        column ?= wa-r_column.
        column->set_key( abap_true ).
      ENDIF.
    ENDLOOP.
    alv->display( ).

Maybe you are looking for

  • Stereo Bluetooth - no support for controls and other issues

    I have tried 2 stereo headsets now and both have the same issue. No controls other than Vol +/- are supported. Pause/Play doesn't work and >| and |< don't work. It's pretty clear that the 3.0 software doesn't support these functions. One Headset is t

  • Is Acrobat X Pro suitable for publishing an interactive book (as a PDF)?

    I am evaluating Acrobat Pro X as a possible vehicle for publishing an interactive reference book (a numismatic catalog).  The Bookmark capability of Acrobat is particularly attractive because the Bookmark panel functions as a very convenient and intu

  • ODBC Driver raising Fatal Error on Windows

    Dear Friends, I am facing FATAL Error Exception C5 from 8.1.6 and above oracle clients on windows 9X/2k/XP from VFP7/8. Error does not occur @ very first sqlexecute statement. It occurs at any no of statement. When user goes thru Foxpro Debugging mod

  • Help! one page displays incorrectly

    It is as if the assets won't layer on top of each other correct                                                                                                                    how it looks in safari after html exported to dreamweaver This is the o

  • I FOUND A FIX!!!

    YES I FOUND A FIX! MANY OTHERS HAVE ALREADY FOUND IT TOO!!! THE FIX IS... STOP PRESSING THE UPDATE BUTTON! THAT'S THE PROBLEM. THEIR SERVERS CAN'T HANDLE 500,000,000,000,000 CLICKS EVERY SECOND COMING FROM ALL OVER THE WORLD!