Xforms:repeat

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

Xforms:repeat

Marc.Benimeli
Hello,

I have following the whole discussion on xforms:if or xxforms:if...

I can show or hide a control according to a node attribute. I have to
use the relevant attribute of the xforms:bind.
The repeat example shows that. But in this example there is only one set
of buttons for all the nodes. And each time a control is selected the
xforms:bind is evaluated with the current control.

Now I want to have a button after each input control according to an
attribute. Is it possible ?

TIA, Marc

P.S. : A workaround can be to modify my instance to work properly.



--
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: Xforms:repeat

Erik Bruchez
Administrator
Marc BENIMELI wrote:
 > Hello,
 >
 > I have following the whole discussion on xforms:if or xxforms:if...
 >
 > I can show or hide a control according to a node attribute. I have to
 > use the relevant attribute of the xforms:bind.
 > The repeat example shows that. But in this example there is only one set
 > of buttons for all the nodes. And each time a control is selected the
 > xforms:bind is evaluated with the current control.
 >
 > Now I want to have a button after each input control according to an
 > attribute. Is it possible ?

Yes :-)

The BizDoc NG summary, for example, has buttons for every line:

   http://www.orbeon.com/ops/goto-example/bizdoc2

Using the appropriate binds you should be able to achieve what you
want.

-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
Reply | Threaded
Open this post in threaded view
|

RE: Xforms:repeat

Marc.Benimeli
In reply to this post by Marc.Benimeli

>> Now I want to have a button after each input control according to an
> attribute. Is it possible ?

>Yes :-)
>The BizDoc NG summary, for example, has buttons for every line:
>   http://www.orbeon.com/ops/goto-example/bizdoc2
>Using the appropriate binds you should be able to achieve what you
want.

Sorry for my poor English,

<level1>
        <level2>
        </level2>
        <level2>
        </level2>



--
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: Xforms:repeat

Erik Bruchez
Administrator
Marc BENIMELI wrote:

>>>Now I want to have a button after each input control according to an
>>
>>attribute. Is it possible ?
>
>
>>Yes :-)
>>The BizDoc NG summary, for example, has buttons for every line:
>>  http://www.orbeon.com/ops/goto-example/bizdoc2
>>Using the appropriate binds you should be able to achieve what you
>
> want.
>
> Sorry for my poor English,
>
> <level1>
> <level2>
> </level2>
> <level2>
> </level2>
Marc, I assume you did not quite finish this email? ;-)

-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
Reply | Threaded
Open this post in threaded view
|

RE: Xforms:repeat

Marc.Benimeli
In reply to this post by Marc.Benimeli
>> Now I want to have a button after each input control according to an
> attribute. Is it possible ?

>Yes :-)
>The BizDoc NG summary, for example, has buttons for every line:
>   http://www.orbeon.com/ops/goto-example/bizdoc2
>Using the appropriate binds you should be able to achieve what you
want.

Erik, I have problem with my keyboard and my fingers too. ;-)

So(for the English) I give an example to explain what I really mean.
When I click in the first input the 2 "+" buttons appear. When the focus
is on the second input there's no button.
I want to have a button for the fisrt input and none for the second
whatever the action.

Is it more clear ?

Marc

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="2.0"
            xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
            xmlns:ev="http://www.w3.org/2001/xml-events"
            xmlns:xforms="http://www.w3.org/2002/xforms">

    <xhtml:head>
       
        <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
            <xforms:instance id="model">
                <form id="toto">
                    <node_test repeatable="yes">
                    </node_test>
                    <node_test repeatable="no">
                    </node_test>
                </form>
            </xforms:instance>
            <xforms:instance id="button">
                <trigger>
                    <repeat/>
                </trigger>
            </xforms:instance>
   
            <xforms:bind nodeset="instance('button')/repeat"
relevant="instance('model')/node_test[index('repeat_node')]/@repeatable=
'yes'"/>

        </xforms:model>
           
    </xhtml:head>
       
    <xhtml:body>

        <xforms:group ref="instance('model')"
xmlns:xforms="http://www.w3.org/2002/xforms">        

            <xforms:repeat nodeset="/form/node_test" id="repeat_node">
                        <xhtml:p>
                        <xforms:input ref="."/>
               <xforms:trigger ref="instance('button')/repeat">
                   <xforms:label>+</xforms:label>
                   <xforms:insert ev:event="DOMActivate"
nodeset="/form/node_test[index('repeat_node')]"
 
at="last()" position="before"/>
                        </xforms:trigger>
                        </xhtml:p>
            </xforms:repeat>
        </xforms:group>
    </xhtml:body>
</xhtml:html>




--
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: Xforms:repeat

Erik Bruchez
Administrator
If you don't care about binding controls to the @repeatable attribute
other than the optional trigger, you can simply do as in the attached
modified version.

-Erik

Marc BENIMELI wrote:

