Iterator select1 combination

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

Iterator select1 combination

Sathish K Mittapelli
Hai all,
             This is my model


     <xforms:model>
    <xforms:instance id="quest-instance">
           
        <questions xmlns="">
            <question>
            <name>How are you ?</name>
            <type>full</type>
            <answers>           
                 <ans value="fine" name="fine">
                 </ans>
                <ans value="very" name="very">
                </ans>
                <ans value="bad" name="bad">
                </ans>
            </answers>               
    </question>
    <question>
            <name>what are u doing ?</name>
            <type>compact</type>           
            <answers>           
                 <ans value="fine" name="Fine">
                 </ans>
                <ans value="verysdf" name="verysdf">
                </ans>
                <ans value="badwer" name="bad3453">
                </ans>
            </answers>               
    </question>           
    </questions>
          
    </xforms:instance>

    </xforms:model>



<xforms:repeat id="quest-repeat" nodeset="question">
       
                <xforms:output ref="name"/>
                         
                     
             <xforms:select1 ref="answers/ans"  appearance="full">
                <xforms:itemset nodeset="answers/ans">
                    <xforms:label ref="@name"/>
                    <xforms:value ref="@value"/>
                </xforms:itemset>
                </xforms:select1>
           
                   
        </xforms:repeat>


the output we are expecting is

How r u?       fine  bad very
What r u doing?  Fine verysdf  bad3453



but i am getting

How r u?       fine  bad very
What r u doing?   fine  bad very

Help me how to get the desired output..



THANKS & REGARDS
SATHISH K MITTAPELLI  


Unlimited freedom, unlimited storage. Get it now

--
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: Iterator select1 combination

fl.schmitt(ops-users)
hi sathish

> <xforms:repeat id="quest-repeat" nodeset="question">
>     <xforms:output ref="name"/>
>              <xforms:select1 ref="answers/ans"  appearance="full">
>                 <xforms:itemset nodeset="answers/ans">
>                     <xforms:label ref="@name"/>
>                     <xforms:value ref="@value"/>
>                 </xforms:itemset>
>                 </xforms:select1>
>         </xforms:repeat>

This is a problem with the context when using an itemset. See:

http://www.nabble.com/Nested-Repeats-to10359537.html#a10411652

So this should work:

<xforms:select1 ref="reply" appearance="full">
     <xforms:label ref="xxforms:repeat-current('quest-repeat')/name" />
     <xforms:itemset
         nodeset="xxforms:repeat-current('quest-repeat')/answers/ans">
         <xforms:label ref="@name" />
         <xforms:value ref="@value" />
     </xforms:itemset>
</xforms:select1>

Note that the xxforms:repeat-current() function is marked as deprecated
([1), but the replacements xxforms:context() or context() didn't work
for me with Orbeon Forms 3.6.0.200712061930.


HTH
florian

[1] http://www.orbeon.com/ops/doc/reference-xforms-2#ops-extensions



--
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: Iterator select1 combination

Sathish K Mittapelli
Thank you Florian....My problem resolved....

Florian Schmitt <[hidden email]> wrote:
hi sathish

>
>
>
>
>
>
>

>

>


This is a problem with the context when using an itemset. See:

http://www.nabble.com/Nested-Repeats-to10359537.html#a10411652

So this should work:




nodeset="xxforms:repeat-current('quest-repeat')/answers/ans">





Note that the xxforms:repeat-current() function is marked as deprecated
([1), but the replacements xxforms:context() or context() didn't work
for me with Orbeon Forms 3.6.0.200712061930.


HTH
florian

[1] http://www.orbeon.com/ops/doc/reference-xforms-2#ops-extensions


--
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



THANKS & REGARDS
SATHISH K MITTAPELLI  


Forgot the famous last words? Access your message archive online. Click here.

--
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: Iterator select1 combination

Erik Bruchez
Administrator
In reply to this post by fl.schmitt(ops-users)
> Note that the xxforms:repeat-current() function is marked as  
> deprecated ([1), but the replacements xxforms:context() or context()  
> didn't work for me with Orbeon Forms 3.6.0.200712061930.

That's right, we fixed context() quite recently.

-Erik

--
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