(no subject)

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

(no subject)

Ryan Puddephatt

Hi all,

            I have been trying to use a switch inside a repeat, after a little messing around and errors, I read on the W3C site that this is not currently possible. Is this correct and is there anyway around this? I’m currently using OPS 3.0, The code simply shows and hides more details on an order using the switch toggle technique, in a list of orders.

 

Thanks

Ryan



--
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: Switch within repeat

Erik Bruchez
Administrator
Ryan,

Excellent question. This is in fact something that is explicitly not
specified in the XForms 1.0 spec. However, some discussions on W3C
mailing-lists suggest ways of implementing this feature, and we plan to
implement it, whether for 3.0 or post-3.0.

The reason we have not implemented it yet is that often, you can use the
"relevant" model item property to achieve the same thing, i.e. bind a
control to a node which becomes relevant or non-relevant depending on
some XPath expression. When the node becomes non-relevant because data
in the instance has changed, the control disappears. When the node
becomes relevant, the control reappears.

Whether an xforms:switch or a "relevant" MIP is the better option
depends on the circumstances. In the future, you will be able to do both
with OPS. Right now, you have to go the "relevant" way.

-Erik

Ryan Puddephatt wrote:

> Hi all,
>
>             I have been trying to use a switch inside a repeat, after a
> little messing around and errors, I read on the W3C site that this is
> not currently possible. Is this correct and is there anyway around this?
> I?m currently using OPS 3.0, The code simply shows and hides more
> details on an order using the switch toggle technique, in a list of orders.
>
>  
>
> Thanks
>
> Ryan


--
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: Switch within repeat

Ryan Puddephatt
We have explored the bind and this works ok for hiding a control in all the
rows of the repeat. Is there anyway to hide/show controls in some rows
within the repeat?

Thanks
Ryan

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 20 October 2005 16:23
To: [hidden email]
Subject: Re: [ops-users] Switch within repeat

Ryan,

Excellent question. This is in fact something that is explicitly not
specified in the XForms 1.0 spec. However, some discussions on W3C
mailing-lists suggest ways of implementing this feature, and we plan to
implement it, whether for 3.0 or post-3.0.

The reason we have not implemented it yet is that often, you can use the
"relevant" model item property to achieve the same thing, i.e. bind a
control to a node which becomes relevant or non-relevant depending on
some XPath expression. When the node becomes non-relevant because data
in the instance has changed, the control disappears. When the node
becomes relevant, the control reappears.

Whether an xforms:switch or a "relevant" MIP is the better option
depends on the circumstances. In the future, you will be able to do both
with OPS. Right now, you have to go the "relevant" way.

-Erik

Ryan Puddephatt wrote:
> Hi all,
>
>             I have been trying to use a switch inside a repeat, after a
> little messing around and errors, I read on the W3C site that this is
> not currently possible. Is this correct and is there anyway around this?
> I'm currently using OPS 3.0, The code simply shows and hides more
> details on an order using the switch toggle technique, in a list of
orders.
>
>  
>
> Thanks
>
> Ryan





--
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: Switch within repeat

Alessandro  Vernet
Administrator
Hi Ryan,

When you do a repeat on a nodeset, the "row" corresponding to the
nodes that are not relevant won't be displayed.

You can see this in action in what used to be called the "repeat"
example, which is now the "to do lists" example. There we hide the
rows corresponding to a "template node" in the instance, which is just
there so we can an xforms:insert after everything has been deleted.

Alex

On 10/20/05, Ryan Puddephatt <[hidden email]> wrote:

> We have explored the bind and this works ok for hiding a control in all the
> rows of the repeat. Is there anyway to hide/show controls in some rows
> within the repeat?
>
> Thanks
> Ryan
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: 20 October 2005 16:23
> To: [hidden email]
> Subject: Re: [ops-users] Switch within repeat
>
> Ryan,
>
> Excellent question. This is in fact something that is explicitly not
> specified in the XForms 1.0 spec. However, some discussions on W3C
> mailing-lists suggest ways of implementing this feature, and we plan to
> implement it, whether for 3.0 or post-3.0.
>
> The reason we have not implemented it yet is that often, you can use the
> "relevant" model item property to achieve the same thing, i.e. bind a
> control to a node which becomes relevant or non-relevant depending on
> some XPath expression. When the node becomes non-relevant because data
> in the instance has changed, the control disappears. When the node
> becomes relevant, the control reappears.
>
> Whether an xforms:switch or a "relevant" MIP is the better option
> depends on the circumstances. In the future, you will be able to do both
> with OPS. Right now, you have to go the "relevant" way.
>
> -Erik
>
> Ryan Puddephatt wrote:
> > Hi all,
> >
> >             I have been trying to use a switch inside a repeat, after a
> > little messing around and errors, I read on the W3C site that this is
> > not currently possible. Is this correct and is there anyway around this?
> > I'm currently using OPS 3.0, The code simply shows and hides more
> > details on an order using the switch toggle technique, in a list of
> orders.
> >
> >
> >
> > Thanks
> >
> > Ryan
>
>
>
>
>
>
> --
> 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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Switch within repeat

Erik Bruchez
Administrator
Alex forgot to mention that the new To Do Lists example is now online:

   http://www.orbeon.com/ops/goto-example/xforms-todo

-Erik

Alessandro Vernet wrote:

> Hi Ryan,
>
> When you do a repeat on a nodeset, the "row" corresponding to the
> nodes that are not relevant won't be displayed.
>
> You can see this in action in what used to be called the "repeat"
> example, which is now the "to do lists" example. There we hide the
> rows corresponding to a "template node" in the instance, which is just
> there so we can an xforms:insert after everything has been deleted.
>
> Alex


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