IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Dropdown - change the option list

  • 1.  Dropdown - change the option list

    Posted Thu September 16, 2010 11:26 AM

    Hello all,

    I have a question concerning the dropdown control.

    • I can retrieve the UIComponent and then change the current selected value.
    • I can modify the values listed by the dropdown by calling a service which is binded to the option group.

    But I can’t manage to change the values listed without calling a service binded to the option group.
    Does anyone know how can I manage to change the values listed in the dropdown directly in java by setting the value I already know ?

    I’m currently searching in the “UISelectItems” direction (which seems to be the UIComponent of the option group attached to the dropdown).

    Regards,
    Mathieu


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 2.  RE: Dropdown - change the option list

    Posted Thu September 16, 2010 01:34 PM

    Hi Mathieu,
    I suppose you have a dropdown with an OptionsGroup as children.
    In Java you can get access to that OptionsGroup (it will be a javax.faces.component.UISelectItems).Then you get its value as an array, list or as a BoundPropertiesSelectItemGroupProvider (which in turn has an array/list that you can set) and set its contents with what you wish.

    hope this helps,
    Javier

    p.s.: I don’t go into java details about how this is done cause I suppose you know it already, but let me know if you need an snippet as well.


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 3.  RE: Dropdown - change the option list

    Posted Thu September 16, 2010 02:17 PM

    Thx Javier,

    You helped me a lot, It works fine.

    I was missing the logic of setting an arrayList with the setValue method of the UISelectItems component. I was looking for an addItem method which was wrong.

    Regards,
    Mathieu


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods