inherit relevance from control to control

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

inherit relevance from control to control

Bart Ottenkamp
Hello anybody,

I'm wondering about the possibility of inheriting relevance...
What I mean is that if a certain nodeset, say the path to an input control, has a relevance set via the relevant attribute and if I want the next control to have a relevance with this input control, is there a way to specify that the relevance of that input control is also passed through to the second control?

Is the question any clear?

example:
<xforms:bind nodeset = "instance('form-instance')/widget[2]" relevant = "instance('form-instance')/widget[1] = 'a'"/>
<xforms:bind nodeset = "instance('form-instance')/widget[3]" relevant = "instance('form-instance')/widget[2] = 'b'"/>

in this example 
    ...widget[2] is relevant if ...widget[1] = 'a' 
and
    ...widget[3] is relevant if ...widget[2] = 'b' 

now the problem:
if I fill in 'a' for ...widget[1], ...widget[2] gets displayed
then I fill in 'b' for ....widget[2].... and ...widget[3] gets displayed....

BUT
If I go back to ....widget[1] and I change the value to something else then 'a'...., ...widget[2] disappears... BUT ....widget[3] is still visible!!!

And therfore, the question is: how to inherit the the relevance from ... widget[2] in the specification of the relevance of ... widget[3]??

I know I can of course also include the relevance in the xpath, but my forms tend to grow very big and therefore my xpaths also grow out of hand...

Is there a way????

Best regards,
Bart Ottenkamp


--
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: inherit relevance from control to control

Helsing, Patrik
Hi Bart,
 
I had a similar problem where my model was built as a hierarchical tree and I wanted the relevance to ripple down to the children.
I solved it with a bind of XPath-expression like this:
 
    <xforms:bind nodeset="//selected[count(../../selected)=1]" relevant="../../selected = '1'"/>
 
So all "selected" elements were relevant if their grand-parents were "selected". This technique rippled down to all children and grand-children.
Is a similar trick something you could use in your context?
 
Cheers,

Patrik Helsing
Tel +46 8 474 4560
[hidden email]

 


From: Bart Ottenkamp [mailto:[hidden email]]
Sent: den 25 februari 2009 21:23
To: [hidden email]
Subject: [ops-users] inherit relevance from control to control

Hello anybody,

I'm wondering about the possibility of inheriting relevance...
What I mean is that if a certain nodeset, say the path to an input control, has a relevance set via the relevant attribute and if I want the next control to have a relevance with this input control, is there a way to specify that the relevance of that input control is also passed through to the second control?

Is the question any clear?

example:
<xforms:bind nodeset = "instance('form-instance')/widget[2]" relevant = "instance('form-instance')/widget[1] = 'a'"/>
<xforms:bind nodeset = "instance('form-instance')/widget[3]" relevant = "instance('form-instance')/widget[2] = 'b'"/>

in this example 
    ...widget[2] is relevant if ...widget[1] = 'a' 
and
    ...widget[3] is relevant if ...widget[2] = 'b' 

now the problem:
if I fill in 'a' for ...widget[1], ...widget[2] gets displayed
then I fill in 'b' for ....widget[2].... and ...widget[3] gets displayed....

BUT
If I go back to ....widget[1] and I change the value to something else then 'a'...., ...widget[2] disappears... BUT ....widget[3] is still visible!!!

And therfore, the question is: how to inherit the the relevance from ... widget[2] in the specification of the relevance of ... widget[3]??

I know I can of course also include the relevance in the xpath, but my forms tend to grow very big and therefore my xpaths also grow out of hand...

Is there a way????

Best regards,
Bart Ottenkamp
 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.

--
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: inherit relevance from control to control

David McIntyre
In reply to this post by Bart Ottenkamp
We've previously made use of the exf:required() XPath function (in the namespace xmlns:exf="http://www.exforms.org/exf/1-0"), which lets you use express "such-and-such a node is required" in deciding when some other node is required.  I believe there's a similar exf:relevant() function which I haven't used.

