C
chrispragash
Hello Everybody,
I have an issue in programmatically adding a Repeater Section.
Here is how my schema looks:
<hb:Mother>
<hb:MotherFirstName></hb:MotherFirstName>
<hb:MotherMidName></hb:MotherMidName>
<hb:MotherLastName></hb:MotherLastName>
<hb
hone>
<hb
honeNumber></hb
honeNumber>
<hb
honeNumberType>Phone 1</hb
honeNumberType>
</hb
hone>
</hb:Mother>
The XSD specifies that the Phone Element has a maxOccurs="Unbounded".
The phone element is attached to a repeater section. In order to
programatically add a new phone row in the UI, I used the following
code:
PhoneNode = thisXDocument.DOM.createNode(1, "hb
hone", NS)
PhoneNumberNode = thisXDocument.DOM.createNode(1, "hb
honeNumber",
NS)
PhoneNumberTypeNode = thisXDocument.DOM.createNode(1,
"hb
honeNumberType", NS)
PhoneNode.appendChild(PhoneNumberNode)
PhoneNode.appendChild(PhoneNumberTypeNode)
thisxDocument.DOM.SelectSingleNode("/my:myFields/hb:Mother").appendChild(PhoneNode)
I keep getting an error message - Element Phone is unexpected under the
current content model of parent node Mother.
Any thoughts of suggestions on whats happening here would be really
helpful...
Thanks in advance,
Chris
I have an issue in programmatically adding a Repeater Section.
Here is how my schema looks:
<hb:Mother>
<hb:MotherFirstName></hb:MotherFirstName>
<hb:MotherMidName></hb:MotherMidName>
<hb:MotherLastName></hb:MotherLastName>
<hb
<hb
<hb
</hb
</hb:Mother>
The XSD specifies that the Phone Element has a maxOccurs="Unbounded".
The phone element is attached to a repeater section. In order to
programatically add a new phone row in the UI, I used the following
code:
PhoneNode = thisXDocument.DOM.createNode(1, "hb
PhoneNumberNode = thisXDocument.DOM.createNode(1, "hb
NS)
PhoneNumberTypeNode = thisXDocument.DOM.createNode(1,
"hb
PhoneNode.appendChild(PhoneNumberNode)
PhoneNode.appendChild(PhoneNumberTypeNode)
thisxDocument.DOM.SelectSingleNode("/my:myFields/hb:Mother").appendChild(PhoneNode)
I keep getting an error message - Element Phone is unexpected under the
current content model of parent node Mother.
Any thoughts of suggestions on whats happening here would be really
helpful...
Thanks in advance,
Chris