Simple model - 2 instances - 2nd one isn't bound to field

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

Simple model - 2 instances - 2nd one isn't bound to field

bschoen
I was looking through the archives and found Eric uploaded a simple page with checkbox examples. The page had a single instance in the model and a few binds. In the body of the page were selects showing how checkboxes are implemented.

I was just trying to test something with this page so I added another instance, a bind to the single data element in the instance and then tried to attach it to an xforms:input. My input is not displayed.

I'm relatively new to xforms but can usually mess around until I get something to work. This one seems so simple yet I can't get it working.

My instance is:

<xforms:instance id="test-inst">
    <test xmlns="">
        <sameAs>true</sameAs>
    </test>
</xforms:instance>       

and my bind looks like this:

<xforms:bind id="sameAsBnd" nodeset="instance('test-inst')/sameAs" type="xsd:boolean"/>

also tried

<xforms:bind id="sameAsBnd" nodeset="instance('test-inst')/test/sameAs" type="xsd:boolean"/>

and

<xforms:bind id="sameAsBnd" nodeset="/test/sameAs" type="xsd:boolean"/>

I've attached the file if someone could please have a look.

Thanks.
Brian
Test.jsp
Reply | Threaded
Open this post in threaded view
|

Re: Simple model - 2 instances - 2nd one isn't bound to field

bschoen
I see my problem. I was setting an id on my bind statement and using the id in the xforms:input ref attribute. When I just reference the nodeset with something like this:

<xforms:input ref="instance('testr-instance')/garage/sameAs">
    <xforms:label>my check</xforms:label>
</xforms:input>

Then all is well. 

There were a couple little problems in my instance so if anyone cares the correct instance looks like this:

<xforms:instance id="testr-instance">
    <testr xmlns="">
        <garage>
            <sameAs>true</sameAs>
        </garage>
    </testr>
</xforms:instance>


I knew it was simple but I assumed I knew how to use a bind "id". Better read the manual again.


From: bschoen <[hidden email]>
To: [hidden email]
Sent: Thursday, May 10, 2012 12:43:39 PM
Subject: [ops-users] Simple model - 2 instances - 2nd one isn't bound to field

I was looking through the archives and found Eric uploaded a simple page with
checkbox examples. The page had a single instance in the model and a few
binds. In the body of the page were selects showing how checkboxes are
implemented.

I was just trying to test something with this page so I added another
instance, a bind to the single data element in the instance and then tried
to attach it to an xforms:input. My input is not displayed.

I'm relatively new to xforms but can usually mess around until I get
something to work. This one seems so simple yet I can't get it working.

My instance is:

<xforms:instance id="test-inst">
    <test xmlns="">
        <sameAs>true</sameAs>
    </test>
</xforms:instance>   

and my bind looks like this:

<xforms:bind id="sameAsBnd" nodeset="instance('test-inst')/sameAs"
type="xsd:boolean"/>

also tried

<xforms:bind id="sameAsBnd" nodeset="instance('test-inst')/test/sameAs"
type="xsd:boolean"/>

and

<xforms:bind id="sameAsBnd" nodeset="/test/sameAs" type="xsd:boolean"/>

I've attached the file if someone could please have a look.

Thanks.
Brian
http://orbeon-forms-ops-users.24843.n4.nabble.com/file/n4623964/Test.jsp
Test.jsp

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Simple-model-2-instances-2nd-one-isn-t-bound-to-field-tp4623964.html
Sent from the Orbeon Forms (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