0

I'm really new to alfresco development. I have a java backed web-script which use to access global properties and get some values in json format. I need to access these values in share java-script web-script since I need to do few validations in share and do share customization. problem is I couldn't find a way to access java backed web-script output from java-script web-script.

I can use javasctipt and using alfresco ajax request, take java backed webscript response but how can I access javascript from javascript webscript in share?

Thank a lot !

1
  • What not put the common logic into a Java class, inject that into your java backed webscript, and make it available to the javascript one? Commented Nov 20, 2015 at 12:56

1 Answer 1

1

You can use Alfresco.util.Ajax helper:

Alfresco.util.Ajax.request({
  url: Alfresco.constants.PROXY_URI + {
    YOUR_ALF_WEBSCRIPT_URL
  },
  method: Alfresco.util.Ajax.GET // OR Alfresco.util.Ajax.POST,
  dataObj: {

  },
  successCallback: {
    fn: this.success, // Success method call
    scope: this
  },
  failureCallback: {
    fn: this.failure, // Failure method call
    scope: this
  }
});
Sign up to request clarification or add additional context in comments.

1 Comment

how can i get custom webscript url?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.