loading en rendering of web screen elements onclick event

loading en rendering of web screen elements onclick event

  
LS

I have three containers on a page and three buttons. I want the content of container 1 to be rendered/loaded when a user clicks button1 etc. How do I prevent the content of the other containers from loading the page?

Regards, Harry


Hi Harry,

you can have an IF wrapping each container and have something like a boolean var for each one, like ShowContent1.
Now for the container 1 appear, you should have the button1 as ajax and then in the action you should assign the True value to the ShowContent1 and right bellow that place an Ajax Refresh and select the IF.

Note that to select the IF in the ajax refresh you should give a name to the IF (in the extended properties).

HTH,
Miguel Antunes
Hi Miguel,

Thanks for your answer. I came up with a solution somewhat like yours after reading your post. I have one variable and a switch in the action based on the value of the button that is clicked. I can now siwtch between the containers easily. The question that  remains: how does this prevent loading all containers on the page load (preperation) ?

Regards, Harry
Probably i'm making some misunderstanding on what you want to do, but on the IF that is wrapping the contents set the default value of the boolean var to false, so it will not be rendered on the preparation.

HTH,
Miguel Antunes
Miguel,

I have a local var tabkeuze (text) and I set the value in the preparation to "". On each container I set the value of Display to:  tabkeuze="containername" where containername is the name of the container (e.g tabkeuze="tabBatches"). Then when I click a button an action is fired where I assign the value of the containername to the tabkeuze var. I guess this will do the trick too without using the IF solution, or am I mistaken?

Regards, Harry
Yes it will, at least theoretically seems a nice way to go!

let us know if worked as expected.

regards,
Miguel Antunes
Miguel,

>>let us know if worked as expected.
It did indeed ! Thanks for pointing the right direction.

Regards, Harry