Strange insert issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange insert issue

Ozakca, Muzaffer

I’m very new to Orbeon forms (although I played with it a while ago). Here’s the problem: I have two repeatable sections in my form. While the first one works fine (i.e. new fields are added when the user clicks a button) the other doesn’t – i.e. it doesn’t display new fields. Below are the relevant sections from the form and the data source. I’ll appreciate if somebody could look at that and tell me if they spot anything wrong. I can also confirm that the data is actually copied to the actual instance, because I can see TEST TOPIC when I add a button to remove the selected mods:topic line but Add another topic doesn’t display any new lines of fields.

 

I hope I’m being clear. Thanks.

Muzaffer

 

FORM:

<!-- This one works fine -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another person</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[6]" nodeset="mods:name"
                                                            origin
="instance('mods-template')/mods:subject[6]/mods:name"/>
</xforms:trigger>
<br/>
                                   
<table>
<xforms:repeat nodeset="mods:subject[6]/mods:name" id="person-repeat">
           
<tr>
                       
<td>
                       
<xforms:input ref="mods:namePart">
                                   
<xforms:label class="field-label">Person pictured: </xforms:label>
                       
</xforms:input>
                       
</td>
                       
<td>
                       
<xforms:input ref="mods:affiliation">
                                   
<xforms:label class="field-label">Person's role: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

<!-- This 2nd one does not work correctly -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another topic</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[@authority='lctgm']" nodeset="mods:topic"
            origin
="instance('mods-template')/mods:subject[@authority='lctgm']/mods:topic"/>
</xforms:trigger>
<br/>
                                   
<table>

<xforms:repeat nodeset="mods:subject[@authority='lctgm']" id="topic-repeat">

            <tr>
                       
<td>
                       
<xforms:input ref="mods:topic">
                                   
<xforms:label class="field-label">Topic: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

 

SECTION from the SOURCE DATA:

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart/>

<mods:affiliation/>
</mods:name>

</mods:subject>

<mods:subject authority="lctgm">
           
<mods:topic/>
</mods:subject>

SECTION from the DATA TEMPLATE:

<mods:subject authority="lctgm">

            <mods:topic>TEST TOPIC</mods:topic>
</mods:subject>

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart></mods:namePart>

                        <mods:affiliation></mods:affiliation>
           
</mods:name>
</mods:subject>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Strange insert issue

Ryan Puddephatt-3

Your second xforms:repeat iterates over the mods:subject nodes not the mods:topic nodes

 

-----------------------------------------------

Ryan Puddephatt

FIX Developer

Fidessa LatentZero

1 Alfred Place

London WC1E 7EB

Office: +44 (0) 20 7462 4200

Direct: +44 (0) 20 7323 6112

Blackberry: +44 (0) 79 8539 2458

Fax: +44 (0) 20 7462 4242

Email: [hidden email]

Web: http://www.latentzero.com

 

From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 13 October 2008 20:39
To: [hidden email]
Subject: [ops-users] Strange insert issue

 

I’m very new to Orbeon forms (although I played with it a while ago). Here’s the problem: I have two repeatable sections in my form. While the first one works fine (i.e. new fields are added when the user clicks a button) the other doesn’t – i.e. it doesn’t display new fields. Below are the relevant sections from the form and the data source. I’ll appreciate if somebody could look at that and tell me if they spot anything wrong. I can also confirm that the data is actually copied to the actual instance, because I can see TEST TOPIC when I add a button to remove the selected mods:topic line but Add another topic doesn’t display any new lines of fields.

 

I hope I’m being clear. Thanks.

Muzaffer

 

FORM:

<!-- This one works fine -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another person</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[6]" nodeset="mods:name"
                                                            origin
="instance('mods-template')/mods:subject[6]/mods:name"/>
</xforms:trigger>
<br/>
                                   
<table>
<xforms:repeat nodeset="mods:subject[6]/mods:name" id="person-repeat">
           
<tr>
                       
<td>
                       
<xforms:input ref="mods:namePart">
                                   
<xforms:label class="field-label">Person pictured: </xforms:label>
                       
</xforms:input>
                       
</td>
                       
<td>
                       
<xforms:input ref="mods:affiliation">
                                   
<xforms:label class="field-label">Person's role: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

<!-- This 2nd one does not work correctly -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another topic</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[@authority='lctgm']" nodeset="mods:topic"
            origin
