I have a view with a dropdownlist that I load in a CjuiTabs tab with its own ajax command.
I need to load the dropdownlist’s script on the first render, but on subsequent renders (such as when the tab is clicked again after moving to another tab) I only need to renderPartial to avoid loading the script again.
The problem is: how do you determine which is the first render and which is a subsequent render, since all requests are ajax requests?
The view hosts a normal CJuiTabs with two tabs. The first tab (Data-Fields) is displayed on default. The second tab (Levels) only loads when the user clicks on the tab - via a separate controller action. This action uses a normal render or renderPartial. The question is when to render and when to renderPartial. I only want to render on the first instance that the user clicks the tab. All other subsequent clicks on the tab must result in renderPartial.
Hi, I also thought about hidden parameters. So the first click on the tab will not include the parameter, while subsequent clicks will. But how do you include a non-existing parameter (the tab is not yet created) in this url? Maybe a js test to determine if the tab already has a view in it?