Create a custom global function - Private Cloud

Posted by IramK on 04-Mar-2015 04:00

Hello,

I have a function that I use almost on every page of all my applications that I have created and instead of having to copy paste them as script components everywhere, I would like the function to be available globally across all my applications so that I can just call it as a one-liner rather than copy paste the whole code. Is there a place on the server (Private Cloud) where I could place this function in a .js file and be able to call that everywhere else once its on the server? I would like to be able to use this in such a way that it doesn't affect even when I upgrade Rollbase to newer versions. Looking forward to your suggestions.

Cheers.

Posted by pvorobie on 04-Mar-2015 12:10

You can certainly reference Hosted file when you need in, in both server-side and client-side scripts.

All Replies

Posted by ymaisonn on 04-Mar-2015 04:56

Rollbase Private Cloud customers can extend the native Rollbase capabilities by creating custom Java-based Triggers, JSP pages and custom Authentication methods.

Custom Rollbase Development Kit is available by logging on to the Rollbase Private Cloud Download

The Custom Rollbase Development Kit includes:

• Rollbase class documentation in JavaDoc format

• Sample code

Posted by pvorobie on 04-Mar-2015 11:35

Copy-and-paste is certainly not a good idea. I advise you create a Hosted file and store commonly used script there. Use reference to that script on your pages.

Posted by IramK on 04-Mar-2015 11:37

But that would be per application setting. Can I not have it on the top level so that I can reference it through any application whenever I need it?

Posted by pvorobie on 04-Mar-2015 12:10

You can certainly reference Hosted file when you need in, in both server-side and client-side scripts.

This thread is closed