Nested repeat problem

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

Nested repeat problem

mjgraham
Hi,

I have a nested repeat that I have updated to OPS3 syntax in the same
way that I have updated all my other non-nested repeats
which work:

<xforms:repeat
nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
id="relationshipRepeat">
  <xforms:select1 ref="vr:relationshipType" appearance="compact">
    <xforms:item>
      <xforms:label>mirror-of</xforms:label>
      <xforms:value>mirror-of</xforms:value>
    </xforms:item>
    <xforms:item>
      <xforms:label>service-for</xforms:label>
      <xforms:value>service-for</xforms:value>
    </xforms:item>
    <xforms:item>
      <xforms:label>derived-from</xforms:label>
      <xforms:value>derived-from</xforms:value>
    </xforms:item>
    <xforms:item>
      <xforms:label>related-to</xforms:label>
      <xforms:value>related-to</xforms:value>
    </xforms:item>
  </xforms:select1>
  <xforms:trigger>
    <xforms:label>X</xforms:label>
    <xforms:delete ev:event="DOMActivate"
nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
at="index('relationshipRepeat')"/>
  </xforms:trigger>
  <xforms:repeat nodeset="vr:relatedResource" id="relatedResourceRepeat">
    <xforms:input ref="."/>
    <xforms:trigger>
      <xforms:label>X</xforms:label>
      <xforms:delete ev:event="DOMActivate"
nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"
at="index('relatedResourceRepeat')"/>
    </xforms:trigger>
    <xforms:input ref="@ivo-id"/>
  </xforms:repeat>
  <xforms:trigger>
    <xforms:label>Insert New relatedResource</xforms:label>
    <xforms:action ev:event="DOMActivate">
      <xforms:insert
nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"
at="index('relatedResourceRepeat')" position="after"/>
    </xforms:action>
  </xforms:trigger>
</xforms:repeat>
<xforms:trigger>
  <xforms:label>Insert New relationship</xforms:label>
  <xforms:action ev:event="DOMActivate">
    <xforms:insert
nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
at="index('relationshipRepeat')" position="after"/>
  </xforms:action>
</xforms:trigger>

What happens here is that it renders fine but the "Insert New
relationship" button justs adds another relatedResource instead of
another relationship. Can anyone see what the problem is - I'm using
OPS3beta3 from CVS last week.

    Cheers,

    Matthew



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Nested repeat problem

Hank Ratzesberger
Should it be:

position="after()"

i.e. xpath function ?

--Hank

----- Original Message -----
From: "Matthew Graham" <[hidden email]>
To: <[hidden email]>
Sent: Monday, September 19, 2005 11:36 PM
Subject: [ops-users] Nested repeat problem


> Hi,
>
> I have a nested repeat that I have updated to OPS3 syntax in the same
> way that I have updated all my other non-nested repeats
> which work:
>
> <xforms:repeat
> nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
> id="relationshipRepeat">
>  <xforms:select1 ref="vr:relationshipType" appearance="compact">
>    <xforms:item>
>      <xforms:label>mirror-of</xforms:label>
>      <xforms:value>mirror-of</xforms:value>
>    </xforms:item>
>    <xforms:item>
>      <xforms:label>service-for</xforms:label>
>      <xforms:value>service-for</xforms:value>
>    </xforms:item>
>    <xforms:item>
>      <xforms:label>derived-from</xforms:label>
>      <xforms:value>derived-from</xforms:value>
>    </xforms:item>
>    <xforms:item>
>      <xforms:label>related-to</xforms:label>
>      <xforms:value>related-to</xforms:value>
>    </xforms:item>
>  </xforms:select1>
>  <xforms:trigger>
>    <xforms:label>X</xforms:label>
>    <xforms:delete ev:event="DOMActivate"
> nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
> at="index('relationshipRepeat')"/>
>  </xforms:trigger>
>  <xforms:repeat nodeset="vr:relatedResource" id="relatedResourceRepeat">
>    <xforms:input ref="."/>
>    <xforms:trigger>
>      <xforms:label>X</xforms:label>
>      <xforms:delete ev:event="DOMActivate"
> nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"
> at="index('relatedResourceRepeat')"/>
>    </xforms:trigger>
>    <xforms:input ref="@ivo-id"/>
>  </xforms:repeat>
>  <xforms:trigger>
>    <xforms:label>Insert New relatedResource</xforms:label>
>    <xforms:action ev:event="DOMActivate">
>      <xforms:insert
> nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"
> at="index('relatedResourceRepeat')" position="after"/>
>    </xforms:action>
>  </xforms:trigger>
> </xforms:repeat>
> <xforms:trigger>
>  <xforms:label>Insert New relationship</xforms:label>
>  <xforms:action ev:event="DOMActivate">
>    <xforms:insert
> nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
> at="index('relationshipRepeat')" position="after"/>
>  </xforms:action>
> </xforms:trigger>
>
> What happens here is that it renders fine but the "Insert New
> relationship" button justs adds another relatedResource instead of
> another relationship. Can anyone see what the problem is - I'm using
> OPS3beta3 from CVS last week.
>
>    Cheers,
>
>    Matthew
>
>

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


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Nested repeat problem