I was going to direct you to some documentation but I find that the domain has expired ... you could try Google's cached version at
http://209.85.229.132/search?q=cache:1WPXmgDOQlkJ:www.exforms.org/+exforms&hl=en&ct=clnk&cd=3&gl=nz
but don't be surprised if some links are broken.

Cheers,

Dave

Bart Ottenkamp wrote:
Hello anybody,

I'm wondering about the possibility of inheriting relevance...
What I mean is that if a certain nodeset, say the path to an input control, has a relevance set via the relevant attribute and if I want the next control to have a relevance with this input control, is there a way to specify that the relevance of that input control is also passed through to the second control?

Is the question any clear?

example:
<xforms:bind nodeset = "instance('form-instance')/widget[2]" relevant = "instance('form-instance')/widget[1] = 'a'"/>
<xforms:bind nodeset = "instance('form-instance')/widget[3]" relevant = "instance('form-instance')/widget[2] = 'b'"/>

in this example 
    ...widget[2] is relevant if ...widget[1] = 'a' 
and
    ...widget[3] is relevant if ...widget[2] = 'b' 

now the problem:
if I fill in 'a' for ...widget[1], ...widget[2] gets displayed
then I fill in 'b' for ....widget[2].... and ...widget[3] gets displayed....

BUT
If I go back to ....widget[1] and I change the value to something else then 'a'...., ...widget[2] disappears... BUT ....widget[3] is still visible!!!

And therfore, the question is: how to inherit the the relevance from ... widget[2] in the specification of the relevance of ... widget[3]??

I know I can of course also include the relevance in the xpath, but my forms tend to grow very big and therefore my xpaths also grow out of hand...

Is there a way????

Best regards,
Bart Ottenkamp

--
Orion Signature

Dave McIntyreSoftware Developer
[hidden email]
P: +64 9 638 0600
M: +64 21 212 8087
F: +64 9 638 0699
S: <a href="callto:dave.mcintyre">dave.mcintyre
www.orionhealth.com


This e-mail and any attachments are intended only for the person to whom it is addressed and may contain privileged, proprietary, or other data protected from disclosure under applicable law. If you are not the addressee or the person responsible for delivering this to the addressee you are hereby notified that reading, copying or distributing this transmission is prohibited. If you have received this e-mail in error, please telephone us immediately and remove all copies of it from your system. Thank you for your co-operation.


--
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: inherit relevance from control to control

Bart Ottenkamp
In reply to this post by Helsing, Patrik
Hai Patrick,

thanks for answering, but no, I cannot use this, because I do not have the hierarchical tree. The relevancies can point anywhere in the model..
The only thing is, that functionally I think this should be present in orbeon.. and we do not need to come up with tricks or something....
I feel you should be able to say that this nodeset should be relevant IF that nodeset is relevant AND iIF another is relevant AND also specifying more relevances....

Hope somebody knows more??
Thanks again for the answer though!
Bart 

On Wed, Feb 25, 2009 at 9:43 PM, Helsing, Patrik <[hidden email]> wrote:
Hi Bart,
 
I had a similar problem where my model was built as a hierarchical tree and I wanted the relevance to ripple down to the children.
I solved it with a bind of XPath-expression like this:
 
    <xforms:bind nodeset="//selected[count(../../selected)=1]" relevant="../../selected = '1'"/>
 
So all "selected" elements were relevant if their grand-parents were "selected". This technique rippled down to all children and grand-children.
Is a similar trick something you could use in your context?
 
Cheers,

Patrik Helsing
Tel +46 8 474 4560
[hidden email]

 


From: Bart Ottenkamp [mailto:[hidden email]]
Sent: den 25 februari 2009 21:23
To: [hidden email]
Subject: [ops-users] inherit relevance from control to control

Hello anybody,

I'm wondering about the possibility of inheriting relevance...
What I mean is that if a certain nodeset, say the path to an input control, has a relevance set via the relevant attribute and if I want the next control to have a relevance with this input control, is there a way to specify that the relevance of that input control is also passed through to the second control?

