Wednesday, 21 March 2018

OIM ADF UI - Code Snippet to get Selected Beneficiaries form Cart.

    public static final String CART_ENTITIES_VO = "CartEntitiesVOIterator";
    public static final String ENTITY_KEY = "entityKey";
    public static final String ENTITY_DISP_NAME = "entityDisplayName";


    public HashMap<String, String> getSelectedBeneficiaries() throws Exception{
        final String logp = CN + "::getSelectedBeneficiaries- ";
        LOGGER.debug(logp + "START");

        HashMap<String, String> beneficiaries = new HashMap<String, String>();

        List<Row> rows = this.getAllRowsOfIterator(CART_ENTITIES_VO);

        for (Row row : rows) {
            final String userKey = (String)row.getAttribute(ENTITY_KEY);
            final String userDisplayName =(String)row.getAttribute(ENTITY_DISP_NAME);
            beneficiaries.put(userKey, userDisplayName);
        }
        LOGGER.debug(logp + "END");
        return beneficiaries;
    }


Happy Learning!!!

1 comment:

  1. Thank you for the code snippet, but what is the code for "getAllRowsOfIterator"?

    ReplyDelete