Save the state of the bean within the bean

If i have a bean say BigBean which contains another bean say SmallBean.
Both of SmallBean and BigBean implment seriablizable. If i save the BigBean, will the state of the SamllBean be saved automatically ?

Yes.. if your SmallBean field is non-transient.

Similar Messages

  • Save object state but not the data

    Hi Everyone,
    I'm trying to serialize a form so that I can recover the state information such as size of the form at close, size of splitpane separator, and size of each column of a JTable within the form.
    However, I don't want to save the JTable's data. Also, I'm not sure about the procedure for deserialization.
    For example if I have a line like:
    frame.getContentPane().add(new JTable(tableModel));
    next time I read the form, it already has the table within it so I shouldn't really create it or add the JTable to it, am I right?
    Any comment to clarify this is really appreciated.
    Thanks,
    Al

    Ok here is what you got to do just like createing your own subclass of JFrame
    you should also create subclesses all the GUI componants you going to use in the application that need their state saved and restored.
    All those class should implement a comman interface which has getState and setState (Ex:- CJTextArea, CJTextField, CJTable, CJFrame, CJInternalFrame, CJPanel .....). and thos subclasses should be used to create the widows
    You will also need a several state classes for various types of components
    such as
    ComponentState -- Super class
    ContainerState -- to hold stateobjects given by the components in a perticuler Container (ex:- JPanel)
    FrameState
    TextCompState -- text components (JTextField,JTextArea)
    ListState
    TableState
    and the getStste and setSatate of the form should be written to return an object which contains the state of the form and all the other state objects returned by its nested components.
    This kind of thing is done in most of the software organization in (Not just to restor the state but for many different tasks) that develop large applications with complex user interfaces.
    Its worth spending some time to devalop such an API becouse it can be used in any programdeveloped after that.
    The company I work has done excatly that some time ago but I cant post any code here (You know why)

  • I finally got my iphone out of recovery mode, after 7.1.1 but now it won't accept my Icloud info and states "An error occrured while trying to save the Icloud account?" What do I do????

    I tried updating my iphone 4 to 7.1.1 and it went straight into recovery mode.... I finally got my iphone out of recovery mode, but now it won't accept my Icloud info and states "An error occrured while trying to save the Icloud account?" What do I do????

    Same situation. I installed iOS 8 beta 4 on my iPhone 5 and a few days later my iCloud account disappeared. My contacts and calendar entries are gone.
    My Mac Mini and MacBook do sync as they should with iCloud.
    When I try to log in to iCloud on the iPhone (the username shows "[email protected]" and password shows "required"), I put in my username and password and tap "Sign In", It says "Verifying" at the top and after a while checkmarks appear next to my username and password. Then I get an error message saying "An error occurred while trying to save the iCloud account". If I tap OK the message goes away, leaving my username and password intact (checkmarks are now gone). If I tap "Sign In" again I get a message saying " '[email protected]' is Already Added. This iCloud account has already been added to your iPhone". If I go back to Settings and then go into iCloud again it's not set up and appears as I stated at the beginning of this paragraph.
    Nothing works and the sync does not occur. Contacts are empty and Calendar has no entries.

  • How to save the state of the changed visible layers in pdf, pre-designed in Indesign

    Hi,
    I have made an Indesign (CS 5.5) file with some textfields (no button), and interactive buttons. And saved it as Interactive PDF.
    I have made a fillable form out of the textfields in Adobe Acrobat Pro X, and the interactive buttons are working in PDF.
    When you open the PDF in Acrobat Reader or Pro, fill in text and change a state of the button and save the file: all the changes (text and state) are saved.
    When you open the PDF in Acrobat Reader or Pro, fill in text and save the file: the changes (text) are saved.
    When you open the PDF in Acrobat Reader or Pro, and only change a state of the button and save the file: the changes are NOT saved.
    What I mean with states of a button: SHOW/HIDE or ON/OFF etc.
    Does anyone know what I'm doing wrong. Or is it not possible to only save changes in states of a button?
    Thanks in advance for thinking with me.
    Josiane

    You would have to check your color management and things like overprint settings or the ink levels of the color components. Streaking is usually a sign of areas getting oversaturated and the automatic adjustments in the printer driver being unable to compensate. and then of course other factors may figure in like banding inherent in using gradients across large areas, out of gamut issues for certain colors and what have you. You'd have to be much more specific about all of that for anyone to even begin to advise specifically...
    Mylenium

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • How to save the state of a program ?

    I am working on a program, where one can open several tabs with JEditorpanes, and in the tabs one can read a webpage. I was wondering if there is a way to save the state of the program. For example the program starts with three tabs, but say that the user opens three more tabs. How would one save this info, so that it could be retrieved again when the program is restarted ?????

    Check out java.util.prefs.Preferences. This is the standard API for loading/saving preferences between sessions of an application.

  • How do you save "game state" so the user can continue next time?

    I'm not sure what the correct game terminology is for this, but how do you save "game state" so the user can continue next time?
    This seems like a pretty important feature for building some games, we don't want users to have to start over everytime.
    Any ideas if this is possible?

    Check out my blog post on the PersistenceManager:
    http://www.unitedmindset.com/jonbcampos/2010/11/01/flex-4-5-persistencemanager/
    This will help you understand how to store the data. When the app starts up again get the state information from the persistencemanager and reset you game to the state you need. It requires a bit of code for the startup, but it is relatively simple.

  • Save the visibility state of layers?

    When designing layouts for a web site with a lot of different pages, I like to keep everything in one psd document, so that all the fixed graphics stay where they belong. Toggling the visibility of various layers to "change between pages" becomes quite a task, when there's lots of material.
    So, what I'm after is a possibility to name and save the current state of visibility of all the layers in the psd document. In other words, I could have a "visibility state" called "main page", for example, which means I have all the relevant layers visible: "main page title", "main page header", "main page menu", "main page content" etc., and the rest of the layers would be invisible. Then I could have another saved state called "news page", which means all "news"-related layers would be visible and the rest invisible.
    Is there any possibility to do this in Photoshop? If not, I'd really appreciate such option!

    Thanks Eric. It appears that I was a couple of steps behind from the Adobe crew, though. Such feature indeed exists, since cs1 actually, it's called "layer comp".

  • My mac no longer saves its state when the battery runs out.. ??

    Earlier when My mac drained it's battery & was not plugged in, it would give me a warning then save it's state & shut down.... Now 1 1/2 years into my Macbook Pro 17" intel it turns off but doesn't save my state, so anything not saved is lost.. (basically as if the power was pulled ) is there a setting for this ? or is my battery no longer performing well enough for my mac to safely save it's state before it turns off ?
    Anyone ?
    Cheers Tom....

    Battery Information:
    Model Information:
    Serial Number: SMP-ASMB014-38a8-97f
    Manufacturer: SMP
    Device name: ASMB014
    Pack Lot Code: 0002
    PCB Lot Code: 0000
    Firmware Version: 0110
    Hardware Revision: 0500
    Cell Revision: 0102
    Charge Information:
    Charge remaining (mAh): 3728
    Fully charged: No
    Charging: Yes
    Full charge capacity (mAh): 3728
    Health Information:
    Cycle count: 242
    Condition: Check Battery
    Battery Installed: Yes
    Amperage (mA): 163
    Voltage (mV): 12599
    System Power Settings:
    AC Power:
    System Sleep Timer (Minutes): 105
    Disk Sleep Timer (Minutes): 180
    Display Sleep Timer (Minutes): 90
    Automatic Restart On Power Loss: No
    Wake On AC Change: No
    Wake On Clamshell Open: Yes
    Wake On LAN: Yes
    Display Sleep Uses Dim: Yes
    Battery Power:
    System Sleep Timer (Minutes): 15
    Disk Sleep Timer (Minutes): 10
    Display Sleep Timer (Minutes): 3
    Wake On AC Change: No
    Wake On Clamshell Open: Yes
    Display Sleep Uses Dim: Yes
    Reduce Brightness: Yes
    Hardware Configuration:
    UPS Installed: No
    AC Charger Information:
    Connected: Yes
    Charging: Yes

  • I purchased an iPhone 3 and had photos on it. Started having issues within 30 days and could replace it. Moved photos to back up on iCloud. did not restore new phone from back up how can i save the new photos and retrieve the old ones?

    I purchased an iPhone 3 and had taken some photos on it. I started having issues within 30 days and could replace it. So I created an iCloud account and  saved those photos as a back up on iCloud. I did not restore my new phone from back up because I did not realize I needed to restore and not just activitate it. How can I save the new photos, apps, and other stuff but retrieve the old photos?

    If all you want is your old photos, you could backup your new phone using iTunes, then restore it from your iCloud backup, import the old photos to your computer, then restore it from the backup your made in iTunes returning your newer data to your phone.  If you want your old photos on your phone, sync them there from your computer using iTunes.  The process would look like this:
    Connect your phone to your computer, when it appears in iTunes on the left sidebar right-click on it and select Transfer Purchases; right-click again and select Backup.
    Disconnect from your computer and go to Settings>General>Reset>Erase All Content and Settings to return it to new
    Go through the activation setup, choosing to Restore from iCloud backup.  Make sure your phone is plugged into a charger and has access to wi-fi as this can take hours to complete.
    When complete, without connecting your phone to your computer, open iTunes and go to Preferences.  On the Devices tab check "Prevent...from syncing automatically"
    Now import the old photos to your computer (see http://support.apple.com/kb/HT4083)
    When done, open iTunes, right-click on the name of your phone on the left sidebar and select Restore from Backup, choose the backup you made in step 1.
    Go to the Photos tab and select the photos you want to sync to your phone and sync.

  • How to save the bean area content to the database

    DB version:10g
    forms version:10g
    Hi Guys,
    I have used text editor PJC/java bean in my screen where i have attched it to "bean area" field.Iam able to do all the changes to the to the text entered in this "bean area" but when i save this in the database it says no changes to save.in my table the column type is Varchar2.
    any ideas of how to save the changes of a bean area to the database???
    regards

    @François Degrelle -Ya frank i have already checked Get_Custom_Property() but the problem is this is returning the HTML code like
    html>
    <head>
    </head>
    <body>
    This is a <b>styled</b> (<i><u>HTML</u></i>) text<br><b><font color="#0066FF" face="Arial">
    displayed</font></b> and <b><font color="#008000" face="Arial">edited</font></b><br>
    in an <b><font color="#FF0000" face="Arial">Oracle Forms</font></b> application
    </body>
    </html>
    but want the data to be in the formatted so that i can store the data in the column and retrieve formatted text into the text field so that user can see only the formatted text that is lets say
    shdjshdsjdsdsdlas -original text
    shdjshdsjdsdsdlas -formatted text
    now i want to strore shdjshdsjdsdsdlas this text into teh database so that when i retrieve shdjshdsjdsdsdlas this data should be shown.
    regards
    Edited by: user123 on May 27, 2011 4:22 PM

  • Question : is it possible to save the contents of the screen in a graphic object ?

    Assume i asked the machine to plot something (for example within the Function application).Is it possible to save the contents of the screen in a graphic variable (GROB ?) for later reference ?

    Hi!, EmileG: From connectivity kit, connected to HP PRIME, you can ... Copy Screen opens the Screen Shot dialog box from where you copy or, save an image of  the virtual calculator screen.You can leave this dialog box open as you prepare instructional materials and reports that require screen captures  from the calculator.The Screen Shot  dialog box has the following options and buttons:• Border: A slider bar to give the image a boarder and change the thickness, of the border.• Size: A slider bar that changes the size, of the image.• Capture:  Update  the image, to reflect the current state of the  virtual calculator display.• Copy: save  a copy  of  the  current  image to  the clipboard.• Save: save  a copy  of  the  image to  a file. In  this case, you  can specify a name and location  for the saved  file.• Close: close the Copy  Screen  dialog box.

  • How do I save and import my bookmarks from another hard drive? When I try to open the installed Firefox on the old drive, it (obviously) opens a browser from the new main drive, free of bookmarks. Is there a way I can save the bookmarks on the old drive w

    How do I save and import my bookmarks from another hard drive? When I try to open the installed Firefox on the old drive, it (obviously) opens a browser from the new main drive, free of bookmarks. Is there a way I can save the bookmarks on the old drive without opening a browser?
    The guts of my computer were rearranged and I got a new main hard drive. My old one is still in there and I can get stuff from it, but when I go to the Mozilla folder on the old one, I can't figure out if there's anything I can do to get all my bookmarks from that drive to my new one, where Firefox is newly installed.

    If you open Firefox then Firefox will always use the default profile folder as found via profiles.ini on your system drive.
    You either need to import the file in your current default profile or copy the file to your current profile folder while Firefox is closed.
    Firefox 3 stores the bookmarks and the browser history in [http://kb.mozillazine.org/places.sqlite places.sqlite] and no longer creates an HTML backup by default.
    There are also (five) JSON backups in the bookmarkbackups folder within the Firefox profile folder.
    You can either copy the file places.sqlite to your [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] or import the most recent JSON backup from the bookmarkbackups folder of that old profile.
    See:
    http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox
    http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    See http://kb.mozillazine.org/Profile_folder_-_Firefox
    "Application Data" in XP/Win2K and "AppData" in Vista/Windows 7 are hidden folders.
    See http://kb.mozillazine.org/Show_hidden_files_and_folders
    Go to: Control Panel > Folder Options > "View" tab > under "Hidden files and folders", select "Show hidden files and folders".
    You may want to un-check the box "Hide extensions for known file types" to see the file extensions of all files.

  • How can I save the first dept. for an employee in a transport table?

    Hi All,
    I have created a table to store the transports to an employee from department to another department.
    the first department number to every employee is stored at the parent table called employees.
    when I insert a new record to the transports table (which is the child for the parent employees) for an employee and the manager agrees for this transport the original value of department number in employees table will be changed to the new one. I done this process through a db trigger on the transport table.
    Now the problem is that the original value of the first department number will be lost cause of the db trigger that changes this value after manager agreement!
    I looked to solve the problem by adding a new column in employees table to save the first dept. no. for each employee only if Count of records = 1 for that employee like this:
    -- Before Update DB Trigger on Transports Table:
    DECLARE
    pragma autonomous_transaction;
    N NUMBER;
    BEGIN
    SELECT count(EMP_SID) -- emp-sid is the FK referenced from employeess.emp_sid
    INTO N
    FROM TRANSPORT_TRANS
    where emp_sid=:NEW.EMP_SID
    GROUP BY EMP_SID;
         IF :NEW.AGREE_FLG = 1 AND N = 1 THEN -- If the manager agrees and this record is the first one for that employee
         UPDATE EMPLOYEESS E
         SET E.FST_AD=E.ADMINISTRATION_SID, -- E.ADMINISTRATION_SID has the oroginal value for admin no. and FST_AD is the new column to save the first value
                E.FST_HE=E.HEADQUARTERS_SID,
                E.ADMINISTRATION_SID = :OLD.ADMIN_SID, -- changing the value with then new one added on the table
                E.HEADQUARTERS_SID = :OLD.HEAD_SID
               WHERE E.EMP_SID = :OLD.EMP_SID;
         ELSIF :NEW.AGREE_FLG = 1 AND N != 1 THEN -- if the manager agrees but the record is not the first record for that employee
         UPDATE EMPLOYEESS E
            SET   E.ADMINISTRATION_SID = :OLD.ADMIN_SID, -- only change the original  values
                     E.HEADQUARTERS_SID = :OLD.HEAD_SID
                     WHERE E.EMP_SID = :OLD.EMP_SID;
         END IF;
    END;But the form gives me this error if I deleted (pragma autonomous_transaction;) st. :
    ORA-04091: table transports is mutating, trigger/function may not see it
    But when I keep it, the form gives me this error:
    ORA-06519: active autonomous transaction detected and rolled back
    Edited by: Dev. Musbah on Aug 18, 2009 2:09 AM

    Dev. Musbah,
    First make sure that the insert statement executes. And check whether other error messages are getting. Currently you are checking only NO_DATA_FOUND. so change the exception part with
    EXCEPTION
         WHEN NO_DATA_FOUND THEN NULL;
         WHEN OTHERS THEN MESSAGE('Some Error Occured');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • I have lightroom 5.7. Now I have apple TV to connect my Mac to the TV scree. I wish to do a slide show on the TV. However, on the Mac, using ITunes to share photos with the TV, I cannot locate all photo files. What is the best way to save the slide show a

    I have lightroom 5.7. Now I have apple TV to connect my Mac to the TV scree. I wish to do a slide show on the TV. However, on the Mac, using ITunes to share photos with the TV, I cannot locate all photo files. What is the best way to save the slide show and put it where the Mac sharing can find it? So far, I made on one folder in Lightroom, put some photos there and I found them easily. Can this be done with a slide show? Please help quickly! Also worried that the photos I put on the new folder are hard to find afterwards, when the show is done. Where do they go when I delete from from the new folder?I am not alone

    Not that I'm aware of. You just export JPEG copies to a folder that you can point iTunes to. For instance, I have created a folder in my Pictures folder called Apple TV. And within that folder I have other folders of pictures that I can choose from in iTunes to share with Apple TV. But there doesn't seem to be any way to share a Lightroom slideshow. If you have laid to create a video file that would probably work. Apple TV is a little clunky in my opinion. Some things are a little more difficult to do now than they were a while back. I probably haven't provided you with much help, but just keep experimenting and I think you will figure it out.

Maybe you are looking for

  • I-photo in ilife 08 unexpectedly quits -  os 10.4.10 does not quit

    Running iphoto in ilife '08 on i-mac G-5, OS 10.4.10,Have created numberous book Background: I have successfully assembled 4 books, simple, 20 page iphoto 08 books and saved to iphoto then to iweb. Yet when assembling a ibook at page 35, I went into

  • Firefox the only browser that works?

    I'm having a really strange problem... Since maybe a couple weeks ago Firefox is the only browser that works for me. Other browsers can't seem to connect to ANY website. I've tried Safari and Opera... they don't work. I have: tried several different

  • Lightroom 1 to Lightroom 2 file transfer

    I purchased a new copy of Lightroom 2 to replace my copy of Lightroom 1. I installed Lightroom 2 and it pulled prior photos from Lightroom 1. Unfortunately, The next time I imported photos they were loaded on Lightroom 1, but not Lightroom 2. I remov

  • Problem on viewing SQVI

    Hi All,   Could you please help to resolved this issue. User reported one problem, She is Executing the Transaction SQVI in that Quickview  she is entering MAN_CONDREC, after executing this report she is getting the selection screen after executing t

  • 3 jbuttons in a cell in a jtable

    hi i have a problem entering 3 buttons into 1 cell i a jtable can someone give me a good example how i put 3 buttons in the same cell i have a button render and its working good with 1 button but i just cant find a way to enter 3 buttons in the same