Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Table Problem - Fields repeat on every row

Avatar

Former Community Member
Hi there,



I have a dynamic table, which adds rows with the click of a buttn, using AddInstance.



My first problem is that when I try to enter data in my second row (or any after the first) whatever data I enter refreshes the data on the previous rows, so all my rows look exactly the same.

I have the table bound to a schema, because I need this data to be passed on with Workflow.



My second problem is that when I pass on the form to the next step, Only the first row is preserved, but all the other ones are lost.



I think it might be shcema/binding problem. Is there a particular syntax for declaring a table in an xml schema?



Thanks.
3 Replies

Avatar

Former Community Member
I solved this problem by making changes on the xml schema. You have to put this attribute inside your repeated field tag :

.... maxOccurs="unbounded" ....

For instance, you have a column name "Product". You should type it in xsd file like :

Avatar

Former Community Member
if you are working with a more complicated schema, then you need to define a subform that is bound to the upper element, and have fields inside that form that relate to the upper element's subelements.<br /><br />eg say you have in the schema<br /><xsd:complexType name="SomeName"><br /><xsd:sequence><br /><xsd:element name="ServiceAreaType" type="xsdLocal:string30" minOccurs="0" maxOccurs="1"/><br /><xsd:element name="ServiceAreaValue" type="xsdLocal:string250" minOccurs="0" maxOccurs="1"/><br /></xsd:complexType><br /><br />the easy way: go to the data view and drag "SomeName" onto your row (and reformat to make it look pretty) - this will bring across text fields for ServiceAreaType and ServiceAreaValue; <br />this will mean that there is a subform that is bound to the upper element "SomeName", and then fields inside it bound to it's sub-elements SerivceAreaType and ServiceAreaValue.<br /><br />hope that makes sense!<br />Amanda

Avatar

Former Community Member
As an addition: i've found that if the schema needs to be defined using elements. if you use attributes instead, this binding will not work.