Symantec IGA

Expand all | Collapse all

Identity Portal - Multi-Select List - handler code to select all items

Jump to Best Answer
  • 1.  Identity Portal - Multi-Select List - handler code to select all items

    Posted 01-23-2020 06:27 AM
    ​Hi all,
        I have implemented a plugin to populate a Form attribute (Multi Select List) with a set of users.
    Since these users should be "selected" in order to be managed by the IM task, I need to automatically set ALL initial values as selected.
    The form attribute handler for the INIT event has been used to populate the list and I am correctly able to fetch all prop.options values.
    Is there any method to be applied to the prop.options collection to "select" each item in the attribute handler?

    Many thanks for any suggestion or help

    Claudio

    ------------------------------
    Claudio Cordaro
    ------------------------------


  • 2.  RE: Identity Portal - Multi-Select List - handler code to select all items
    Best Answer

    Posted 01-23-2020 11:07 AM
    There may be more information in the programming guide:
    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/layer7-identity-and-access-management/identity-portal/14-3/programming/javadoc-for-ca-identity-portal-plugins.html

    ------------------------------
    Perhaps there are others in the communities who have experience in doing this and we invite them to comment here also.

    Another option may be to reach out to our partner HCL Technologies to see in what way they can assist further. The Enterprise Studio team of HCL can be reached at enterprisestudio@hcl.com. https://www.hcltech.com/enterprise-studio
    ------------------------------



  • 3.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-03-2020 04:53 AM
    Hi Claudio,
    I think it is possible. Firstly, u need to find out how does "multi select list" store the multiple values.
    Once u found the right "format" how it is stored. then use the Initialization handle to set the value manually, to verify that it is working.

    The right way, should be prop.value=xxxx (single value) if multi value then format is different.

    regards,
    William


  • 4.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-04-2020 05:00 AM
    ​Hi William,
       I have already populated the Multi-Select List with the correct handler javascript code (using prop.options.push({name: .., value: ..});     ).
    The point is that if none of the items in the list is "manually selected" by clicking it, nothing will be passed to Identity Manager task during the submission.
    I need the list to be completely "selected" by default after it has been populated by the handler code.
    I miss the command to issue to make each row become selected.
    That's all....
    Something like: prop.options[i].selected=true;
    I didn't find any example or description for this method or something like this....
    Best regards
    Claudio


  • 5.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-04-2020 10:52 PM
    I found the manual way to set default value but i still can't find the code to set as default. Tested with "selected=true" or defaultselected=true" both doesnt work.




  • 6.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-05-2020 01:39 AM
    Edited by William Cheang 02-05-2020 02:31 AM
    the code to set default value should be :-
    prop.values=[];
    prop.values=<ur array of values>
    prop.values=["1","2"];

    or u can also use with prop.defaultValues=<ur array of values>


    prop.options is to populate ur list only.




  • 7.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-05-2020 04:45 AM

    Hi William,

        I made several additional tests regarding the Multi-Select property and I discovered that:

    • prop.options.push({name: ..., value: ...., description: ....})    allows you to add options to the list
    • prop.values = ["value1", "value2", "value3", ...]    sets the "selected" values from the property options loaded

    The point is that even if I have written this to my handler code, it doesn't work everytime I use the task.

    I mean, I make the change by manually writing the selected values in the array and, by pressing F5, the form is refreshed and the options are selected.

    Making several tests the options are not always selected correctly (highlighted in blue) even it the corresponding "change" handler has been correctly triggered!!!

    If I use some variable array to set the selected options it doesn't work everytime but, here again, the result is that the property change handler is triggered (items are processed like in case of manual selection) but the items are not highlighted in blue!

     

    There is something still not clear!!

    Best regards,

     

    Claudio Cordaro


    HCL Technologies
    Security Services Architect  | CISSP ® | ITIL V3 | ISO 27001

     

    HCL Technologies | Viale Luca Gaurico, 9/11 - 00143 Roma (RM)

    Mobile:    (+39) 335.7368195

    Email:       claudio.cordaro@hcl.com

    Website:  www.hcltech.com

     

    signature_1038651347

     

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 8.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-05-2020 09:32 PM
    Hi Claudio,
    passing form data from Identity Portal to Identity Manager task with multiple value is tricky....

    firstly, the "defaultvalue" method i provide you works in my env. I tested putting the code "prop.values" in Initialization handlers.
    It works with refresh the identity portal forms.

    On storing multiple values in Portal and IM. in IM make sure u use a multi value field in Userstore defination.
    Trying store the value manually from Identity Portal. In Identity Portal form, set manually with 3 values eg ("1","2","3") then submit.
    THen check CA IM field, whether the field stored with "1","2","3". U need to make sure the IM field able to store multiple values.


  • 9.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-06-2020 04:05 AM

    Hi William,

        The problem is not passing data between IP and IM, I already did this and it is working fine.

    The point is that I use a multi-select list object and in its init handler I use a plugin call to query an LDAP and populate the available options.

    This is fully working.

    Then, in the same init handler I must select ALL options pushed in the list by default.

    I should dynamically set the list value with all the available options.

    I have put all the options, pushed in the list, in a multivalued variable and used that variable to push the values inside the list values array...

    It seems to work since the "change" handler for the list is triggered for all values and the expected code is executed.

    The only side effect is that the "selected" objects are not highlighted.

    The proof for this is that, after my code is executed, if I manually click on a list option, the change handler is executed processing the change but it doesn't add anything to my final array values, just highlights the row.

    When, instead, I deselect the row with a second click, the change handler process my request by removing the "un-selected value" from my final array variable.

    Each row in the list options has been correctly processed and added to the final array value as expected, but the rows have not been highlighted... this is the real issue.

     

    It doesn't matter what the integration with IM has been done, it is working and previously tested. (I perfectly know how to work on IM and how to pass the values to IM tasks)

     

    I also tested my code with fake values and if I use fixed values it works...

     

    <list>.options.push({name: test, value test});

    <list>.options.push({name: test1, value test1});

    <list>.values = ["test", "test1"};

     

    This works. But if I use some dynamic variable to get all options from the multi-select list to pass the selected values to the list itself, my code seems to have some issue with the UI.

     

    I am trying to understand where the problem is.

     

    I will update in case I find the root cause.

     

    Best regards,

     

    Claudio Cordaro


    HCL Technologies
    Security Services Architect  | CISSP ® | ITIL V3 | ISO 27001

     

    HCL Technologies | Viale Luca Gaurico, 9/11 - 00143 Roma (RM)

    Mobile:    (+39) 335.7368195

    Email:       claudio.cordaro@hcl.com

    Website:  www.hcltech.com

     

    signature_1038651347

     

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 10.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-06-2020 06:23 AM

    Hi William,

       I made an additional test and I discovered that the first time I call my task from IP after an F5 (refresh of the IP page) the items are highlighted correctly in the Multi -Select list.

    All the tries after the first one are not working.

    I have to refresh the page again to have another 1st successful attempt.

    This seems to me something related to a browser caching or something like this.... I am using chrome.

    Can you try to reproduce the same test on your laptop?

    Best regards,

    Claudio

     






  • 11.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-06-2020 09:33 PM
    Hi Claudio,
    On my env, i have no problem with default values been highlighted in my multi-select list. Even if i select other items and refresh few times.
    It will always select back the default values where i defined in my initialization tab.

    Based on ur requirement, i understand that, based on "Init" stage, u want the multi-select list selected with default values.
    But in term of "Changes" in multi-select list, what is ur requirement, what u try todo ?

    Note: I also uses Chrome browser.
    There is a trick to check the ur "prop" value. in "init" or "change" handler tab use "console.log(prop)", this will show value in Browser Console.
    Then u can check the "current" value of ur "prop".

    regards,
    William


  • 12.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-07-2020 08:36 AM
    Hi, the problem is related to the plugin!
    I call a plugin to retrieve the elements to put in the multi select listo options.
    The plugin call return is managed with a function and, since the selection of values (or default values) is done in the return function itself, the item selection seems not to work.
    By using default values outside of the plugin function it works fine.
    I need to review the init handler code.



  • 13.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 02-03-2020 04:59 AM
    Refer this old thread
    https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?GroupId=1717&MID=798745&CommunityKey=783a8a1e-bb2b-473a-a0c3-7be7b1d92c60&tab=digestviewer


  • 14.  RE: Identity Portal - Multi-Select List - handler code to select all items

    Posted 05-26-2020 06:32 AM
    Hi, a final update: a case has been opened and resolved by Broadcom's Support by issuing an hotfix that allows to use the "Select All" feature for the Multi-Selection list in IP Forms.​
    Best regards,
    Claudio