Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

xfa.record reference incorrect

Avatar

Level 2

While trying to reference passed data in javascript i am blocked...

using method as described: xfa.record.<xsd root element definion>

When i extract the generated form xml using xfa.saveXML() i notice that an empty root element preceding the actual data being passed probably interferes:

<xfa:datasets xmlns:xfa="http.xfa.org/schema/xfa-data/1.0/">

     <xfa:data>

          <MYDATA/>

          <MYDATA>

               <element1>value1</element1>

               <!-- etc -->

          </MYDATA>

     </xfa:data>

</xfa:datasets>

The xsd definition respects the expat restrictions and the testdata used is validated ok using the xsd of the dataconnection.

Trying to refer to xfa.record.MYDATA probaly ends at node 1 when in stead i need to get into node2????

Using xfa.resolveNode(s) also did not do the trick.

Also removed dataconnection, saved form and added dataconnection again did not do the trick.

Also picked other more simple schema, but could not refer to that data also.

I wonder what i am doing wrong here...

Any help is greatly appreciated!!!!

Marcel

NB:

Referencing to it like this, produced the data from the xmldata:

var tmp = xfa.data.nodes;

this.rawValue = tmp.item(1).element1.value;

I still suspect something to be wrong, since the use of xfa.record is default.

Issue solved:

Error in the testdata xml, which i updated and validated using xsd.

Forgot to reload testdata while previewing the result in designer...but now i did and this issue is solved...

0 Replies