• PopUpMenu with bean

    By André Peters 1 decade ago

    Hi,

    I like to use a popupmenu with dynamic content in my Xpage. The content should be computed after the user clicks the open menu button.

    I found an example where a bean was used  as data source for a popupmenu. But the content gets computed in the constructor of the bean.

    My question is: how to build a bean, which computes it's items after the user clicks the menu-button. The bean should use values from the current XPage for evaluating its content.

    thx for any help

     

    • Never tried it

      By Philippe Riand 1 decade ago

      But I see 2 possible solutions:

      - You fully compute the menu on the client side using JS, but this can be cumbersome

      - You isolate the menu and do a partial refresh of it when the button is click. Then you trigger its displays when the refresh is completed (see the onComplete property of the event)

      • thx 4 your suggestions

        By André Peters 1 decade ago

        i will look into this.

        In the meantime I made some tests with the native dojo-popupmenu and managed to feed the contents by a bean. Looks promising.

        Maybe sometime the PopUpMenu Control can act like the ValuePicker Control: getting its values on Open/Click and not on page create.