Save and restore state on a tree

Hi,
We're using a tree in a pagefragment and we want to save the state when someone change it.
We save the state on treenodeX_action with this:
tree1.saveState(getFacesContext());
And we try to restore in every page with this code:
//PRERENDER METHOD
left leftFragment = (left)getBean("left");
leftFragment.getTree1().restoreState(getFacesContext(), leftFragment.getTree1());
But we get an exception (nullpointer exception) when we use .restoreState method.
What are we doing wrong?
Thanks in advance.

is it imposible?

Similar Messages

  • How Do I save and restore keywords, categories and tags in PE6?

    I have my photos backed up on an external hard drive, but if and when my hard drive crashes, how do I get back the tags, keywords, categories, etc. that I have used in the PE 6 Organizer?  Can I save them and, if so, when I need to restore this, how do I do that?  How do I reconnect tags, categories, keywords, etc. with photos that I re-import after a hard drive crash?

    John: Many thanks for this help.  I use CS3, but my mom has PE6 and I'm trying to help her.  I'm not as familiar with PE6.
    Again, thanks,
    Mark
    Date: Sat, 12 Sep 2009 13:24:12 -0600
    From: [email protected]
    To: [email protected]
    Subject: How Do I save and restore keywords, categories and tags in PE6?
    PSE keeps your keywords, categories, albums, stacks, version sets, captions, notes, dates, and star ratings in a file in a "catalog folder".  (Do Help > System Info to find the location of your catalog folder).  When you make a backup with the PSE File > Backup command, it copies all your photos and the catalog file into the backup.   When you restore from that backup, it copies that catalog file and all your photos to the location you specify.
    >

  • Save and Restore Color State

    Hi,
    I'm having troubles saving and restoring the color state with jogl
    This would be an example:
    gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT);
    gl.glLineWidth(ParCoordsRenderStyle.Y_AXIS_LINE_WIDTH);
    gl.glColor4f(0.8f, 0.8f, 0.8f, 0.5f);
    gl.glBegin(GL.GL_POLYGON);
    gl.glVertex3f(fXTextOrigin, fYTextOrigin, 0.002f);
    gl.glVertex3f(fXTextOrigin + fBackPlaneWidth, fYTextOrigin, 0.002f);
    gl.glVertex3f(fXTextOrigin + fBackPlaneWidth, fYTextOrigin + fBackPlaneHeight, 0.002f);
    gl.glVertex3f(fXTextOrigin, fYTextOrigin + fBackPlaneHeight, 0.002f);
    gl.glEnd();
    gl.glPopAttrib();After that the color before the push is not restored. I might get something wrong here, since I'm not the most experienced opengl programmer. I've tried Jogl 1.0 and the latest RC - same issue.
    I'd appreciaty any help!

    is it imposible?

  • How to save and restore Music from iTunes without using library ?

    Could yous help me please ?
    I use an 60 giga iPod I started to fill it with my CDs without using library, just directly in it, I delete the Music in the library after record to save place on may computer. I have nearly 7 megas of Music stored. To fill 60 Giga it wille takes at least 6 months on my rest time. At the end if i loose my iPod or if stolen or broken or if i want to buy a new iPod of 80 Giga for example to store more Music ? How can i save Music in my iPod on a Hard Disk or DVD and restore on it or on a new one ? Is it possible or not allowed by iTunes to avoid Music copie ?
    Thank you for your help....

    Frank31,
    Syncing music to the iPod is a one-way street, as discussed in this article:
    http://docs.info.apple.com/article.html?artnum=302155
    If you are concerned about using up your computer's hard drive for music, and are using iTunes 7, you might consider creating your library on an external drive if one is available.
    This article discusses creating an alternate iTunes library in another location, such as another drive:
    http://docs.info.apple.com/article.html?artnum=304447
    Thank you,
    Nathan C.

  • How to Create, Save and Restore a Custom Catalog in PE 6?

    I am having great difficulty in trying to create a custom catalog using the organizer function of PE 6. Upon opening the organizer I have many photos already depicted in it. So, I highlight them all and delete them obtaining a blank screen with no photos. I then import the file containing only the custom photos I want to catalog. I then backup this catalog using the following procedure http://www.backuphowto.info/how-to-backup-adobe-photoshop-elements-6-catalogue Everything looks fine until I try to restore it at a future time. It doesn't restore! In fact I can browse to the saved file but am unable to get the locate backup file location to change to it??
    What am I doing wrong and can anyone help me acheive my objective of creating a custom catalog that I can save and retrieve intact for later use?
    Thanks, in advance, for any help provided. Oh, and I need to add I am relatively new to PE 6 having only previously used PE 4 and never used the organizer in it which is to say -  lead me very simply please.
    Sanray19

    sanray19 wrote:
    I am having great difficulty in trying to create a custom catalog using the organizer function of PE 6. Upon opening the organizer I have many photos already depicted in it. So, I highlight them all and delete them obtaining a blank screen with no photos. I then import the file containing only the custom photos I want to catalog.
    I can't imagine the purpose of a "custom catalog". Seems to me you have done a lot of work when I am 100% sure there is an easier way to do whatever it is you are trying to accomplish. Further, it seems like you are trying to create a backup of only some of your photos, and I can't imagine the purpose of that either ... I would presume you would want to make backups of your entire collection of photos.
    Just as a general rule, there usually isn't a good reason to have more than one catalog (unless you have separate categories of photos, like personal and work).
    Everything looks fine until I try to restore it at a future time. It doesn't restore!
    Can you give us a detail or two about what happens when "it doesn't restore"? Can you give us more details about what you actually did? And most importantly, can you describe what you see on the screeN? Screen captures would be even better.

  • How can I save and restore a Screen ?

    Hi all,
    I'd like to know how could I save an entire screen or part of it and restore it later.
    I have an application using full-screen mode and I draw every component that I need. So, there are times when I draw a component just to show a message and after I need the screen as it was before I draw the message.
    I'm not working with Swing components. It's not a "typical" application, because every component that is showed I really draw it. So I don't have events and repaint is controlled by my application.
    That's why I need to save the Screen before show a dialog box, for example, and then restore the screen, making the box disappear.
    thanks !

    It's a very long, long history. Believe me.
    In theory, I really could use normal components, but in practice, I will get a better final result, even if it will cost some extra work.
    I've been reading about BufferedImage, VolatileImage and so on, but I didn't concatenated the ideas yet, or didn't read so much as necessary.
    So... my question is still in the air ! :-))
    Thank you Rich.

  • Save and restore Apple Mail settings (Mail version 7.3x)

    Can anyone assist with hints as to how to save/restore the GUI and other individual settings in Apple Mail (Version 7.3, Build 1878.2)?
    In earlier mail version this could easily be done by simply saving & restoring the "apple.mail.pst" file. Thanks.

    Greetings,
    I don't think you would have to use Time Machine at all for this; that would only complicate things. Instead try this:
    Quit Mail if it's running.
    Go to Home/Library/Mail and remove your IMAP mailbox. and any Envelope Index file.
    Restart Mail and wait for the index to rebuild, and with any luck it should download your email again, but only once. If so, then your problem would appear to be solved.

  • How to save and restore a Key?

    Hi,
    I Am working through some example code based on the Sun documentation here:
    http://java.sun.com/j2se/1.4/docs/guide/security/jce/JCERefGuide.html
    Here is part of the program:
            KeyGenerator keygen = KeyGenerator.getInstance("DES");
            SecretKey desKey = keygen.generateKey();
                Cipher desCipher;
            // Create the cipher
            desCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            // Initialize the cipher for encryption
            desCipher.init(Cipher.ENCRYPT_MODE, desKey);
            // Our cleartext
            byte[] clearBytes =  "Joe".getBytes("UTF8");
            // Encrypt the cleartext
            byte[] cipherBytes = desCipher.doFinal(clearBytes);
            // Initialize the same cipher for decryption
            desCipher.init(Cipher.DECRYPT_MODE, desKey);
            // Decrypt the ciphertext
            byte[]  decryptedBytes = desCipher.doFinal(cipherBytes);This all works fine. Now, suppose I want to save desKey for future use. (Maybe I want to save my encrypted bytes to a file and decrypt them in the future. Maybe I want to give someone else the key for decrypting cipherBytes. )
    In the Key interface there is a method getEncoded() => byte[] which appears to be a way to save the key as a byte array for future use. However, I don't see how to restore the key from the byte array. That is, I expected a Key interface constructor something like: Key(bytes[], encodedKey). What am I misunderstanding?
    Regards,
    Joe

    >
    This works fine: SecretKey myKey = new SecretKeySpec(rawKey, "DES");
    And indeed it does. Thanks, mut - I learned something new today. (Of course, I feel stupid for not having ever noticed that SKSpec isA SecretKey - but that happens to me allll the time...)
    I couldn't get Grant's code to compile. Seems like
    the SecretKeyFactory class doesn't have a
    method named generateKey (in my 1.4 SDK).
    I replaced generateKey with
    generateSecret which compiled without error,Yup, sorry, I hadn't run the code thru a compiler or I'd've caught that.
    but then when I ran the code the third line threw an
    exception:
    java.security.spec.InvalidKeySpecException:
    Inappropriate key specification
    Any idea what's going on?Interesting. I don't offhand see any way for one to work and the other to fail with the same raw data. Then again, having been wrong twice in one post, I'm feeling abruptly unqualified to comment! ;)
    Will experiment some, and let you know what I find out.

  • Save and restore JTextPane

    Hi,
    I have a JTextPane wrapped into JScrollPane:
    I want to make it persistent. To do so, I save the text, the caret position and the viewport position:
          JTextPane tp = getTextPane();
          text = tp.getText();
          JViewport vp = scrollPane.getViewport();
          viewPosition = vp.getViewPosition();
          selectionStart = tp.getSelectionStart();
          selectionEnd = tp.getSelectionEnd();Before showing the window, I restore the values:
          textPane.setText(text);
          textPane.setSelectionStart(selectionStart);
          textPane.setSelectionEnd(selectionEnd);
          Caret caret = textPane.getCaret();
          caret.setVisible(true);
          caret.setSelectionVisible(true);
          scrollPane.getViewport().setViewPosition(viewPosition);The text and selection are restored well, the carit is visible, but not blinking, and view position is wrong (farther than the original position) so I do not see the caret until I do some scrolling.
    I use jdk-1.4.
    Any help appreciated.
    Regards,
    Vladimir

    It won't work. The pop-ups are instances of TitleWindow. The user can rearrange them by clicking and dragging. As a result the order in which I've added the pop-ups often doesn't match the z-order.

  • How do I save and restore Session?

    Is it possible to have a user leave the site for a period of
    time, say 2 or 3 days, and when they come back, restore their last
    session and all the session variables? I have an idea of building a
    database and writing them all to the db on each page load with the
    last visited page, and then resetting from that on their next
    visit, but is there an easier way through Cold Fusion that I'm not
    aware of? Any assistance is apprecaited.

    I had a client that had hundreds of session variables
    scattered in hundreds of CF pages. There was very little CFLOCKing,
    and consequently the apps were quite unstable in a loaded
    environment.
    What I finally did was to copy the session scope variables to
    ses.request scope variables of the same name, then did a global
    replace of session. with ses.request. In OnRequestEnd.cfm, and
    immediately before all CFLOCATIONs, I copied ths ses.request scope
    back to session scope (locked, of course). There was no measurable
    performance hit, and the apps were rock solid.
    Perhaps you could copy your client variables to session
    scope; then back again in OnRequestEnd.cfm

  • Have to deinstall/reinstall: how do I save and restore Bridge thumbnails and metadata?

    My hard drive is failing. I am having it replaced. I will then be installing Windows 7 and applications including CS5.5. In addition to the thumbnails, I have a lot of metadata, keywords, collections, and stacks etc. in Bridge and I hope I do not have to lose it all and start from scratch. I had been using a disk image backup system which would have allowed me to restore the entire contents of the drive bit for bit, but the backups started to fail when the hard drive began to fail. So I have to back up or copy specific folders. Does anyone know how I should go about this?

    Metadata and keywords are stored in the files themselves.
    Don't know about Stacks.
    Collections, keyword lists and workspaces are stored in c:\Users\<your name>\AppData\Roaming\Adobe\Bridge version\

  • Libnotify and position of windows (save and restore)

    hi, when i open and close, and then i re-open a program, it doesn't positioning in it last position, arch open it always near the top left corner.
    So, what can i do for restore last position ??
    Another thing, why libnotify interface sucks ?
    For every notify, always the same orrible interface...
    http://img178.imageshack.us/my.php?imag … atatx7.png an example 
    ps. I use gnome and metacity
    thanks, brainwasher  :oops:

    I used to be bugged by this too. Then I saw a message from someone who suggested the following applescript (with changes to coords to match your screen size and position you want). Mine is set for 1600 x 1024 resolution on my 22" cinema display. The coords are for top left corner and bottom right corner of the Safari window.
    Make a new bookmark, i.e. press COMMAND-D
    Specify that it should go in the bookmarks bar.
    Go to the bookmarks screen in Safari.
    Find the bookmark.
    Select the name (left side) and edit it to something like Window Position.
    Select the URL (right side) and paste in (without the quotes)
    "javascript:self.moveTo(190,0);self.resizeTo(1150,995)"
    Close the bookmarks window/screen.
    Click on "Window Position" in the bookmarks bar and the window will resize to specified size and position.

  • Best way to save and restore sms massages ?

    I can only think of one way ? set the phone to save sms massages to my mem card, copy all old massages over to the mem card - the flash or update the phone. And set back the setting to save to mem card. BUT - is there a way to get the sms massages out and back from the phone mem ?

    I have all my messages backed up to my PC using PC suite, not sure if that's what you want?
    If you want them backing up on the phone, my N95 has an application called lifeblog which has them, might be worth seeing if you can get that if you haven't already, or just do what's already been suggested.
    Nokia N95 and a Nissan Skyline GTR, my two favourite gadgets

  • How to simply save and restore PDF sessions in adobe Acrobat?

    I need an acrobat javascript that saves a list of paths of currently opened files then autoloads them upon relaunching Adobe Acrobat.
    Thanks,

    Why would it need to be disclosed? The code is executed from a menu event.
    On Mon, Jul 8, 2013 at 1:42 PM, Test Screen Name

  • How to make save and restore swing components?

    hi,
    i have a problem with serialization when i trying to save a class that extends JInternalFrame class.
    err i am getting is "java.bean.PropertyDescriptior : not serialized exception". how can i get rid of this problem.
    can anyone help me in this stage so that i can complete my project.
    thankx in advance.

    Make this class implement Serializable

