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



May 28, 2013, 12:02 PM
22 Posts

Calucate a li class attribute based on a session variable

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: LI tag,sessionScope,inline javascript
  • Replies: 1
I want to calculate the class attribute of a HTML LI tag based on the value of an sessionScope variable ?

 ex for an xp tag

<xp:this.style><![CDATA[#{javascript:if(compositeData.SelectedMenu == 1){"lotusSelected"}else{""}}]]></xp:this.style> 


Required

<LI style="??">  where ?? must be LotusSelected in case of compositeData.SelectedMenu == 1 and an empty string in case compositeData.SelectedMenu != 1

 
KInd regards 

 

  
May 28, 2013, 3:32 PM
54 Posts
Re: Calucate a <li class> attribute based on a session variable
I didn´t find any sessionScope variable in you code, but if you want to use a compositeData you can use this code:

 

<LI style="#{javascript:if(compositeData.SelectedMenu == '1'){'LotusStyle'}else{''}}"> 

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