Can i copy values from one object to another ?

One more help..
How do i compare the input values with the ones in an object of another class ?
Can i copy values of one object of a class to different object of another class ?
Thanks,
Sanlearns

How do i compare the input values with the ones in an
object of another class ?By getting and comparing them?
Can i copy values of one object of a class to
different object of another class ?Yes, you can. But you shouldn't, as you're breaking encapsulation all over the place. You could use setter methods (if available) to set the values.

Similar Messages

  • How can you copy properities from one object to another?

    If you create a number of boxes and then decided to change the color of all of them (or add a stroke, shadow, etc), is there a way to copy your style from one to the others?  In Photoshop you can copy layer styles, so you don't have to re-do everything for every layer you want the styles to be on.  How is this done in InDesign (CS3)?
    Thanks.

    From the object styles panel. Click on the object, define style (new object style), click on the next object, apply that new style. Even quicker than copy/paste. Then, if you make a change to the style, all objects are updated. Just want to do one?  Alter the object itself (and create a new style while you're at it ).

  • Copying value from one cursor to another

    Hi,
    I have a problem while copying values from one cursor to another cursor.
    The code looks like below.
    PROCEDURE XYZ
                TransactionResultSet OUT NOCOPY types.ref_cursor,
    IS
                temp_cursor types.ref_cursor;
                wip_rec types.ref_cursor;
    BEGIN
    DECLARE
                    CURSOR temp_cursor IS
                SELECT ...........
    END;
    BEGIN     
        FOR wip_rec IN temp_cursor
        LOOP
        update tinsagr set something
        where {the condition}
            IF SQL%ROWCOUNT = 0 THEN
      dbms_output.put_line('this is test ');
            Fetch wip_rec into TransactionResultSet;
         END IF;
       END LOOP;so basically i want to iterate the "temp_cursor" and depending on the values i get it from here i shall update a table. Actually i want to exclude few records from "temp_cursor" and add it/copy rest of the records to "TransactionResultSet"
    That means say initially " temp_cursor" has 100 records and i updated 5 records in a table and same number of records should be excluded and rest should be added to the output cursor TransactionResultSet.
    How do i achieve it?
    while saving i am getting
    (1): PLS-00456: item 'WIP_REC' is not a cursor.
    Do any one has any idea what to do in such scenario?

    There are options like....
    SQL> CREATE OR REPLACE TYPE emp_obj AS OBJECT (ename VARCHAR2(50), dept NUMBER);
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE emp_tbl IS TABLE OF emp_obj;
      2  /
    Type created.
    SQL> set serverou on
    SP2-0158: unknown SET option "serverou"
    SQL> set serverout on
    SQL> DECLARE
      2    rc      sys_refcursor;
      3    v_ename emp.ename%TYPE;
      4    v_dept  emp.deptno%TYPE;
      5    ---End Of Local Varriable Declaration
      6    --Procedire declaration !
      7    PROCEDURE TEST_CUR(pi_out_ref_cur IN OUT sys_refcursor) IS
      8      emp_rec emp_tbl;
      9    BEGIN
    10      /* This BULK COLLECT can be done with explicit cursor,Ref Cursor
    11      with some simple modification, Here I have used implicit cursor! */
    12      SELECT emp_obj(ename, deptno) --Casting as the object
    13      BULK COLLECT
    14        INTO emp_rec
    15        FROM emp
    16       WHERE deptno = 10;
    17   
    18      dbms_output.put_line('Records selected are:');
    19      FOR i in 1 .. emp_rec.COUNT LOOP
    20        dbms_output.put_line(emp_rec(i).ename || '--' || emp_rec(i).dept);
    21      END LOOP;
    22      --Now we are filtering the record and may be doing some operation with each record.
    23      FOR i in 1 .. emp_rec.COUNT LOOP
    24        IF emp_rec(i).ename = 'KING' THEN
    25          --You can change this IF according to your need.
    26          emp_rec.DELETE(i);
    27        END IF;
    28      END LOOP;
    29      OPEN pi_out_ref_cur FOR
    30        SELECT * FROM TABLE(emp_rec); --Using the TYPE AS table.
    31    END TEST_CUR;
    32    /* Main execution or procedure calling section*/
    33  BEGIN
    34    --Actual calling
    35    TEST_CUR(rc);
    36    dbms_output.new_line;
    37    dbms_output.put_line('Now in Ref Cursor');
    38    dbms_output.put_line('****************');
    39    LOOP
    40      FETCH rc
    41        INTO v_ename, v_dept;
    42      dbms_output.put_line(v_ename || '--' || v_dept);
    43      EXIT WHEN rc%NOTFOUND;
    44    END LOOP;
    45 
    46  END;
    47  /
    Records selected are:
    CLARK--10
    KING--10
    MILLER--10
    Now in Ref Cursor
    CLARK--10
    MILLER--10
    MILLER--10
    PL/SQL procedure successfully completed.
    SQL>

  • How can i copy apps from one computer to another?

    how can i copy apps from one computer to another?

    You don't mention which operating system you have so it's difficult to provide an answer since the mac and Windows stores the files differently.
    The other thing you can do is just re-download the apps from the iTunes Store. Just login to the iTunes Store on the other computer using the same Apple ID. On the right-hand side of the iTunes Store page you will see a 'Purchased' link. Clicking on that will take you to a page that will list your past purchases which you can re-download to the new computer.

  • How we can get the values  from one screen to another screen?

    hi guru's.
         how we can get the values  from one screen to another screen?
              we get values where cusor is placed but in my requirement i want to get to field values from one screen to another screen.
    regards.
      satheesh.

    Just think of dynpros as windows into the global memory of your program... so if you want the value of a field on dynpro 1234 to appear on dynpro 2345, then just pop the value into a global variable (i.e. one defined in your top include), and you will be able to see it in your second dynpro (assuming you make the field formats etc the same on both screens!).

  • How can I copy songs from one iPod to another?

    I received a new iPod Classic (last generation) and I'm trying to transfer my songs from my old iPod Nano (also last generation).
    My iTunes library is also split up between my two parent's houses and I only have half the songs on my Nano in this computer's library.
    Is there a way to copy only the songs on the +iPod Nano+ (not the iTunes library) and drop them onto the new iPod?

    *Is there a way to copy only the songs on the iPod Nano (not the iTunes library) and drop them onto the new iPod?*
    You can't copy directly from one iPod to another, you have to copy the songs back to iTunes and update the new iPod from there. If you have any iTunes Music Store purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. You'll find details in this article: Copying iTunes Store purchases from your iPod to a computer
    The transfer of content from other sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can read reviews of some of them here: Wired News - Rescue Your Stranded Tunes
    TuneJack Windows Only
    iPod2PC Windows Only
    iGadget Windows Only
    iDump Windows Only
    SharePod Windows Only
    iRepo Mac and Windows
    iPodRip Mac & Windows
    YamiPod Mac and Windows
    Music Rescue Mac & Windows
    iPodCopy Mac and Windows
    There is also a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows or a Mac. The procedure is a bit involved and won't recover playlists but if you're interested it's available at this link: Two-way Street: Moving Music Off the iPod

  • How can I copy text from one card to another while creating cards using Iphoto?

    I created two cards with different pictures using Iphoto on Macnotebook. 
    I want to use the same text message.
    How can I copy text from one card to another?

    select the text and copy (edit menu ==> copy) tehn gpo to the next card and paste
    LN

  • Can I copy clips from one project to another?  The clips are still frames captured within a video event.

    Can I copy clips from one project to another?  The clips are frames saved as stills from a video event.  I try the copy & paste but it does not seem to work.

    The video was converted into MP4 and then I could get it into iMovie events.  I had right clicked and saved farmes as stills.  ABout 50 of them,  When I tried to copy and paste those stills into another project I couldn't. They came up blank.
    I ended up going to a Genius appointment at my APPLE store this afternoon and was told that those "stills" aren't really anything. Not a .jpg or video, so the program doesn't recognize them.  So instead I'm using the Project with the 50 stills and copying other .jpgs and video into it.  (This is for a 1961 Class Reunion, so it's old stuff).  Seems to work so far.
    So bottom line seems to be I can use these stills created from a video in the project in which they were created, but no where else.  Do you know a way around this?

  • Can Pages copy text from one page to another automatically?

    Can Pages automatically copy text from one page to another?
    For example recurring text in a document e.g. addressee details or a date (not today's date).
    I want to type the topic title of one letter and have it automatically filled into the correct field in the next page which will be a letter to a different recipient.
    The letter text will be different for each recipient so mail merge probably won't work.
    Thanks
    Andy

    Thanks that worked great!!!(for the first line)
    Now why wont it populate more than the one other text field?
    F.Lic.Table1.Row1.agt_ssn_lic.rawValue = xfa.event.newText;
    F.PAGE3.agt_ssn_1.rawValue = xfa.event.newText;
    F.PAGE4.agt_ssn_2.rawValue = xfa.event.newText;

  • How to copy value from one field to another in a Apex Form

    Hello guys,
    There are 2 addresses one is shipping and other is billing. I do not want the customer to re-enter all the details if it is the same address. So based upon an action, it should take the live values from one address field and populate the other address field. I know in JS you can do it, but how to implement that in Apex?
    I guess using Dynamic Actions to achieve this in Version 4 but do not know how. Read quite some info but no luck.
    Thanks in advance!

    Hi,
    I have assumed that you have your shipping address at the top of the page, and then further down the page you have your billing address that you want to enable the users to copy (if this is in reverese, you will need to switch the js variables in the code following).
    I would create a Select List item above the 'Billing Address' details, called PX_SAME_ADDRESSThis select list would be static, with the options Null.
    I also assume you would have pairs of address page items such as:
    PX_SHIPPING_ADDRESS_L1
    PX_BILLING_ADDRESS_L1
    PX_SHIPPING_ADDRESS_L2
    PX_BILLING_ADDRESS_L2
    PX_SHIPPING_POST_CODE
    PX_BILLING_POST_CODEThen copy the following code into the HTML Header of the page definition:
    <script language="JavaScript" type="text/javascript">
    function copyAddress()
       if( $x('PX_SAME_ADDRESS').value == 'YES')
         $x('PX_BILLING_ADDRESS_L1').value = $x('PX_SHIPPING_ADDRESS_L1').value;
         $x('PX_BILLING_ADDRESS_L2').value = $x('PX_SHIPPING_ADDRESS_L2').value;
         $x('PX_BILLING_POST_CODE').value = $x('PX_SHIPPING_POST_CODE').value;
       else //Clear Address Fields
         $x('PX_BILLING_ADDRESS_L1').value = " ";
         $x('PX_BILLING_ADDRESS_L2').value = " ";
         $x('PX_BILLING_POST_CODE').value = " ";
    </script>Then, in your PX_SAME_ADDRESS item, copy the code below into the Element > HTML Form Element Attributes field.
    onChange="copyAddress();"Hopefully this works for you too, and should give you some basis to play around with.
    Amanda.

  • PSE12 Organizer - can you copy photo from one folder to another and import copy into Organizer and still have original in other folder

    I have been using folders to organize all my pictures and I will copy photos from folder to folder, often having them in 2 or 3 folders based on use.  I tried to copy a photo in Organizer PSE12 from one folder to another and you can only move it, that means I can only have one copy of the photo.  That is fine if I am using tags and want to search for it, but I want to have mult copies in mult folders. Organizer will recognize that it is there but it won't import it into the new folder. Until I move it, it stays in the original folder.  I can drag it out of Organizer and drop (copy) it into a new folder fine, but it won't show in organizer in the new folder.  Is there any way to copy and have multiple copies show up in multiple folders?

    Hi,
    The organizer works on the principle of not having multiple copies of the same photo.
    If you have multiple copies spread in different folders, then making changes to one doesn't affect the others. The use of tags and albums are there to give different views of your photos.
    You can't have multiple copies with exactly the same name even if they are in different folders. You could select a photo and duplicate it (File -> Duplicate) and then move the copy into a different folder but the name will be different.
    If you want different folders for a specific reason, it is possible to use albums to collect the group of photos and then export them to a new folder outside of the organizer. You can also rename on export which is useful if you want to arrange the photos in a specific order.
    Hope that helps a bit.
    Brian

  • Copying fileds from one object to another

    Hi!
    I have an xmlbean object A created from an xsd and I have an object B created by axis from a wsdl defined by the same xsd as object A.
    I need to copy all the values from object A to object B, the objects are logically of the same type but are instances of different clases since object A is an xml bean object with references to XmlObject and object B is created by Axis from a wsdl. How would I copy all the fields from A to B? I thought of reflection but there should be an easier way...?
    Thanks,
    I.

    Post something with CODE so that we can help you .

  • How can I pass values from one node to another

    Give a standard and efficient way to pass values from child to parent

    hai Prathap
    You can use the custom event  for passing values from child to parent

  • How to copy value from one frame to another frame

    Hi,
    I am new to swing prgramming .
    I have created a menu called " TopFrame " and it contains toplevel menu item "select" and select Menu contains subitems "firstframe", "secondframe", "thirdframe" and "Exit".
    When i click select->firstframe it displays a new Frame f1 with a
    textfield t1. I enter value in textfield t1 and minimise the frame.
    similarly when i click select->secondframe it displays a new Frame f2 with a textfield t1. I enter value in textfield t1 and minimise the frame.
    now when i click select->thirdframe it displays a frame f3 which contains button called "Totalvalue" and a textfield t2 .
    MY question is after opening frame f3 when i press "Totalvalue" button it should add the values from textfield t1 from both the frames f1 and f2 and display the result in textfield t2 of frame f3.
    Actually my application is big but for better understanding i have reduced the description above.
    I am posting the code...Kindly help me
    thanks in advance..
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Component;
    import java.awt.Checkbox;
    import javax.swing.*;
    import java.text.DecimalFormat;
    import javax.swing.JComponent;
    public class MainWindow extends Frame {
      public MainWindow() {
        super("TopFrame");
        setSize(600, 600);
        // make a top level File menu
        FileMenu fileMenu = new FileMenu(this);
        // make a menu bar for this frame 
        // and add top level menus File and Menu
        MenuBar mb = new MenuBar();
        mb.add(fileMenu);
        setMenuBar(mb);
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            exit();
      public void exit() {
        setVisible(false); // hide the Frame
        dispose(); // tell windowing system to free resources
        System.exit(0); // exit
      public static void main(String args[]) {
        MainWindow w = new MainWindow();
        w.setVisible(true);
        w.setBackground(Color.white);
    private static MainWindow w ;
    protected TextField t1, t2;
      class FileMenu extends Menu implements ActionListener {
      private MainWindow mw; // who owns us?
      private MenuItem itm1   = new MenuItem("Firstframe");
      private MenuItem itm2   = new MenuItem("Secondframe");
      private MenuItem itm3   = new MenuItem("Thirdframe");
      private MenuItem itmExit = new MenuItem("Exit");
        public FileMenu(MainWindow main)
        super("Select");
        this.mw = main;
        this.itm1.addActionListener(this);
        this.itm2.addActionListener(this);
        this.itm3.addActionListener(this);
        this.itmExit.addActionListener(this);
        this.add(this.itm1);
        this.add(this.itm2);
        this.add(this.itm3);
        this.add(this.itmExit);
      public void actionPerformed(ActionEvent e)
        if (e.getSource() == this.itm1)
         final Frame f1 = new Frame("first frame opened");
         f1.setSize(500,500);
         f1.setLayout(null);
         Label l1 = new Label("Enter first value below");
         l1.setBounds(220, 250, 240, 24);
         f1.add(l1);
         TextField t1 = new TextField("0");
         t1.setBounds(260, 300, 40, 24);
         f1.add(t1);
          f1.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e)
              //System.exit(0);
               f1.dispose();
         f1.show();
       else
       if (e.getSource() == this.itm2)
         final Frame f2 = new Frame("second frame opened");
         f2.setSize(500,500);
         f2.setLayout(null);
         Label l1 = new Label("Enter first value below");
         l1.setBounds(220, 250, 240, 24);
         f2.add(l1);
         TextField t1 = new TextField("0");
         t1.setBounds(260, 300, 40, 24);
         f2.add(t1);
          f2.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e)
              //System.exit(0);
               f2.dispose();
         f2.show();
       else
       if (e.getSource() == this.itm3)
         final Frame f3 = new Frame("third frame opened");
         f3.setSize(500,500);
         f3.setLayout(null);
         JButton b1  = new JButton("Totalvalue");
         b1.setBounds(220, 300, 180, 24);
         f3.add(b1); 
         TextField t2 = new TextField("0");
         t2.setBounds(410, 300, 40, 24);
         f3.add(t2);
         f3.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e)
              //System.exit(0);
               f3.dispose();
         f3.show();
       else
       { mw.exit();}

    hi ,
    I have extended my application ...i have some doubts can you please clear my doubts..
    Now i have two textfields t1 and t2 in both the frames frame 1 and frame 2 and i have 2 buttons Button1 and Button2, textfields t5 and t6 in frame3.
    Now my question is i enter some values in t1 and t2 in frame1, and t1 and t2 in frame2 and minimise or close them...when i open frame3 and press Button1 it should take values from t1 in both frame1 and frame2 , add them and display the result in t5( in frame3)... similarly when i press Button2 it should take values from t2 in both frame1 and frame2, add them and display the result in t6(in frame3).
    Can you please tell me how can i do this?
    Thanks in advance.
    I am posting the code...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.Component;
    // Make a main window with a top-level menu: File
    public class MainWindow extends Frame {
        public MainWindow() {
            super("Test Window");
            setSize(500, 500);
            // make a top level File menu
            FileMenu fileMenu = new FileMenu(this);
            // make a menu bar for this frame
            // and add top level menus File and Menu
            MenuBar mb = new MenuBar();
            mb.add(fileMenu);
            setMenuBar(mb);
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    exit();
        public void exit() {
            setVisible(false); // hide the Frame
            dispose(); // tell windowing system to free resources
            System.exit(0); // exit
        public static void main(String args[]) {
            w = new MainWindow();
            w.setVisible(true);
        private static MainWindow w ;
        protected TextField t1, t2,t5,t6;
        // Encapsulate the look and behavior of the File menu
        class FileMenu extends Menu implements ActionListener {
            private MainWindow mw; // who owns us?
            private MenuItem itmPE   = new MenuItem("ProductEvaluation");
            private MenuItem itmPRE   = new MenuItem("ProcessEvaluation");
            private MenuItem itmTE   = new MenuItem("TotalEvaluation");
            private MenuItem itmExit = new MenuItem("Exit");
            public FileMenu(MainWindow main) {
                super("File");
                this.mw = main;
                this.itmPE.addActionListener(this);
                this.itmPRE.addActionListener(this);
                this.itmTE.addActionListener(this);
                this.itmExit.addActionListener(this);
                this.add(this.itmPE);
                this.add(this.itmPRE);
                this.add(this.itmTE);
                this.add(this.itmExit);
            // respond to the Exit menu choice
            public void actionPerformed(ActionEvent e) {
                if (e.getSource() == this.itmPE) {
                   final Frame frame1 = new Frame("Frame1");
                    frame1.setSize(700,700);
                    frame1.setLayout(null);
                    t1 = new TextField("");
                    t1.setBounds(230, 230, 50, 24);
                    frame1.add(t1);
                    t2 = new TextField("");
                    t2.setBounds(330, 230, 50, 24);
                    frame1.add(t2);
                    frame1.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                            frame1.dispose();
                    frame1.setVisible(true);
                else
                if (e.getSource() == this.itmPRE) {
                  final  Frame frame2 = new Frame("Frame2");
                    frame2.setSize(700,700);
                    frame2.setLayout(null);
                    t1 = new TextField("");
                    t1.setBounds(230, 230, 50, 24);
                    frame2.add(t1);
                    t2 = new TextField("");
                    t2.setBounds(330, 230, 50, 24);
                    frame2.add(t2);
                    frame2.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                            frame2.dispose();
                    frame2.setVisible(true);
                else
                if (e.getSource() == this.itmTE) {
                  final  Frame frame3 = new Frame("Frame4");
                    frame3.setSize(700,700);
                    frame3.setLayout(null);
                    t5 = new TextField("");
                    t5.setBounds(170, 230, 50, 24);
                    frame3.add(t5);
                    t6 = new TextField("");
                    t6.setBounds(270, 230, 50, 24);
                    frame3.add(t6);
                    ActionListener action = new MyActionListener(frame3,t5,t6);
                    Button b1  = new Button("Button1");
                    b1.setBounds(170, 400, 120, 24);
                    b1.addActionListener(action);
                    frame3.add(b1);
                    Button b2  = new Button("Button2");
                    b2.setBounds(300, 400, 120, 24);
                    b2.addActionListener(action);
                    frame3.add(b2);
                    frame3.addWindowListener(new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                            frame3.dispose();
                    frame3.setVisible(true);
                else {
                    mw.exit();
          class MyActionListener implements ActionListener {
                private Frame frame3;
                private TextField t5;
                private TextField t6;
                public MyActionListener(Frame frame3,TextField tf5,TextField tf6)
                    this.frame3 = frame3;
                    this.t5 = tf5;
                    this.t6 = tf6;
                public void actionPerformed(ActionEvent e) {
                    String s = e.getActionCommand();
                    if (s.equals("Button1")) {
             // I think code for the Button1 action can be written here  
          else if (s.equals("Button2")) {
             // I think code for the Button2 action can be written here  
           

  • Hold a start frame or copy transformation from one object to another

    Hi There,
    I have some stop-motion clips that are in the timeline and are reversed. When I play the timeline, these items move out of frame.
    However, only the movement is animated and I need them to be on screen before they move off. Can you hold a start frame so that the stay on screen until they animate?
    If not, I have a still of the frame I would like to hold but can't figure out how to copy the transformations from the animated clip to the still so they match perfectly. How do you do this?
    Any help would be appreciated.
    Cheers
    Ben

    Ended up copying and pasting the transformations by hand which was very painful as there seems to be a big with copying and pasting transformations between objects.
    You have to click in the box, hit the arrow key, select all, copy, click in the box for the next object, hit the arrow key, select all, paste.
    If you just click the box for the fist object, copy, click in the next box for the next object and paste, nothing happens!

Maybe you are looking for