webMethods

webMethods

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.  "not selectable" checkbox

    Posted Mon March 25, 2013 08:47 AM

    Hi,
    i would like set “not selectable” a checkbox in row of a async table (Select Row Checkbox) when the values of 2 columns of the row are determined values. Is possible to do this? If yes, how i can do this?

    The result set of the table is generated from a webservice call that creates a content provider list.

    Thanks
    Bye
    Fabi


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


  • 2.  RE: "not selectable" checkbox

    Posted Mon March 25, 2013 01:00 PM

    You should be able to construct an expression that you can use as the value of the ‘Disabled’ property of the ‘Select Row Checkbox’ control. If the expression resolves to true, the checkbox would be disabled for that row.


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


  • 3.  RE: "not selectable" checkbox

    Posted Mon March 25, 2013 01:59 PM

    Hi Eric,
    thanks for reply.

    webMethods automatically create a SelectableListTableContentProvider called “Richieste” when I import the webservice.
    I created an action called “cerca” that invoke the refresh of the webservice.
    In java code i write this code:

    public String cerca() {
    resolveDataBinding(CERCA_PROPERTY_BINDINGS, this, “cerca.this”, true, false);
    Richiesta2 rich = getGetRequests().getResult();
    int i = rich.length;
    int k;
    String anno = getGetBimestreCorrente().getResult().getAnno();
    String bimestre = getGetBimestreCorrente().getResult().getBimestre();
    for (k=0; k<i;k++){
    if (!rich[k].getRichiesta().getAnno().equals(anno) && !rich[k].getRichiesta().getBimestre().equals(bimestre)){
    getSelectRowCheckboxId().setDisabled(true);
    }
    }
    return OUTCOME_OK;
    }

    It is the correct way?
    Can you attach me a sample code with explanation for do this?

    Thanks
    Bye
    Fabio


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


  • 4.  RE: "not selectable" checkbox

    Posted Mon March 25, 2013 02:07 PM

    No, you need the ‘disabled’ value needs to be dynamic for each row as it is being rendered, so you can not set it to a static value before the render phase.

    For the simple use cases, you generally wouldn’t need to write java code.

    Assuming the ‘Row Variable’ name for your table is ‘row’ then you could set the value of the ‘Disabled’ property of the “Select Row Checkbox” control to an expression like this:

    
    #{row.anno == bimestreCorrente.result.bimestre && row.bimestre == bimestreCorrente.result.anno}

    While each row is being rendered, it will evaluate the expression and use the result for the current row.


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


  • 5.  RE: "not selectable" checkbox

    Posted Tue March 26, 2013 06:42 AM

    Hi Eric,
    it’s works fine.
    Thanks a lot
    Bye

    Fabio


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