[Progress Communities] [Progress OpenEdge ABL] Forum Post: JSDO not working as advertised

Status
Not open for further replies.
S

ssouthwe

Guest
I'm experimenting with using the JSDO to communicate with a business entity I've setup on my PASOE instance. I'm not using any sort of fancy frameworks - just plain old HTML with the JSDO included as JavaScript. The business entity is based on a single table. It's not customized at all - just what gets automatically generated with the wizard in 11.7.4. In doing so, I'm seeing that the actual behavior of the JSDO doesn't square up with the documentation. For instance, the documentation says you can do a fill() and then access the resulting data by accessing the temp-table name as a property of the jsdo object. For example, if your jsdo reference were myJSDO, and the temp-table is ttWebUser, then the docs say you can access myJSDO.ttWebUser.foreach(). I'm getting data back from my BE, but the jsdo object doesn't have a ttWebUser property. Question 1: Is there any special trick to getting the jsdo to put the data into a property named like your temp table? The jsdo object does have a foreach property, but it doesn't come back with a single table record for each iteration. Instead it returns a "JSRecord" object that then has a "data" property, which then has my dataset in it, and my dataset has my temp-table and its data. It has the whole thing. On each iteration. If I console.log() the record that comes into the foreach function, it's showing this: Question 2: What in the world is going on here? Why would a foreach return the entire dataset? Why would the resulting JSRecord object not have fields defined in it like the documentation says it does ? Does anyone have a really simple example of using a jsdo with plain old JavaScript to access a BE's methods? Maybe a tutorial out there that doesn't involve mobile development or Kendo?

Continue reading...
 
Status
Not open for further replies.
Top