Is the question any clear?

example:
<xforms:bind nodeset = "instance('form-instance')/widget[2]" relevant = "instance('form-instance')/widget[1] = 'a'"/>
<xforms:bind nodeset = "instance('form-instance')/widget[3]" relevant = "instance('form-instance')/widget[2] = 'b'"/>

in this example 
    ...widget[2] is relevant if ...widget[1] = 'a' 
and
    ...widget[3] is relevant if ...widget[2] = 'b' 

now the problem:
if I fill in 'a' for ...widget[1], ...widget[2] gets displayed
then I fill in 'b' for ....widget[2].... and ...widget[3] gets displayed....

BUT
If I go back to ....widget[1] and I change the value to something else then 'a'...., ...widget[2] disappears... BUT ....widget[3] is still visible!!!

And therfore, the question is: how to inherit the the relevance from ... widget[2] in the specification of the relevance of ... widget[3]??

I know I can of course also include the relevance in the xpath, but my forms tend to grow very big and therefore my xpaths also grow out of hand...

Is there a way????

Best regards,
Bart Ottenkamp
 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.


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




--
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: inherit relevance from control to control

Bart Ottenkamp
In reply to this post by David McIntyre
Thanks! This helps/works!
Bart

On Wed, Feb 25, 2009 at 10:18 PM, Dave McIntyre <[hidden email]> wrote:
We've previously made use of the exf:required() XPath function (in the namespace xmlns:exf="http://www.exforms.org/exf/1-0"), which lets you use express "such-and-such a node is required" in deciding when some other node is required.  I believe there's a similar exf:relevant() function which I haven't used.

I was going to direct you to some documentation but I find that the domain has expired ... you could try Google's cached version at
http://209.85.229.132/search?q=cache:1WPXmgDOQlkJ:www.exforms.org/+exforms&hl=en&ct=clnk&cd=3&gl=nz
but don't be surprised if some links are broken.

Cheers,

Dave

Bart Ottenkamp wrote:
Hello anybody,

I'm wondering about the possibility of inheriting relevance...
What I mean is that if a certain nodeset, say the path to an input control, has a relevance set via the relevant attribute and if I want the next control to have a relevance with this input control, is there a way to specify that the relevance of that input control is also passed through to the second control?

Is the question any clear?

example:
<xforms:bind nodeset = "instance('form-instance')/widget[2]" relevant = "instance('form-instance')/widget[1] = 'a'"/>
<xforms:bind nodeset = "instance('form-instance')/widget[3]" relevant = "instance('form-instance')/widget[2] = 'b'"/>

in this example 
    ...widget[2] is relevant if ...widget[1] = 'a' 
and
    ...widget[3] is relevant if ...widget[2] = 'b' 

now the problem:
if I fill in 'a' for ...widget[1], ...widget[2] gets displayed
then I fill in 'b' for ....widget[2].... and ...widget[3] gets displayed....

BUT
If I go back to ....widget[1] and I change the value to something else then 'a'...., ...widget[2] disappears... BUT ....widget[3] is still visible!!!

And therfore, the question is: how to inherit the the relevance from ... widget[2] in the specification of the relevance of ... widget[3]??

I know I can of course also include the relevance in the xpath, but my forms tend to grow very big and therefore my xpaths also grow out of hand...

Is there a way????

Best regards,
Bart Ottenkamp

--


Dave McIntyreSoftware Developer
[hidden email]
P: +64 9 638 0600
M: +64 21 212 8087
F: +64 9 638 0699
S: <a href="callto:dave.mcintyre" target="_blank">dave.mcintyre
www.orionhealth.com


This e-mail and any attachments are intended only for the person to whom it is addressed and may contain privileged, proprietary, or other data protected from disclosure under applicable law. If you are not the addressee or the person responsible for delivering this to the addressee you are hereby notified that reading, copying or distributing this transmission is prohibited. If you have received this e-mail in error, please telephone us immediately and remove all copies of it from your system. Thank you for your co-operation.



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