Maybe you are looking for

  • How to display a header on each page of the smartform?

    Hi, I have a main window with a header and a table.I want my header to be displayed on each page of the form when the table streches on several pages.In my case,my header is a template and i want it to be displayed every time my table is longer than

  • Add a new attribute to a user

    I would like to add a new att to an user, that is i would like to have more atts in a user, but these atts aren�t in the inetusergroup, so do you know how to add more attributes to an user? I would like to add for example the att yuuuuuuu but i can a

  • On MouseUp not working in .exe

    Hey, Everybody. I have an autorunning .exe file on a DVD-ROM with several buttons. One of them launches the VIDEO_TS.ifo file in the appropriate directory, and quits the .exe using the following script. on mouseUp dosOpenFile(the moviepath & "..\VIDE

  • E71 Asking Date and Time after a restart

    Hi, Yesterday when I connected my E71 with Ovi PC Suite, it prompted me, I have a phone firmware update available and unfortunately I clicked on update, the phone was updated in 15 mins but now a weired problem is happening whenever I restart the pho

  • DVI or VGA to view 'Front Row' on LCD Screen?

    I just purchased MacBook and i would like to view iTunes movies or pictures through my TV (its LCD screen). Im not sure which connection would be the best S-video, DVI or VGA? If somebody have any experience with it I would really apprecite the help.