mjgraham
Hank Ratzesberger wrote:

> Should it be:
>
> position="after()"
>
> i.e. xpath function ?
>
> --Hank
>
> ----- Original Message ----- From: "Matthew Graham"
> <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, September 19, 2005 11:36 PM
> Subject: [ops-users] Nested repeat problem
>
>
>> Hi,
>>
>> I have a nested repeat that I have updated to OPS3 syntax in the same
>> way that I have updated all my other non-nested repeats
>> which work:
>>
>> <xforms:repeat
>> nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
>> id="relationshipRepeat">
>>  <xforms:select1 ref="vr:relationshipType" appearance="compact">
>>    <xforms:item>
>>      <xforms:label>mirror-of</xforms:label>
>>      <xforms:value>mirror-of</xforms:value>
>>    </xforms:item>
>>    <xforms:item>
>>      <xforms:label>service-for</xforms:label>
>>      <xforms:value>service-for</xforms:value>
>>    </xforms:item>
>>    <xforms:item>
>>      <xforms:label>derived-from</xforms:label>
>>      <xforms:value>derived-from</xforms:value>
>>    </xforms:item>
>>    <xforms:item>
>>      <xforms:label>related-to</xforms:label>
>>      <xforms:value>related-to</xforms:value>
>>    </xforms:item>
>>  </xforms:select1>
>>  <xforms:trigger>
>>    <xforms:label>X</xforms:label>
>>    <xforms:delete ev:event="DOMActivate"
>> nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
>> at="index('relationshipRepeat')"/>
>>  </xforms:trigger>
>>  <xforms:repeat nodeset="vr:relatedResource" id="relatedResourceRepeat">
>>    <xforms:input ref="."/>
>>    <xforms:trigger>
>>      <xforms:label>X</xforms:label>
>>      <xforms:delete ev:event="DOMActivate"
>> nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"
>> at="index('relatedResourceRepeat')"/>
>>    </xforms:trigger>
>>    <xforms:input ref="@ivo-id"/>
>>  </xforms:repeat>
>>  <xforms:trigger>
>>    <xforms:label>Insert New relatedResource</xforms:label>
>>    <xforms:action ev:event="DOMActivate">
>>      <xforms:insert
>> nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"
>> at="index('relatedResourceRepeat')" position="after"/>
>>    </xforms:action>
>>  </xforms:trigger>
>> </xforms:repeat>
>> <xforms:trigger>
>>  <xforms:label>Insert New relationship</xforms:label>
>>  <xforms:action ev:event="DOMActivate">
>>    <xforms:insert
>> nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
>> at="index('relationshipRepeat')" position="after"/>
>>  </xforms:action>
>> </xforms:trigger>
>>
>> What happens here is that it renders fine but the "Insert New
>> relationship" button justs adds another relatedResource instead of
>> another relationship. Can anyone see what the problem is - I'm using
>> OPS3beta3 from CVS last week.
>>
>>    Cheers,
>>
>>    Matthew
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>>
>> --
>> 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
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>
>------------------------------------------------------------------------
>
>
>--
>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
>ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  
>
Hi,

