Tabs_ClientSide Widget - making specific tab active based on query parameters

Tabs_ClientSide Widget - making specific tab active based on query parameters

  

I'm using the Tabs_ClientSide widget and would like to make a particular tab active depending on what I pass in the query parameters.  e.g. ?Id=4&Tab=0 - open page for Id 4 with first tab active, ?Id=4&Tab=1 - open page with Id 4 with second tab active etc.  I have different lists of records on different tabs and would prefer to return to the corresponding list/tab, after deleting or editing one of the records on the list.  What's the most elegant way of doing that?  I've tried running the Tabs_ClientSide function as javascript from server actions on those tabs, but that doesn't appear to work, though it seems to be how clicking on a tab title works.  What am I missing in the current version?

Lennie

Lennie, 

you have a option called RememberActiveTab that remembers last active tab.

Best regards,

Abílio Matos

Solution

Hi Lennie,

If you have the Id of the tab in your URL, you can put that number in the option InicialActiveTab of the widget.

Regards,
Samuel

Solution

Abilio,

   Very nice!  Thank you for pointing that out...That would take care of 80% of the use cases.  

Lennie

Abilio Matos wrote:

Lennie, 

you have a option called RememberActiveTab that remembers last active tab.

Best regards,

Abílio Matos



Samuel,

     Bingo!  This is exactly what I was looking for.  Just plugged in the logic to set it in the preparation and it works exactly the way I want it to!  Thank you so much!  I'm still new at this and hadn't looked that widget's parameters, but from now on I'll look there first!

Lennie

Samuel M. wrote:

Hi Lennie,

If you have the Id of the tab in your URL, you can put that number in the option InicialActiveTab of the widget.

Regards,
Samuel



Hi Lennie,

I 'm very glad to hear that you found your solution. Whenever possible, take a look at the widgets documentation, they contain a lot of information.

Regards,
Samuel

Lennie Sutton wrote:

Samuel,

     Bingo!  This is exactly what I was looking for.  Just plugged in the logic to set it in the preparation and it works exactly the way I want it to!  Thank you so much!  I'm still new at this and hadn't looked that widget's parameters, but from now on I'll look there first!

Lennie





Yes, the documentation is good!  I had no problems following it to set up the tabs on the page.

Lennie

------------------

Samuel M. wrote:

Hi Lennie,

I 'm very glad to hear that you found your solution. Whenever possible, take a look at the widgets documentation, they contain a lot of information.

Regards,
Samuel

Lennie Sutton wrote:

Samuel,

     Bingo!  This is exactly what I was looking for.  Just plugged in the logic to set it in the preparation and it works exactly the way I want it to!  Thank you so much!  I'm still new at this and hadn't looked that widget's parameters, but from now on I'll look there first!

Lennie