Monday, October 29, 2012

CSS Style not applied to XPage Element...?

For a XPage element, when I am trying to compute its style from the Style tab of All Properties, the Style Class that I have applied is not affected. It eats my time to get rid of it. Finally I found the simple solution. Here I have shared it for you.

What I did before...?

 I have just applied a style class for the element. My requirement is to hide the button using CSS.
I just written the condition for the "display" property in CSS. When I am trying to execute it, hidewhens works properly but the button lost its style given by Style Class.



Style class of the element


Computed style for the element

What I done After...?

After some workaround, I found the solution. The Style Class is not affected to the element, because the computed style returns the separate style. And it affected whereas style class is not affected.
Then I have removed the else part of the computed style and it works fine. Because there is no seperate style and it takes the style class.

After the Computed Style removed

Now the style class get affected and it works fine. I hope this helps.

No comments:

Post a Comment