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
  • 1.  Cascading dropdowns in a table

    Posted Wed December 08, 2010 11:43 AM

    Hi,

    I have to display two dropdowns in a table where the possible values of the second depend on the selection in the first dropdown.

    Usually I use content providers and option groups to provide the possible values of dropdown but here each row of the table might have a different set of possible values. I do not see a solution for that.

    Any suggestions are highly appreciated.

    Regards,
    Mathias


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


  • 2.  RE: Cascading dropdowns in a table

    Posted Fri December 10, 2010 06:20 PM

    After you make a selection in the first dropdown, you’ll need to refresh the second drop down.

    I would recommend binding the second dropdown to an option group that you programatically build based on the first value.

    In the samples (http://communities.softwareag.com/ecosystem/communities/public/Developer/webmethods/products/caf/codesamples/caf_samples.html?overview=/public/Developer/webmethods/products/caf/codesamples/index.html&overview-page=0).

    Look at the wm_corecontrolstest web app, and the pagebean: DropDownPageBean.java for examples of how to build Options with Java.

    Regards,
    –mark


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


  • 3.  RE: Cascading dropdowns in a table

    Posted Mon December 13, 2010 08:58 AM

    Hi,
    thanks for your response. I had a look at the sample. That is how I would do it outside a table. But that is not exactly the problem I try to solve. I want to display the two dropdowns in a table.

    Do you also have an idea for that.

    Regards,
    Mathias


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


  • 4.  RE: Cascading dropdowns in a table

    Posted Mon December 13, 2010 09:19 PM

    Please see the attached sample project. I think the same techniques for inside a table as well, so i built out a quick sample.

    Regards,
    –mark
    DynamicDropDownTables.zip (11 KB)


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


  • 5.  RE: Cascading dropdowns in a table

    Posted Wed December 15, 2010 11:59 AM

    Hi,

    thanks a lot for the very useful sample. That works fine.

    So the trick is:

    1. Access the current row using
    String vehicleType = (String)resolveExpression("#{sampleItem.vehicle}");
    1. Construct a DefaultSelectItemGroupProvider for each row:
    DefaultSelectItemGroupProvider g = new DefaultSelectItemGroupProvider();
    for (int index = 0; index < styles.length; index ++) {
    g.add(new DefaultSelectItemProvider(styles[index], styles[index]));
    }

    Thanks for the effort.

    Regards,
    Mathias


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