calculate the rendering of a custom control
- by Marc Jonkers
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 ?