Expand my Community achievements bar.

Creating web applications using HTML5/JavaScript Remoting and Messaging Client SDK

Avatar

Level 2
4 Replies

Avatar

Employee Advisor

how do you create mapping between javascript class and a remoting destination created when you deploy a entity using workbench. I have created a entity called Employee with id,name,address,city as its attributes. I want to call CreateEmployee(Employee) method from my html page. How do I map the Employee object to a class in javascript?

Avatar

Employee

Hi workflowuser,

LCDS 4.6 supports generation of corresponding JavaScript beans for the entity. Take a look at the following page for how it can be done:

http://help.adobe.com/en_US/dataservicesjee/4.6/Modeling/WS3aefc5aa2cf947945e1065a1133ae52599b-8000....

Once the JavaScript bean is generated, you can follow the rest of the documentation in the link above.

Hope that helps.

Rohit

Avatar

Level 9

I did try that link. I have a model called "Employee" with id,name,address,city as its attributes. the javascript file that was created contained only the constructor and no mapping for the methods. From my HTML page I need to be able to called createEmployee method and I am not able to do that.

Can you try creating a entity in workbench,deploy it try to call the createXXXXX method on that remote object and if that works can you please publish the js file and the html code snippet here

Avatar

Former Community Member

Hi Girish

We are already communicating over this on email. I will provide you the working sample today. Let's just keep it over emails. The forum post is confusing others.

Diksha