Enabling Tabs

  • Hi,

    Is there any way to enable and disable tabs depending on a value chosen ?

    I have an employee entity which contains standard information about an employee. This information must be available when the use captures the details for all employees. However, if the user is capturing details of a manager, I would like additional information to be captured. The additional details will be display on a separate tab on the screen.

    So ultimately, I would like to disable this tab if the user has not chosen "manager" and I would like to enable it if the user has chosen "manager".

    I cannot find any examples that does this.

    Thank you for any assistance with this.



  • Hi,

    Just to be clear - the tabs I refer to are actually sections.
    I have tried using getView.setSectionEditable(SectionName, false). This disables all the fields in the section. However, the section (tab) is still visible and the user can click on it. I would like to hide this section or disable it so the user cannot click on it.

    Thanks again. I hope someone can assist with this.


  • Javier Paniza
    Javier Paniza

    Hi Med,


    getView().setHidden("sectionName", true);

    It works for groups, I think it does not work for section (I have no any test case for that), however give it a try.
    If it does not work for section add it as a bug and we'll solve it for future OX versions.

    In the meantime you can define two views, one with the section and another without it, and change the view.

    Ask OpenXava questions on StackOverflow

  • Oscar Kozto
    Oscar Kozto

    Hola Javier:

    Este bug ya se soluciono?

    Gracias de antemano por la respuesta

  • Javier Paniza
    Javier Paniza

    Hola Oscar,

    Este bug ya se soluciono?

    Yo creo que entrará para OX4.8.1.

    Ayuda a otros en este foro como yo te ayudo a ti.
    ¿Necesitas más ayuda? Usa el soporte profesional de OpenXava