="instance('mods-template')/mods:subject[@authority='lctgm']/mods:topic"/>
</xforms:trigger>
<br/>
                                   
<table>

<xforms:repeat nodeset="mods:subject[@authority='lctgm']" id="topic-repeat">

            <tr>
                       
<td>
                       
<xforms:input ref="mods:topic">
                                   
<xforms:label class="field-label">Topic: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

 

SECTION from the SOURCE DATA:

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart/>

<mods:affiliation/>
</mods:name>

</mods:subject>

<mods:subject authority="lctgm">
           
<mods:topic/>
</mods:subject>

SECTION from the DATA TEMPLATE:

<mods:subject authority="lctgm">

            <mods:topic>TEST TOPIC</mods:topic>
</mods:subject>

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart></mods:namePart>

                        <mods:affiliation></mods:affiliation>
           
</mods:name>
</mods:subject>


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: RE: Strange insert issue

Ozakca, Muzaffer

Oh I see what you are saying, you are correct! Now I’m not sure where to get the data for the input field, shall I use mods:subject[@authority='lctgm']/mods:topic ?

 

<xforms:repeat nodeset="mods:subject[@authority='lctgm']/mods:topic" id="topic-repeat">

            <tr>
                       
<td>
                       
<xforms:input ref="???">
                                   
<xforms:label class="field-label">Topic: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>

Thanks a lot!

Muzaffer

 

From: Ryan Puddephatt [mailto:[hidden email]]
Sent: Tuesday, October 14, 2008 4:52 AM
To: [hidden email]
Subject: [ops-users] RE: Strange insert issue

 

Your second xforms:repeat iterates over the mods:subject nodes not the mods:topic nodes

 

-----------------------------------------------

Ryan Puddephatt

FIX Developer

Fidessa LatentZero

1 Alfred Place

London WC1E 7EB

Office: +44 (0) 20 7462 4200

Direct: +44 (0) 20 7323 6112

Blackberry: +44 (0) 79 8539 2458

Fax: +44 (0) 20 7462 4242

Email: [hidden email]

Web: http://www.latentzero.com

 

From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 13 October 2008 20:39
To: [hidden email]
Subject: [ops-users] Strange insert issue

 

I’m very new to Orbeon forms (although I played with it a while ago). Here’s the problem: I have two repeatable sections in my form. While the first one works fine (i.e. new fields are added when the user clicks a button) the other doesn’t – i.e. it doesn’t display new fields. Below are the relevant sections from the form and the data source. I’ll appreciate if somebody could look at that and tell me if they spot anything wrong. I can also confirm that the data is actually copied to the actual instance, because I can see TEST TOPIC when I add a button to remove the selected mods:topic line but Add another topic doesn’t display any new lines of fields.

 

I hope I’m being clear. Thanks.

Muzaffer

 

FORM:

<!-- This one works fine -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another person</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[6]" nodeset="mods:name"
                                                            origin
="instance('mods-template')/mods:subject[6]/mods:name"/>
</xforms:trigger>
<br/>
                                   
<table>
<xforms:repeat nodeset="mods:subject[6]/mods:name" id="person-repeat">
           
<tr>
                       
<td>
                       
<xforms:input ref="mods:namePart">
                                   
<xforms:label class="field-label">Person pictured: </xforms:label>
                       
</xforms:input>
                       
</td>
                       
<td>
                       
<xforms:input ref="mods:affiliation">
                                   
<xforms:label class="field-label">Person's role: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

<!-- This 2nd one does not work correctly -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another topic</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[@authority='lctgm']" nodeset="mods:topic"
            origin
="instance('mods-template')/mods:subject[@authority='lctgm']/mods:topic"/>
</xforms:trigger>
<br/>
                                   
<table>

<xforms:repeat nodeset="mods:subject[@authority='lctgm']" id="topic-repeat">

            <tr>
                       
<td>
                       
<xforms:input ref="mods:topic">
                                   
<xforms:label class="field-label">Topic: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

 

SECTION from the SOURCE DATA:

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart/>

<mods:affiliation/>
</mods:name>

</mods:subject>

<mods:subject authority="lctgm">
           
<mods:topic/>
</mods:subject>

SECTION from the DATA TEMPLATE:

<mods:subject authority="lctgm">

            <mods:topic>TEST TOPIC</mods:topic>
