Symantec IGA

  • 1.  Manipulate DatePicker object with (external) JavaScript

    Posted Nov 15, 2018 03:28 PM

    How can I manipulate the DatePicker attribute with my own JavaScript? The object itself is a JavaScript construct, so I figure it's possible - I just haven't figured out how.

     

    For example, I have some custom js code on my task screen that pulls elements and then performs basic DOM actions like these:

       var usersContractEndDate = document.getElementById("UsersContractEndDate");
       usersContractEndDate.disabled = "true";

    I perform conditional actions like this one based on on-screen fields in a similar way that you can do with in-task validation javascript, except this is faster and causes less headaches for my users. This is why:

     

    IM's native "Validate on change" attribute option is not local on the browser. A changed attribute submits the entire task page to the server, and it will come back with validations for every single field - even for those not filled in yet.

     

    As a result I can have over a dozen of red error messages on the top of the page for fields that weren't yet filled in, yet "failed validation" because they're marked as required attributes. It's also unnecessarily slow. If I want to enable an attribute text input field because of a checkbox, I (as well as my users) want that instantly. No submissions needed. Just onchange() the button and enable() the text input for the attribute. Done. Instantaneously. 

     

    All I want is a "validate on change" for one attribute when that attribute is changed, ignoring any other possible wrong or empty attributes. Just validate the one attribute that was triggered. Because IM can't do that, I wrote my own onkeypress, onclick and onchange handlers, and use them accordingly.

     

    I'm trying to do the same with this datepicker object. Based on the value of dropdown on screen, I want to either enable or disable the datepicker, and for the reasons stated, I do not want to use the native 'validate on change' functionality.

     

    So, to summarize, how I can enable/disable the datepicker attribute object through JavaScript?



  • 2.  Re: Manipulate DatePicker object with (external) JavaScript

    Posted Nov 18, 2018 08:58 PM

    Try below

    https://support.ca.com/cadocs/0/CA%20IdentityMinder%20r12%206-ENU/Bookshelf_Files/javadoc-im/com/netegrity/imapi/ScreenContext.html#disableField(java.lang.String)

     

    disableField

    void disableField(java.lang.String attrName)
    disable field for specified attribute.

     

    Parameters:
    attrName -

    enableField

    void enableField(java.lang.String attrName)
    Enable field for specified attribute

     

    Parameters:
    attrName -


  • 3.  Re: Manipulate DatePicker object with (external) JavaScript

    Posted Nov 19, 2018 09:38 AM

    That won't help me. The FieldContext from where I could get these methods is (as far as I know) only available if I use the IM specific Javascript validation routines, which if what I'm trying to avoid for all the reasons I laid out in my post.

    If there is another way for me to get ahold of these methods, perhaps, but I don't know how.



  • 4.  Re: Manipulate DatePicker object with (external) JavaScript
    Best Answer

    Broadcom Employee
    Posted Nov 26, 2018 02:50 AM

    Hi, I would suggest contacting CA Services in order to check if they have a solution for you.