10-17-2017 08:56 AM
I am trying to set a limit to add users. for example, I want only 10 users can be added. If 9 users are added then its fine. when the10th user is added, the limit is full, then the "new user" and "upload user CSV file" button must be graded out. so, I have created a webscript which counts the number of users available and fetches the value for the required number of users, i.e, 10 and returns true or false for availabilty of users is less than 10 or not. also, overrided the users.js file as required and I am able to do it.
but the issue is the page must needs to get refreshed to show the buttons are graded out or not.
Is there any way, I can see the changes accordingly on the same page without refreshing the page.
10-17-2017 01:43 PM
You could make an AJAX call to your web script. But if you want it to automatically disable links or make other changes due to the limit being reached while the person is sitting on that page (perhaps the limit is being reached because of actions some other user is taking) and without a page refresh then you will have to either make the AJAX call using a timer to do it every N seconds, or you will have to use web sockets and have the page get notified by the server when the limit is reached.
10-17-2017 01:43 PM
You could make an AJAX call to your web script. But if you want it to automatically disable links or make other changes due to the limit being reached while the person is sitting on that page (perhaps the limit is being reached because of actions some other user is taking) and without a page refresh then you will have to either make the AJAX call using a timer to do it every N seconds, or you will have to use web sockets and have the page get notified by the server when the limit is reached.
Explore our Alfresco products with the links below. Use labels to filter content by product module.