Display group when not relevant

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

Display group when not relevant

tom.rudick
Is it possible to display a group if an element is not relevant? Suppose I want to display some records if an element exists, and if it does not display a message such as, "No Records." Is this possible?

Thanks in advance,
-Tom
Reply | Threaded
Open this post in threaded view
|

RE: Display group when not relevant

Ryan Puddephatt-3
Use @appearance="xxforms:internal"

________________________________

From: tom.rudick [mailto:[hidden email]]
Sent: Tue 30/12/2008 17:30
To: [hidden email]
Subject: [ops-users] Display group when not relevant




Is it possible to display a group if an element is not relevant? Suppose I
want to display some records if an element exists, and if it does not
display a message such as, "No Records." Is this possible?

Thanks in advance,
-Tom
--
View this message in context: http://www.nabble.com/Display-group-when-not-relevant-tp21220384p21220384.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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: Display group when not relevant

tom.rudick
Maybe I am missing something... but I don't see how using xxforms:internal allows me to show a group when something is NOT relevant. Any thoughts on what I'm missing?

-Tom

Ryan Puddephatt-3 wrote
Use @appearance="xxforms:internal"
Reply | Threaded
Open this post in threaded view
|

RE: RE: Display group when not relevant

Ryan Puddephatt-3
Quoting from http://www.orbeon.com/ops/doc/reference-xforms-2#internal-group

In general you won't have a need for this appearance, but it is useful as an optimization, as it leads to less HTML sent to the client.

**You may use it when a group is used only to change the in-scope evaluation context for nested controls and when you don't need changes to relevance which apply directly to the group to be reflected in the client**.

-----------------------------------------------
Ryan Puddephatt
Connectivity Developer
Fidessa LatentZero
1 Old Jewry
London EC2R 8DN
Office: +44 (0) 20 7105 1000
Direct: +44 (0) 20 7105 1821
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7105 1818
Email: [hidden email]
Web: http://www.latentzero.com


-----Original Message-----
From: tom.rudick [mailto:[hidden email]]
Sent: 02 January 2009 16:39
To: [hidden email]
Subject: [ops-users] RE: Display group when not relevant


Maybe I am missing something... but I don't see how using xxforms:internal allows me to show a group when something is NOT relevant. Any thoughts on what I'm missing?

-Tom


Ryan Puddephatt-3 wrote:
>
> Use @appearance="xxforms:internal"
>

--
View this message in context: http://www.nabble.com/Display-group-when-not-relevant-tp21220384p21253662.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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: Display group when not relevant

fl.schmitt(ops-users)
In reply to this post by tom.rudick
tom,

> Is it possible to display a group if an element is not relevant? Suppose I
> want to display some records if an element exists, and if it does not
> display a message such as, "No Records." Is this possible?

yes, there are different ways, for example:

- put the condition into the ref atribute of the xforms:group:

<xforms:group ref=".[count(/records/record) gt 0]">...</xforms:group>
<xforms:group ref=".[count(/records/record) eq 0]">...</xforms:group>


- two instances (e.g. "records-instance", "nope") with conditional
relevance, condition in bind:

<xforms:bind
    nodeset="instance('records-instance')"
    relevant="count(instance('records-instance')/records/record) gt 0"
/>

<xforms:bind
    nodeset="instance('nope')"
    relevant="count(instance('records-instance')/records/record) = 0"
/>

...

<xforms:group ref="instance('records-instance')/records/record">
...
</xforms:group>
<xforms:group ref="instance('nope')">
    <xforms:output value="'Sorry, no records'" />
</xforms:group>

Both should work, i'm not sure which one is more efficient

hth
florian


--
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: Display group when not relevant

tom.rudick
Thanks Florian,

Works like a charm.

fs(ops-users) wrote
tom,

> Is it possible to display a group if an element is not relevant? Suppose I
> want to display some records if an element exists, and if it does not
> display a message such as, "No Records." Is this possible?

yes, there are different ways, for example:

- put the condition into the ref atribute of the xforms:group:

<xforms:group ref=".[count(/records/record) gt 0]">...</xforms:group>
<xforms:group ref=".[count(/records/record) eq 0]">...</xforms:group>


- two instances (e.g. "records-instance", "nope") with conditional
relevance, condition in bind:

<xforms:bind
    nodeset="instance('records-instance')"
    relevant="count(instance('records-instance')/records/record) gt 0"
/>

<xforms:bind
    nodeset="instance('nope')"
    relevant="count(instance('records-instance')/records/record) = 0"
/>

...

<xforms:group ref="instance('records-instance')/records/record">
...
</xforms:group>
<xforms:group ref="instance('nope')">
    <xforms:output value="'Sorry, no records'" />
</xforms:group>

Both should work, i'm not sure which one is more efficient

hth
florian


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws