Web script to get the value from client side js to server side js

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2014 08:24 AM
Hi Team,
I have a client side java script which returns value count so how do I send the count to server side java script so that I can update my custom aspect value based on some business logic .Should I use a web script to achieve that .Please provide me with the example as I am new to alfresco .
I am using 4.1 enterprise edition
Thanks&Regards
Srikanth S
I have a client side java script which returns value count so how do I send the count to server side java script so that I can update my custom aspect value based on some business logic .Should I use a web script to achieve that .Please provide me with the example as I am new to alfresco .
I am using 4.1 enterprise edition
Thanks&Regards
Srikanth S
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2014 08:40 AM
you can certainly use webscript.
your webscript will be having javascript file as controller in which you can use your logic to generate that number and also assign that aspect to noderef by using services and root node apis provided by alfresco.
your webscript will be having javascript file as controller in which you can use your logic to generate that number and also assign that aspect to noderef by using services and root node apis provided by alfresco.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2014 10:55 PM
Thanks for the quick reply .can you please provide me any working example.
Regards
Srikanth S
Regards
Srikanth S
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2014 02:14 AM
If your client application is share ,you can use the remote.call() function in the client's javaScript controller to make the call.
alfrescoServerWebscriptUrl is existing webscript url or your custom webscript url
json = remote.call(alfrescoServerWebscriptUrl); if (json.status == 200) { }
If your client application is not share you can just use ajax to sumit webscript url to alfresco server
