Hi,
I'm hoping someone can help me. I'm trying what should be a very simple bind but cannot get it to work and I'm not entirely sure what I'm doing wrong. I have a separate instance within the model of the document containing all the bind information - it's called 'bindings' -- so I'm using a form that contains two uniquely named instances - one for the main data (the primary instance) and one for the binding information. Here's the most simple example I could come up with - can anyone help me out with this? <xf:instance id="bindings"> <data xmlns=""> <test /> <rel>true</rel> </data> </xf:instance> <xf:bind nodeset="instance('bindings')/test" relevant="instance('bindings')/rel = 'true'"/> Further down, I have a group containing a load of content. I've added the ref to the group like so: <xf:group ref="instance('bindings')/test"> If I remove the ref altogether (and hence, remove the binding information), the contents of the group display without problems... With the above example, I've tried to hard-code the 'rel' value so the group should always display (to make testing simple), but whatever I do, I'm unable to get the group to display at all when I put in the ref... I've had success getting relevancy bindings to work with the firefox XForms plugin, but I seem to be drawing blanks getting them to work within Orbeon. Can anyone advise at all? Many thanks. |
Based on your pasted-in code I created a test file and run it in the
XForms sandbox on the orbeon site. Even with the @ref left in the xf:group I can see the content of the group (which seems to be a result different from what you are seeing - right?). Try to run this file and check if it works for you. The file is attached. A. On May 5, 2008, at 6:44 PM, Alex Bleasdale wrote: > > Hi, > > I'm hoping someone can help me. I'm trying what should be a very > simple > bind but cannot get it to work and I'm not entirely sure what I'm > doing > wrong. I have a separate instance within the model of the document > containing all the bind information - it's called 'bindings' -- so > I'm using > a form that contains two uniquely named instances - one for the main > data > (the primary instance) and one for the binding information. > > Here's the most simple example I could come up with - can anyone > help me out > with this? > > <xf:instance id="bindings"> > <data xmlns=""> > <test /> > <rel>true</rel> > </data> > </xf:instance> > > <xf:bind nodeset="instance('bindings')/test" > relevant="instance('bindings')/rel = 'true'"/> > > Further down, I have a group containing a load of content. I've > added the > ref to the group like so: > > <xf:group ref="instance('bindings')/test"> > > If I remove the ref altogether (and hence, remove the binding > information), > the contents of the group display without problems... > > With the above example, I've tried to hard-code the 'rel' value so > the group > should always display (to make testing simple), but whatever I do, I'm > unable to get the group to display at all when I put in the ref... > > I've had success getting relevancy bindings to work with the firefox > XForms > plugin, but I seem to be drawing blanks getting them to work within > Orbeon. > > Can anyone advise at all? > > Many thanks. > -- > View this message in context: http://www.nabble.com/Simple-binding-question-tp17065793p17065793.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.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 -- 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 form.xhtml (1K) Download Attachment |
Thanks so much for your reply and for confirming that the code worked for you. :)
I've just realised what the issue was - the information inside the group was being retrieved from another instance (my main instance), so putting in the ref="instance('bindings')/test" was breaking the context for all the other code inside that group - that explained why things had appeared to have stopped working. I got the relevance binding to work by making the instance explicit on all the refs inside the 'bound' group - as soon as I'd done that, everything worked fine. Thanks once again for your help with this one; I really appreciate it. A |
Free forum by Nabble | Edit this page |