Skip to Content

How to know from the Additional Properties when an Ajax request launched in the Component has finished ?

Hi guyz.

I'm kinda new to DS (actually using 1.4), I'm taking back a piece of code I did not developed and I'm stuck with questions in my head 😔.

Actually, I have a custom property (let's call it "ajax"), called in my Additional Properties JS file after a user manually enters an URL :

this.firePropertiesChanged(["ajax"]);

this.ajax() { .../*code is executed*/... }

That sends to the Component an url.

The Component received it well through this.ajax and performs an AJAX request to load stuff from outside.

Now, I need to update my Additional Properties "view" after the AJAX request has ended (well or not), and I'm kinda stuck there.

From what I read from the docs, calling at the end of the AJAX request :

this.firePropertiesChanged(["ajax"]); // or any other properties dedicated to that


won't warn the Additional Properties back.


Seems like I can't call this.callRuntimeHandler() right after I fire the property from the Additional Properties because the request might not been over.


How can I achieve this ? I've started to read about ztl file but I miss some concepts out of it, also I think using the script contributor is not what I need.

Any idea/help 😊 ?


EDIT :

I could do a loop that checks for a property x !== null just after the firing. The property x would change its value right after the ajax has ended ? Not so great but that's all I can see now (or a long time out in JS but well 🤯)

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 04, 2014 at 08:45 PM

    I did not find a solution for the moment.

    Anyway, I found a workaround as the APS is doing the Ajax Call and gives the result to the component through a property.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.