index() in bind error

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

index() in bind error

hcr
 
hello all
   I have a proble with index(). when index() function in bind element, it isn't work! for example:
<xforms:instance>
    <form xmln=""> 
        <index/>
        <items>
            <item>item 1</item>
            <item>item 2</item>
        </items>
    </form>
</xforms:instance>
<xforms:bind nodeset="index" calculate="../items/item[index('repeat')]"/>
...
<xforms:input ref="index">
    <xforms:action ev:event="xforms-value-changed">
        <xforms:load resource="javascript:alert('xforms-value-changed')"/>
    </xforms:action>
</xforms:input>
<xforms:repeat nodeset="items/item" id="repeat">
    <xforms:input ref="."/>
</xforms:repeat>
 
 


--
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: index() in bind error

Erik Bruchez
Administrator
Well, you don't say what doesn't work. Can you please create a simple  
example that we can run in the XForms Sandbox and then explain the  
steps to reproduce the issue? See:

   http://www.orbeon.com/ops/doc/home-faq#reporting-issues

-Erik

On Nov 22, 2007, at 1:21 AM, hechengrong wrote:

>
> hello all
>    I have a proble with index(). when index() function in bind  
> element, it isn't work! for example:
> <xforms:instance>
>     <form xmln="">
>         <index/>
>         <items>
>             <item>item 1</item>
>             <item>item 2</item>
>         </items>
>     </form>
> </xforms:instance>
> <xforms:bind nodeset="index" calculate="../items/
> item[index('repeat')]"/>
> ...
> <xforms:input ref="index">
>     <xforms:action ev:event="xforms-value-changed">
>         <xforms:load resource="javascript:alert('xforms-value-
> changed')"/>
>     </xforms:action>
> </xforms:input>
> <xforms:repeat nodeset="items/item" id="repeat">
>     <xforms:input ref="."/>
> </xforms:repeat>
>
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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: index() in bind error

mangvlad
In reply to this post by hcr
I am having the same problem: if you try to calculate a value (using bind) based on some index it gets set to 1 and never changes.
Attached is a sample that shows this.

testIndex.xhtml