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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

Rendering togglemenu options dynamically on Input taskbusiness data

  • 1.  Rendering togglemenu options dynamically on Input taskbusiness data

    Posted 04/19/12 06:04 PM

    Hi All,
    Iam creating a CAF form view which utilizes a toggle menu control. It contains two options that has respective hideablePanels linked to them. I want to dynamically render the toggle menu options, based on inputs passed to CAF form view by task business data , i have decided to use a control assessors to dynamically setup what options to render on beforeRenderResponse action in task. In some instances(randomly), the control accessor for a toggle menu option is returning ‘null’. What can possible be the cause? If you can suggest a better way, please inform me.

    Thanks and Regards,
    Anil Kumar Ellendula


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


  • 2.  RE: Rendering togglemenu options dynamically on Input taskbusiness data

    Posted 04/25/12 04:50 PM

    Hi All,

    below logic am using in beforeRenderResponse for rendering togglemenu options on

    try{

    getToggleMenu().getChildren().clear();/Togglemenu Control Acessor/

    if(!getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRestricted()
    &&getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRequired()
    &&!getBranchReviewTask().getTaskData().getBranchReviewPI().getManagerReviewRequired()){

    displayOption = 2;
    getToggleMenu().getChildren().add(getEmploymentConfirmationItem());

    }else if(!getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRestricted()&&
    getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRequired()&&
    getBranchReviewTask().getTaskData().getBranchReviewPI().getManagerReviewRequired()){
    displayOption = 3;

    getToggleMenu().getChildren().add(getEmploymentConfirmationItem());
    getToggleMenu().getChildren().add(getManagerReviewItem());

    }else if((getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRestricted()
    && getBranchReviewTask().getTaskData().getBranchReviewPI().getManagerReviewRequired())
    || (!getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRestricted()
    &&!getBranchReviewTask().getTaskData().getBranchReviewPI().getEmploymentConfirmationRequired()
    && getBranchReviewTask().getTaskData().getBranchReviewPI().getManagerReviewRequired())){
    displayOption = 1;
    getToggleMenu().getChildren().add(getManagerReviewItem());

    }

    log("calibrateDisplay "+displayOption);
    if ((displayOption & 1) == 1){

    getToggleMenu().setValue(getManagerReviewItem().getItemValue());
    getHpManagerReview().setRendered(true);
    getHpManagerReview().setVisible(true);
    getHpManagerReview().setDisableWhenHidden(false);
    }

    if ((displayOption & 2) == 2){

    getToggleMenu().setValue(getEmploymentConfirmationItem().getItemValue());
    getHpEmploymentConfirmation().setRendered(true);
    getHpEmploymentConfirmation().setVisible(true);
    getHpEmploymentConfirmation().setDisableWhenHidden(false);
    }

    }catch (Exception e) {
    throw new RuntimeException(e);
    }

    Please any one guide me am i doing right way of rendering togglemenu options on runtime depends on task input business data.

    Thanks and Regards,


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