calculate the rendering of a custom control
Posted
by
Marc Jonkers
on Stack Overflow
See other posts from Stack Overflow
or by Marc Jonkers
Published on 2014-05-27T08:20:02Z
Indexed on
2014/05/27
9:26 UTC
Read the original article
Hit count: 225
xpages
In an xpage I would like to be able to decide which custom controls have to be rendered or loaded. I have a custom control named 1, another 2, 3 etc When a scoped variable has the value 1, custom control 1 should be displayed/rendered/loaded. A value of 2 , custom control 2 has to be displayed. etc
I came up with following sollution : I calculate if that custom control has to be loaded or not depending on the value of the scoped variable.
Since I have 8 of these custom controls on 1 page I was wondering ,since only 1 out of those 8 custom controls have to be rendered ,if there isn't a better way with less code to do the same job. Won't my sollution put a lot of load to my server ?
© Stack Overflow or respective owner