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.


#TechXchangePresenter
 View Only
  • 1.  Disable checkbox based on selected radio button

    Posted Mon March 09, 2015 10:23 AM

    Hi,

    I need to disable checkbox based on selected radio button, for example:
    If my selection is “Option A”, the checkbox must be disabled, but if my selection is “Option B”, all checkbox must be enabled. (Attachment)

    On checkbox properties, I set a variable X on “Disabled”, so if I click on Option A this variable X is “true”, but it’s not refreshing.

    Can someone help me?

    Thanks!



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


  • 2.  RE: Disable checkbox based on selected radio button

    Posted Mon March 09, 2015 02:43 PM

    Luis:

    The values don’t refresh until the portlet is submitted. Try with Client Side javascript instead.

    Regards.
    Norberto.


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


  • 3.  RE: Disable checkbox based on selected radio button

    Posted Mon March 09, 2015 04:52 PM

    Norberto,

    Could you please tell me how it’s works? I’ve tried some examples and it didn’t work, it’s my first time using js on CAF.

    Thanks!


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


  • 4.  RE: Disable checkbox based on selected radio button

    Posted Mon March 09, 2015 05:53 PM

    Hi Luis:

    It’s hard to explain the whole matter in a post.

    First you need to read the full Client Side Model reference.

    Also, search the forum. It has a lot of threads with examples.

    Regards.
    Norberto.


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


  • 5.  RE: Disable checkbox based on selected radio button

    Posted Fri March 20, 2015 01:05 PM

    Solved!

    Just put a js code in OnClick, like:

    var radioGroup1 = CAF.model('#{activePageBean.clientIds['radioGroup1']}'); 
    var radioGroup2 = CAF.model('#{activePageBean.clientIds['radioGroup2']}');
    
    CAF.model('#{activePageBean.clientIds['radioGroup2']}').setValue(null);
    
    if (radioGroup1.getValue() == 0)
    { 
    radioGroup2.setDisabled(true);
    }
    else{
    radioGroup2.setDisabled(false);
    }

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