This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 25, 2013, 11:51 AM
30 Posts

Re: Computed visibility

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role:
  • Tags:
  • Replies: 3
Sorry David, I'm pretty new to this forums and Xpages in general so I was so excited to have found the solution that I forgot to explain it.
 

Anyway, I declared a viewScope variable after xpage loades like this: sessionScope.put("showSC", false);
 
After certain user actions, "showSC" gets chaned to true (I used onclick event).

Computed visibility code for pannel looks like this: sessionScope.get("showSC");  


That way I accomplished that my pannel on Xpage stays hidden on first load, but after   user action, it becomes visible.

 

Success :D!! 
Mar 29, 2013, 12:43 PM
2 Posts
Cool
Thanks for coming back and sharing. Yes scoped variables are great for hiding things. Just keep in mind that there are 4 built in Scopes. You said "Anyway, I declared a viewScope variable after xpage loades like this: sessionScope.put("showSC", false);" So it sounds like you're actually using sessionScope and not viewScope. sessionScope is the life of the user session and viewScope is the life of the page. I often use viewScope for various page events as that ensures it will be reset to the default when the user leaves and comes back to the page. If you want the page to remember the setting longer then sessionScope is the way to go. Glad you got it working! Dave

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal