1 Reply Latest reply on Feb 19, 2008 5:24 AM by ilya_shaikovsky

    How to remember a click


      Hi Everyone,

      I have a situation where I show/collapse a panel using javascript. By default section is in "DISPLAY:BLOCK" mode.

      Most of the time it's working fine when this section is not repainted in ajax response. But there is a time when this section which is shown/collapsed is part of re-rendered areas. This time I have to remember if section was already collapsed or is expanded. So that if section was collapsed when ajax request went then while section is repainted, it should be collapsed only. Right now since the by default section is in "DISPLAY:BLOCK" mode, it will always be expanded when ajax response comes back.

      Since to show/collapse I used only javascript I am not able to find out how to set a variable each time show/collapse happens, and in-turn access that variable in managed bean to know the status of section (show/collapse).

      If I set a hidden variable in javascript to certain value, I am not getting the value in managed bean.

      Please help!