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
Expand all | Collapse all

Select a row of a aynctable for show it ID without check the checkbox

  • 1.  Select a row of a aynctable for show it ID without check the checkbox

    Posted Wed August 10, 2016 06:57 PM

    Hi. I have a problem.

    I have an AsyncTable that show information of a webservice. I put a new Basic Column with a Select Row Checbox element for select multiple rows.

    The thing is I need to show in other html element information of the selected row when the row is clicked but without check the checkbox.

    I found this:

    CAF.model("#{caf:cid('yourTableIdHere')}".addRowChangeListener(function(tableId,rowId,eventType) {  
    if (eventType == "select") {  
    alert('Row Selection Changed for Row: ' + rowId);  
    }  
    }); 

    Its very usefull but the problem is that checkbox is selected when I clicked the row :frowning:

    When I select the checkbox is correct that the checkbox begin selected and show in these alert the rowId.
    But when I click anywhere other than the checkbox the alert have show itself but the checkbox DONT have begin selected.

    Can you all help me please?

    Im sorry for my english.


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


  • 2.  RE: Select a row of a aynctable for show it ID without check the checkbox

    Posted Sun December 11, 2016 09:05 AM

    Hi Jesus,

    You can extend your code to have another check on the element.

    The checked property will give you true/false on the event. Based on that you can update your logic.

    CAF.model("#{activePageBean.clientIds['asyncTable']}").addRowChangeListener(function(tableId,rowId,eventType) {    
    if (eventType == "select") {    
    alert('Row Selection Changed for Row: ' + rowId);   
    var rowIDTemp = CAF.model(rowId);  
    var customIDTemp = rowIDTemp.getControlId('selectRowIndividualCheckbox');
    alert(customIDTemp);
    alert("Select element == "+document.getElementById(customIDTemp).checked);
    }    
    });

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