>>>Now I want to have a button after each input control according to an
>>
>>attribute. Is it possible ?
>
>
>>Yes :-)
>>The BizDoc NG summary, for example, has buttons for every line:
>>  http://www.orbeon.com/ops/goto-example/bizdoc2
>>Using the appropriate binds you should be able to achieve what you
>
> want.
>
> Erik, I have problem with my keyboard and my fingers too. ;-)
>
> So(for the English) I give an example to explain what I really mean.
> When I click in the first input the 2 "+" buttons appear. When the focus
> is on the second input there's no button.
> I want to have a button for the fisrt input and none for the second
> whatever the action.
>
> Is it more clear ?
>
> Marc
>
> <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
>             xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xsl:version="2.0"
>             xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>             xmlns:ev="http://www.w3.org/2001/xml-events"
>             xmlns:xforms="http://www.w3.org/2002/xforms">
>
>     <xhtml:head>
>        
>         <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
>             <xforms:instance id="model">
>                 <form id="toto">
>                     <node_test repeatable="yes">
>                     </node_test>
>                     <node_test repeatable="no">
>                     </node_test>
>                 </form>
>             </xforms:instance>
>             <xforms:instance id="button">
>                 <trigger>
>                     <repeat/>
>                 </trigger>
>             </xforms:instance>
>    
>             <xforms:bind nodeset="instance('button')/repeat"
> relevant="instance('model')/node_test[index('repeat_node')]/@repeatable=
> 'yes'"/>
>
>         </xforms:model>
>            
>     </xhtml:head>
>        
>     <xhtml:body>
>
>         <xforms:group ref="instance('model')"
> xmlns:xforms="http://www.w3.org/2002/xforms">        
>
>             <xforms:repeat nodeset="/form/node_test" id="repeat_node">
> <xhtml:p>
>                <xforms:input ref="."/>
>                <xforms:trigger ref="instance('button')/repeat">
>                    <xforms:label>+</xforms:label>
>                    <xforms:insert ev:event="DOMActivate"
> nodeset="/form/node_test[index('repeat_node')]"
>  
> at="last()" position="before"/>
>                </xforms:trigger>
> </xhtml:p>
>             </xforms:repeat>
>         </xforms:group>
>     </xhtml:body>
> </xhtml:html>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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

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

RE: Xforms:repeat

Marc.Benimeli
In reply to this post by Marc.Benimeli
Thanks a lot Erik,

It's exactly what I wanted to do.

Regards,

Marc

-----Message d'origine-----
De : Erik Bruchez [mailto:[hidden email]] De la part de Erik Bruchez
Envoyé : vendredi 14 octobre 2005 00:46
À : [hidden email]
Objet : Re: [ops-users] Xforms:repeat

If you don't care about binding controls to the @repeatable attribute other than the optional trigger, you can simply do as in the attached modified version.

-Erik

Marc BENIMELI wrote:

>>>Now I want to have a button after each input control according to an
>>
>>attribute. Is it possible ?
>
>
>>Yes :-)
>>The BizDoc NG summary, for example, has buttons for every line:
>>  http://www.orbeon.com/ops/goto-example/bizdoc2
>>Using the appropriate binds you should be able to achieve what you
>
> want.
>
> Erik, I have problem with my keyboard and my fingers too. ;-)
>
> So(for the English) I give an example to explain what I really mean.
> When I click in the first input the 2 "+" buttons appear. When the
> focus is on the second input there's no button.
> I want to have a button for the fisrt input and none for the second
> whatever the action.
>
> Is it more clear ?
>
> Marc
>
> <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
>             xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xsl:version="2.0"
>             xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>             xmlns:ev="http://www.w3.org/2001/xml-events"
>             xmlns:xforms="http://www.w3.org/2002/xforms">
>
>     <xhtml:head>
>        
>         <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
>             <xforms:instance id="model">
>                 <form id="toto">
>                     <node_test repeatable="yes">
>                     </node_test>
>                     <node_test repeatable="no">
>                     </node_test>
>                 </form>
>             </xforms:instance>
>             <xforms:instance id="button">
>                 <trigger>
>                     <repeat/>
>                 </trigger>
>             </xforms:instance>
>    
>             <xforms:bind nodeset="instance('button')/repeat"
> relevant="instance('model')/node_test[index('repeat_node')]/@repeatabl
> e=
> 'yes'"/>
>
>         </xforms:model>
>            
>     </xhtml:head>
>        
>     <xhtml:body>
>
>         <xforms:group ref="instance('model')"
> xmlns:xforms="http://www.w3.org/2002/xforms">        
>
>             <xforms:repeat nodeset="/form/node_test" id="repeat_node">
> <xhtml:p>
>                <xforms:input ref="."/>
>                <xforms:trigger ref="instance('button')/repeat">
>                    <xforms:label>+</xforms:label>
>                    <xforms:insert ev:event="DOMActivate"
> nodeset="/form/node_test[index('repeat_node')]"
>  
> at="last()" position="before"/>
>                </xforms:trigger>
> </xhtml:p>
>             </xforms:repeat>
>         </xforms:group>
>     </xhtml:body>
> </xhtml:html>
>
>
>
> ----------------------------------------------------------------------
> --
>
>
> --
> 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