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

How to get "Value" of One Way Toggle Checkbox.

  • 1.  How to get "Value" of One Way Toggle Checkbox.

    Posted Sat April 02, 2011 01:46 AM

    Hi gays:

    I need make one proyect of portlet, and I need obtein the value of “One Way Toggle Checkbox”, I read in the documentation at the method .getValue() request “true” or “”. But I not obtein the value.

    This is my code, that I have in one Script Block:

    Event.observe($(‘#{activePageBean.clientIds[‘togglefour’]}’), “click”, function() {

    alert(“0”);

    var seleccion = CAF.model(‘#{activePageBean.clientIds[‘togglefour’]}’).getValue();

    alert(CAF.model(‘#{activePageBean.clientIds[‘togglefour’]}’).getValue());

    	if(seleccion = 'true')
    {
    alert("Yes inside");
    }
    
    else if(seleccion != "true")
    {
    alert("Not inside");
    }
    

    alert(“1”);
    });

    One suggestions that how obtein the value???


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


  • 2.  RE: How to get "Value" of One Way Toggle Checkbox.

    Posted Tue April 05, 2011 10:55 PM

    Please try this:

    
    var toggle4 = CAF.model('#{activePageBean.clientIds['togglefour']}');
    var value = toggle4.element.getValue();

    If the item is checked, the value will be “on”. If it isn’t checked, the value will be “null”. (At least on Firefox)

    Regards,
    –mark


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


  • 3.  RE: How to get "Value" of One Way Toggle Checkbox.

    Posted Wed April 06, 2011 12:28 AM

    Thanks for your support, I applied your code and worked :).

    Thanks.


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