Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

On Demand AJAX call returning Javascript

ldapsrvAug 4 2014 — edited Aug 4 2014

Hi all,

Bit of an oddity here as I have not seen an on demand process complete successfully and spit out Javascript before. Perhaps a bug? Using APEX 4.2.4.

I've create an on demand page process on my login page that basically looks up an existing username/email combination and spits back a new randomly generated password to the user if they exist. Of course they should log on and change their password once this temp one has been sent.

Ajax call goes off without a hitch. My response is returned as expected via a htp.p in the page process and the email/password generation and hash all go off as expected. No exceptions are thrown. The issue is I'm getting the following Javascript returned from the AJAX call within the wwv_flow_show response:

{"msg":"Successfully sent credentials to selected email."}

<script type="text/javascript">

<!--

(function(){

var lTimeoutField = document.getElementById("apex_login_throttle_sec"),

    lTimeout      = lTimeoutField ? +lTimeoutField.innerHTML : 0;

if (lTimeout) {

    var lTimer = window.setInterval (

        function() {

            if (lTimeout > 0) {

                lTimeoutField.innerHTML = lTimeout;

                lTimeout--;

            } else {

                window.clearInterval(lTimer);

                var lDiv = document.getElementById("apex_login_throttle_div");

                if (lDiv) {

                    lDiv.parentNode.removeChild(lDiv);

                    return true;

                }

            }

        },

        1000 );

}})();

//-->

</script>

Call to page process:

apex.server.process ('P101_PRC_REQUEST_CREDENTIALS',

                    {pageItems : '[id^=P101_APP_USERS]'},

                    {

                    dataType  : 'text',

                    async      : false,

                    success   : function(pData) {

                                    var $jsonResult = JSON.parse(pData);

                                    if(!$jsonResult.error) {

                                        $('#responseMessage').css('background-color', 'green')

                                                                         .html($jsonResult.msg);

                                       

                                    } else {

                                        $('#responseMessage').css('background-color', 'red')

                                                                         .html($jsonResult.error);                                  

                                    }

                                    $('#RESPONSE_SECTION').slideDown(500);

                                }

                     });

Has anyone seen this behavior?

Cheers....

Comments

Hello

The Subtree Delete Control (1.2.840.113556.1.4.805) supported by OUD (Supported LDAP Controls - Oracle Fusion Middleware Architecture Reference for Oracle Unified Directory)  might fit your needs.

This control is attached to a delete request to indicate that the specified entry and all descendant entries are to be deleted.

You must have appropriate privileges to do that (admin account)

You can attached control to a ldapdelete using the -J option as described in ldapdelete - Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory

Sylvain

------

When closing a thread as answered remember to mark the correct and helpful posts to make it easier for others to find them

900846

Thanks Sylvain.

I tried with this command to delete entries

ldapdelete -J subtreedelete -h localhost -p 1389 -D "cn=Directory Manager" -w password -x ou=ext,ou=users,dc=example,dc=com

There are about 2 lakhs entries inside this OU and it is taking infact it is running since a hr and still it has not completed the operation.

Is there some other setting which i need to do.

regards,

Ram

Hello,

There is no additional thing to do, adding the control should work.

If it takes a very long time to delete thats one thing, if  it never completes and seem to hang this is another thing.

Has it deleted some entries or does it seem to hang w/o deleting any entry ?

Current implementation may be slow with large trees.

If the problem persists, I would encourage you to contact the Oracle Support so that they can investigate

Sylvain

------

When closing a thread as answered remember to mark the correct and helpful posts to make it easier for others to find them

900846

Thanks Sylvain, i have raised an SR and awaiting for the response

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 1 2014
Added on Aug 4 2014
1 comment
851 views