enter image description herePlease suggest how to sort tabs dynamically using index or number.

One idea is to use dynamic components and add child using logic in controller. But I dont want to go with this idea.

I added the image. For example : we have 3 tabs named 1 ,2 and 3 . When I click on reorder they should be reorder in position like 3,1,2 using custom logic.

  • What tabs do you mean? – Sergej Utko Jan 12 '15 at 13:03
  • visualforce component apex:tab i mean – Piyush Kalra Jan 12 '15 at 13:05
  • 1
    Piyush, maybe this question will attract more answers if you elaborate more on what problem you're trying to solve ? – Samuel De Rycke Jan 12 '15 at 13:45
  • @SamuelDeRycke I added a image. Please check. – Piyush Kalra Jan 12 '15 at 14:05

I think your answer is described in http://www.salesforce.com/docs/developer/pages/Content/pages_dynamic_vf_components_implementation.htm, in the section on childnodes. With childnodes, you can dynamically add tabs to your tab panel.

Admittedly, it will be a lot of code--much more code than say, generating the page markup and returning it, but with the childnodes will retain ultimate flexibility for reordering your tabs.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.