</mods:subject>

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart></mods:namePart>

                        <mods:affiliation></mods:affiliation>
           
</mods:name>
</mods:subject>


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: RE: RE: Strange insert issue

Ozakca, Muzaffer

I used “.” as the ref attribute in the xforms:input and it worked. Thanks Ryan!

 

Muzaffer

 

From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: Tuesday, October 14, 2008 9:55 AM
To: [hidden email]
Subject: [ops-users] RE: RE: Strange insert issue

 

Oh I see what you are saying, you are correct! Now I’m not sure where to get the data for the input field, shall I use mods:subject[@authority='lctgm']/mods:topic ?

 

<xforms:repeat nodeset="mods:subject[@authority='lctgm']/mods:topic" id="topic-repeat">

            <tr>
                       
<td>
                       
<xforms:input ref="???">
                                   
<xforms:label class="field-label">Topic: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>

Thanks a lot!

Muzaffer

 

From: Ryan Puddephatt [mailto:[hidden email]]
Sent: Tuesday, October 14, 2008 4:52 AM
To: [hidden email]
Subject: [ops-users] RE: Strange insert issue

 

Your second xforms:repeat iterates over the mods:subject nodes not the mods:topic nodes

 

-----------------------------------------------

Ryan Puddephatt

FIX Developer

Fidessa LatentZero

1 Alfred Place

London WC1E 7EB

Office: +44 (0) 20 7462 4200

Direct: +44 (0) 20 7323 6112

Blackberry: +44 (0) 79 8539 2458

Fax: +44 (0) 20 7462 4242

Email: [hidden email]

Web: http://www.latentzero.com

 

From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 13 October 2008 20:39
To: [hidden email]
Subject: [ops-users] Strange insert issue

 

I’m very new to Orbeon forms (although I played with it a while ago). Here’s the problem: I have two repeatable sections in my form. While the first one works fine (i.e. new fields are added when the user clicks a button) the other doesn’t – i.e. it doesn’t display new fields. Below are the relevant sections from the form and the data source. I’ll appreciate if somebody could look at that and tell me if they spot anything wrong. I can also confirm that the data is actually copied to the actual instance, because I can see TEST TOPIC when I add a button to remove the selected mods:topic line but Add another topic doesn’t display any new lines of fields.

 

I hope I’m being clear. Thanks.

Muzaffer

 

FORM:

<!-- This one works fine -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another person</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[6]" nodeset="mods:name"
                                                            origin
="instance('mods-template')/mods:subject[6]/mods:name"/>
</xforms:trigger>
<br/>
                                   
<table>
<xforms:repeat nodeset="mods:subject[6]/mods:name" id="person-repeat">
           
<tr>
                       
<td>
                       
<xforms:input ref="mods:namePart">
                                   
<xforms:label class="field-label">Person pictured: </xforms:label>
                       
</xforms:input>
                       
</td>
                       
<td>
                       
<xforms:input ref="mods:affiliation">
                                   
<xforms:label class="field-label">Person's role: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

<!-- This 2nd one does not work correctly -->

<xforms:trigger appearance="minimal">

            <xforms:label>Add another topic</xforms:label>
           
<xforms:insert ev:event="DOMActivate" context="instance('mods')/mods:subject[@authority='lctgm']" nodeset="mods:topic"
            origin
="instance('mods-template')/mods:subject[@authority='lctgm']/mods:topic"/>
</xforms:trigger>
<br/>
                                   
<table>

<xforms:repeat nodeset="mods:subject[@authority='lctgm']" id="topic-repeat">

            <tr>
                       
<td>
                       
<xforms:input ref="mods:topic">
                                   
<xforms:label class="field-label">Topic: </xforms:label>
                       
</xforms:input>
                       
</td>
           
</tr>
</xforms:repeat>
</table>
<br/>

 

SECTION from the SOURCE DATA:

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart/>

<mods:affiliation/>
</mods:name>

</mods:subject>

<mods:subject authority="lctgm">
           
<mods:topic/>
</mods:subject>

SECTION from the DATA TEMPLATE:

<mods:subject authority="lctgm">

            <mods:topic>TEST TOPIC</mods:topic>
</mods:subject>

<mods:subject>
           
<mods:name type="personal">

                        <mods:namePart></mods:namePart>

                        <mods:affiliation></mods:affiliation>
           
</mods:name>
</mods:subject>


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws