4 Replies Latest reply: Jul 13, 2012 5:58 AM by Steven Davelaar-Oracle RSS

    Search field in Jheadstart Tree Menu for searching of Tree Menu Items

    887103
      Is it possible to have Search field for searching menu items in menu tree, on the top of Menu tree provided by Jheadstart.
      And if it is possible then how to do it, is there any tutorial available.

      I am using standard Jheadstart tree menu functionality.

      I am using Jdeveloper - 11.1.1.4.0
      JHeadstart - 11.1.1.3.35

      Thanks in advance
        • 1. Re: Search field in Jheadstart Tree Menu for searching of Tree Menu Items
          Steven Davelaar-Oracle
          JHeadstart can generate a tree menu in two ways, using the XMLMenuModel or using a set of database tables that define the menu structure.
          Which flavour are you using? if you did not check the application-level setting "Allow runtime customization of menu" you are using the XMLMenuModel.

          Steven Davelaar,
          Jheadstart Team.
          • 2. Re: Search field in Jheadstart Tree Menu for searching of Tree Menu Items
            887103
            Hi Steven,

            I am using set of default database tables(i.e. - Jhs_Modules,Jhs_Menu_Items etc) to define the menu structure.

            Actually I want to have search option on the top of tree menu so that when we want to search any node we can do it. This is similar type of functionality as it was in D2K forms, like when we search any node it will open all the similar nodes.
            Intially I was thinking to add a view creteria in Jhs_menu_items which I can use as a search option in the tree menu but as VO's in JHS services are not editable so not sure how to proceed.

            Thanks in advance
            • 3. Re: Search field in Jheadstart Tree Menu for searching of Tree Menu Items
              887103
              Can anyone please shed some light on this question....

              Thanks
              • 4. Re: Search field in Jheadstart Tree Menu for searching of Tree Menu Items
                Steven Davelaar-Oracle
                This is not a straightforward task. Here are some hints:
                - The tree component is getting its menu model from DynamicMenuBean.getMenuModel
                - In this method you see that the "children" property is used to traverse the tree, in other words, the top level module row has a getChildren method that returns its children, and the MenuItemLevel1 has such a method as well and so on.
                - You can create your own menu VO's that extend these JHS VO's and implement filtering in these getChildren methods:

                • Create your own application module that extends JhsModelService application module.
                • Add your view objects that extend the default JHS VO's
                • Remove the JhsModelService as nested usage from your root application module
                • Add your extended version of JhsModelService application module as nested usage to your root application module, and make sure the instance name is set to JhsModelService.
                • Create a subclass of DynamicMenuBean to use your own VO's

                Steven Davelaar,
                JHeadstart Team.