3 Replies Latest reply on Dec 18, 2008 2:36 PM by Nick Belaevski

    keepAlive behavior for a tag

    Florian Minjat Newbie

      Hi,

      This is a question about the design of the keepAlive behavior.

      I'm doing a subclass of HtmlToolTip to implement a complicated behavior: I need to modify the parent value but I need to store the original one (the getValue method is called several time and I need to process the original value only one). So I use an Hashtable with the cliendId as key and it works great in normal requests.

      But with ajaxed requests, a new HtmlToolTip instance is created on each ajaxed request and I loose my Hashtable, resulting in the lost of the original parent value. If I could manage to have a similar behavior as the keepAlive but for the tagHandler instead of a bean, my problem could be solved.

      I looked at the KeepAliveHandler code, but I don't know well enough the process of creation and deletion of the managed-beans and tagHandlers to see if I could use something similar.

      The solution could be to use a keepAlive managed-bean to store my hashtable, declared as keepAlive inside the constructor of my tag... But it's not very neat.

      Could anyone points some direction to help me on this one ?