No, position="before" or position="after" is how it is done in the
Orbeon examples and works fine with 2.8.

    Cheers,

    Matthew



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Nested repeat problem

Erik Bruchez
Administrator
In reply to this post by mjgraham
Matthew,

This appear to work for me. There is an issue if I don't have
something like a <tr> within the repeats, but otherwise it works. See
the attached version. You can try it on the sandbox:

   http://www.orbeon.com/ops/goto-example/xforms-sandbox

-Erik

Matthew Graham wrote:
 > Hi,
 >
 > I have a nested repeat that I have updated to OPS3 syntax in the same
 > way that I have updated all my other non-nested repeats
 > which work:
 >
 > <xforms:repeat
 > nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
 > id="relationshipRepeat">
 >  <xforms:select1 ref="vr:relationshipType" appearance="compact">
 >    <xforms:item>
 >      <xforms:label>mirror-of</xforms:label>
 >      <xforms:value>mirror-of</xforms:value>
 >    </xforms:item>
 >    <xforms:item>
 >      <xforms:label>service-for</xforms:label>
 >      <xforms:value>service-for</xforms:value>
 >    </xforms:item>
 >    <xforms:item>
 >      <xforms:label>derived-from</xforms:label>
 >      <xforms:value>derived-from</xforms:value>
 >    </xforms:item>
 >    <xforms:item>
 >      <xforms:label>related-to</xforms:label>
 >      <xforms:value>related-to</xforms:value>
 >    </xforms:item>
 >  </xforms:select1>
 >  <xforms:trigger>
 >    <xforms:label>X</xforms:label>
 >    <xforms:delete ev:event="DOMActivate"
 > nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
 > at="index('relationshipRepeat')"/>
 >  </xforms:trigger>
 >  <xforms:repeat nodeset="vr:relatedResource" id="relatedResourceRepeat">
 >    <xforms:input ref="."/>
 >    <xforms:trigger>
 >      <xforms:label>X</xforms:label>
 >      <xforms:delete ev:event="DOMActivate"
 >
nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"

 > at="index('relatedResourceRepeat')"/>
 >    </xforms:trigger>
 >    <xforms:input ref="@ivo-id"/>
 >  </xforms:repeat>
 >  <xforms:trigger>
 >    <xforms:label>Insert New relatedResource</xforms:label>
 >    <xforms:action ev:event="DOMActivate">
 >      <xforms:insert
 >
nodeset="/form/document/vr:Resource/vr:content/vr:relationship/vr:relatedResource"

 > at="index('relatedResourceRepeat')" position="after"/>
 >    </xforms:action>
 >  </xforms:trigger>
 > </xforms:repeat>
 > <xforms:trigger>
 >  <xforms:label>Insert New relationship</xforms:label>
 >  <xforms:action ev:event="DOMActivate">
 >    <xforms:insert
 > nodeset="/form/document/vr:Resource/vr:content/vr:relationship"
 > at="index('relationshipRepeat')" position="after"/>
 >  </xforms:action>
 > </xforms:trigger>
 >
 > What happens here is that it renders fine but the "Insert New
 > relationship" button justs adds another relatedResource instead of
 > another relationship. Can anyone see what the problem is - I'm using
 > OPS3beta3 from CVS last week.
 >
 >    Cheers,
 >
 >    Matthew
 >
 >
 > ------------------------------------------------------------------------
 >
 >
 > --
 > 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
 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

matthew.xhtml (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Nested repeat problem

Erik Bruchez
Administrator
Erik Bruchez wrote:

> This appear to work for me. There is an issue if I don't have
> something like a <tr> within the repeats

FYI added a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=304112&group_id=168&atid=350207

-Erik



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws