Ignore required or constraint if relevance="false()"

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

Ignore required or constraint if relevance="false()"

npujol73
Hi,

 Is there a way to do ignore "required" or "constraint" if relevance="false()" on a bind ? Unless i am missing the point i would think it is actual a pretty common case to not have to require something that would not be displayed........ Of course I can adjust the required attribute's condition but i have lots of controls and things are already complex enough as it is.

It would be great to adjust the relevance on a group of bound controls and consequently ignore all the required/constraint on those hidden controls. I would think this would be a nice model level functionality. Thoughts? Any change to get the exf:relevant/exf:required functions work for me in this scenario ? Thanks

Nicolas
Reply | Threaded
Open this post in threaded view
|

RE: Ignore required or constraint if relevance="false()"

Steven Kerr
Nicolas

I am no expert.  But if the controls you are talking are at times "not
relevant" then shouldn't your schema reflect this by not enforcing
"required"?  You could also try using defaults, as these can be
specified in the schema.

Sorry if that's not very helpful.

Cheers

Steve

-----Original Message-----
From: npujol73 [mailto:[hidden email]]
Sent: Wednesday, 25 November 2009 16:39
To: [hidden email]
Subject: [ops-users] Ignore required or constraint if
relevance="false()"


Hi,

 Is there a way to do ignore "required" or "constraint" if
relevance="false()" on a bind ? Unless i am missing the point i would
think it is actual a pretty common case to not have to require something
that would not be displayed........ Of course I can adjust the required
attribute's condition but i have lots of controls and things are already
complex enough as it is.

It would be great to adjust the relevance on a group of bound controls
and consequently ignore all the required/constraint on those hidden
controls. I would think this would be a nice model level functionality.
Thoughts? Any change to get the exf:relevant/exf:required functions work
for me in this scenario ? Thanks

Nicolas
--
View this message in context:
http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp
787351p787351.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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: Ignore required or constraint if relevance="false()"

Alessandro  Vernet
Administrator
In reply to this post by npujol73
Nicolas,

I think the answer to your question is "no, sorry, but what Orbeon  
Forms does here is what the XForms spec says". But just to clarify:  
what observable results "ignoring" the constraint/type for non-
relevant nodes do? Is this about making sure the instance is still  
valid so you can submit it?

Alex

On Nov 25, 2009, at 1:38 PM, npujol73 <[hidden email]> wrote:

>
> Hi,
>
> Is there a way to do ignore "required" or "constraint" if
> relevance="false()" on a bind ? Unless i am missing the point i  
> would think
> it is actual a pretty common case to not have to require something  
> that
> would not be displayed........ Of course I can adjust the required
> attribute's condition but i have lots of controls and things are  
> already
> complex enough as it is.
>
> It would be great to adjust the relevance on a group of bound  
> controls and
> consequently ignore all the required/constraint on those hidden  
> controls. I
> would think this would be a nice model level functionality.  
> Thoughts? Any
> change to get the exf:relevant/exf:required functions work for me in  
> this
> scenario ? Thanks
>
> Nicolas
> --
> View this message in context: http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.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


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Ignore required or constraint if relevance="false()"

npujol73
No not really. Let me clarify with an example. Say you have an entire section which is conditional. Something like
"If you have green card". This new section may have 10-15 required/constraint fields asking information specific to green card holders, for example. However, there is obviously no need to require/validate those fields if that entire section was not selected or relevant in the first place. As a matter of fact, I would not even need them in the submission if that section was not relevant. Right now I have to have a "required" or "constraint" that looks like this

required="if($greenCard) then true() else false()"
constraint="if($greenCard) then $whatever-my-previous-condition-was else true()"

Come to think about it, I can probably work around it fairly easily for the "required" fields by finding an appropriate nodeset and applying required to it.

However for "constraint" that does not work. The constraint applies whether or not the node is required/relevant. I guess this is really the issue come to think about it.   So I have to modify all my constraints like shown above.


thanks

Alessandro Vernet-2 wrote
Nicolas,

I think the answer to your question is "no, sorry, but what Orbeon  
Forms does here is what the XForms spec says". But just to clarify:  
what observable results "ignoring" the constraint/type for non-
relevant nodes do? Is this about making sure the instance is still  
valid so you can submit it?

Alex

On Nov 25, 2009, at 1:38 PM, npujol73 <nicolaspujol73@gmail.com> wrote:

>
> Hi,
>
> Is there a way to do ignore "required" or "constraint" if
> relevance="false()" on a bind ? Unless i am missing the point i  
> would think
> it is actual a pretty common case to not have to require something  
> that
> would not be displayed........ Of course I can adjust the required
> attribute's condition but i have lots of controls and things are  
> already
> complex enough as it is.
>
> It would be great to adjust the relevance on a group of bound  
> controls and
> consequently ignore all the required/constraint on those hidden  
> controls. I
> would think this would be a nice model level functionality.  
> Thoughts? Any
> change to get the exf:relevant/exf:required functions work for me in  
> this
> scenario ? Thanks
>
> Nicolas
> --
> View this message in context: http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
> --
> 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


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

Re: Re: Ignore required or constraint if relevance="false()"

Erik Bruchez-3
Nicolas,

Just wondering if this is still a current issue.

-Erik

On Wed, Nov 25, 2009 at 12:38 PM, npujol73 <[hidden email]> wrote:

>
> No not really. Let me clarify with an example. Say you have an entire section
> which is conditional. Something like
> "If you have green card". This new section may have 10-15
> required/constraint fields asking information specific to green card
> holders, for example. However, there is obviously no need to
> require/validate those fields if that entire section was not selected or
> relevant in the first place. As a matter of fact, I would not even need them
> in the submission if that section was not relevant. Right now I have to have
> a "required" or "constraint" that looks like this
>
> required="if($greenCard) then true() else false()"
> constraint="if($greenCard) then $whatever-my-previous-condition-was else
> true()"
>
> Come to think about it, I can probably work around it fairly easily for the
> "required" fields by finding an appropriate nodeset and applying required to
> it.
>
> However for "constraint" that does not work. The constraint applies whether
> or not the node is required/relevant. I guess this is really the issue come
> to think about it.   So I have to modify all my constraints like shown
> above.
>
>
> thanks
>
>
> Alessandro Vernet-2 wrote:
>>
>> Nicolas,
>>
>> I think the answer to your question is "no, sorry, but what Orbeon
>> Forms does here is what the XForms spec says". But just to clarify:
>> what observable results "ignoring" the constraint/type for non-
>> relevant nodes do? Is this about making sure the instance is still
>> valid so you can submit it?
>>
>> Alex
>>
>> On Nov 25, 2009, at 1:38 PM, npujol73 <[hidden email]> wrote:
>>
>>>
>>> Hi,
>>>
>>> Is there a way to do ignore "required" or "constraint" if
>>> relevance="false()" on a bind ? Unless i am missing the point i
>>> would think
>>> it is actual a pretty common case to not have to require something
>>> that
>>> would not be displayed........ Of course I can adjust the required
>>> attribute's condition but i have lots of controls and things are
>>> already
>>> complex enough as it is.
>>>
>>> It would be great to adjust the relevance on a group of bound
>>> controls and
>>> consequently ignore all the required/constraint on those hidden
>>> controls. I
>>> would think this would be a nice model level functionality.
>>> Thoughts? Any
>>> change to get the exf:relevant/exf:required functions work for me in
>>> this
>>> scenario ? Thanks
>>>
>>> Nicolas
>>> --
>>> View this message in context:
>>> http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
>>> Sent from the ObjectWeb OPS - Users mailing list archive at
>>> Nabble.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
>>
>>
>> --
>> 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
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787779.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
>
>


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

Out of Office AutoReply: Ignore required or constraint if relevance="false()"

pappleby
Out of Office AutoReply: Ignore required or constraint if relevance="false()"

I am out of the office until 19th April

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG

 

Reply | Threaded
Open this post in threaded view
|

Re: Re: Ignore required or constraint if relevance="false()"

npujol73
In reply to this post by Erik Bruchez-3

It is though I believe you had pointed out that the issue was really with the Xforms spec. I am not sure what the rationale is in the spec but i do not see why something that is not relevant would be required. I am guessing I may not be interpreting what required/relevant fundamentally REALLY means. Can you shade some light ?

Nicolas


On Wed, Apr 14, 2010 at 1:43 PM, Erik Bruchez-3 [via Orbeon Forms (ops-users)] <[hidden email]> wrote:
Nicolas,

Just wondering if this is still a current issue.

-Erik

On Wed, Nov 25, 2009 at 12:38 PM, npujol73 <[hidden email]> wrote:

>
> No not really. Let me clarify with an example. Say you have an entire section
> which is conditional. Something like
> "If you have green card". This new section may have 10-15
> required/constraint fields asking information specific to green card
> holders, for example. However, there is obviously no need to
> require/validate those fields if that entire section was not selected or
> relevant in the first place. As a matter of fact, I would not even need them
> in the submission if that section was not relevant. Right now I have to have
> a "required" or "constraint" that looks like this
>
> required="if($greenCard) then true() else false()"
> constraint="if($greenCard) then $whatever-my-previous-condition-was else
> true()"
>
> Come to think about it, I can probably work around it fairly easily for the
> "required" fields by finding an appropriate nodeset and applying required to
> it.
>
> However for "constraint" that does not work. The constraint applies whether
> or not the node is required/relevant. I guess this is really the issue come
> to think about it.   So I have to modify all my constraints like shown
> above.
>
>
> thanks
>
>
> Alessandro Vernet-2 wrote:
>>
>> Nicolas,
>>
>> I think the answer to your question is "no, sorry, but what Orbeon
>> Forms does here is what the XForms spec says". But just to clarify:
>> what observable results "ignoring" the constraint/type for non-
>> relevant nodes do? Is this about making sure the instance is still
>> valid so you can submit it?
>>
>> Alex
>>
>> On Nov 25, 2009, at 1:38 PM, npujol73 <[hidden email]> wrote:

>>
>>>
>>> Hi,
>>>
>>> Is there a way to do ignore "required" or "constraint" if
>>> relevance="false()" on a bind ? Unless i am missing the point i
>>> would think
>>> it is actual a pretty common case to not have to require something
>>> that
>>> would not be displayed........ Of course I can adjust the required
>>> attribute's condition but i have lots of controls and things are
>>> already
>>> complex enough as it is.
>>>
>>> It would be great to adjust the relevance on a group of bound
>>> controls and
>>> consequently ignore all the required/constraint on those hidden
>>> controls. I
>>> would think this would be a nice model level functionality.
>>> Thoughts? Any
>>> change to get the exf:relevant/exf:required functions work for me in
>>> this
>>> scenario ? Thanks
>>>
>>> Nicolas
>>> --
>>> View this message in context:
>>> http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
>>> Sent from the ObjectWeb OPS - Users mailing list archive at
>>> Nabble.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
>>
>>
>> --
>> 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
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787779.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
>
>


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



View message @ http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p1840283.html
To unsubscribe from Re: Ignore required or constraint if relevance="false()", click here.


Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Ignore required or constraint if relevance="false()"

pappleby
Out of Office AutoReply: Ignore required or constraint if relevance="false()"

I am out of the office until 19th April

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG

 

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Ignore required or constraint if relevance="false()"

Erik Bruchez-3
In reply to this post by npujol73
NIcolas,

That's a really good question, in fact the XForms working group had
interesting discussions on this at the last face to face meeting.

The notion of "relevance" got introduced early in XForms, and the idea
of it, in my understanding, is to cover exactly your scenario of the
"green card" section: it's data that, depending on a condition, is
not, well, "relevant" in the form. That translates into user interface
aspects (e.g. form section not shown), and into data aspects (e.g.
non-relevant data is not submitted by default).

Now it is come to the group's attention that relevance has also been
used as a tool to control user interface visibility, and this is
causing some confusion. The implications of this, and possible
solutions, are still being discussed by the working group.

The notion of "required", on the other hand, is much clearer:

* in the UI, it means you can style the control to indicate that the
data is required
* in the data, a required-but-empty element or attribute is marked as invalid

Now, if data is both non-relevant AND required:

* associated UI controls won't be visible/accessible, so you won't see
them as required either
* the data will be pruned during submission, so it doesn't matter that
they are invalid

So your scenario should work just fine, unless I missed something!

I hope this helps,

-Erik

On Wed, Apr 14, 2010 at 12:22 PM, npujol73 <[hidden email]> wrote:

>
> It is though I believe you had pointed out that the issue was really with
> the Xforms spec. I am not sure what the rationale is in the spec but i do
> not see why something that is not relevant would be required. I am guessing
> I may not be interpreting what required/relevant fundamentally REALLY means.
> Can you shade some light ?
>
> Nicolas
>
>
> On Wed, Apr 14, 2010 at 1:43 PM, Erik Bruchez-3 [via Orbeon Forms
> (ops-users)] <[hidden email]> wrote:
>>
>> Nicolas,
>>
>> Just wondering if this is still a current issue.
>>
>> -Erik
>>
>> On Wed, Nov 25, 2009 at 12:38 PM, npujol73 <[hidden email]> wrote:
>> >
>> > No not really. Let me clarify with an example. Say you have an entire
>> > section
>> > which is conditional. Something like
>> > "If you have green card". This new section may have 10-15
>> > required/constraint fields asking information specific to green card
>> > holders, for example. However, there is obviously no need to
>> > require/validate those fields if that entire section was not selected or
>> > relevant in the first place. As a matter of fact, I would not even need
>> > them
>> > in the submission if that section was not relevant. Right now I have to
>> > have
>> > a "required" or "constraint" that looks like this
>> >
>> > required="if($greenCard) then true() else false()"
>> > constraint="if($greenCard) then $whatever-my-previous-condition-was else
>> > true()"
>> >
>> > Come to think about it, I can probably work around it fairly easily for
>> > the
>> > "required" fields by finding an appropriate nodeset and applying
>> > required to
>> > it.
>> >
>> > However for "constraint" that does not work. The constraint applies
>> > whether
>> > or not the node is required/relevant. I guess this is really the issue
>> > come
>> > to think about it.   So I have to modify all my constraints like shown
>> > above.
>> >
>> >
>> > thanks
>> >
>> >
>> > Alessandro Vernet-2 wrote:
>> >>
>> >> Nicolas,
>> >>
>> >> I think the answer to your question is "no, sorry, but what Orbeon
>> >> Forms does here is what the XForms spec says". But just to clarify:
>> >> what observable results "ignoring" the constraint/type for non-
>> >> relevant nodes do? Is this about making sure the instance is still
>> >> valid so you can submit it?
>> >>
>> >> Alex
>> >>
>> >> On Nov 25, 2009, at 1:38 PM, npujol73 <[hidden email]> wrote:
>> >>
>> >>>
>> >>> Hi,
>> >>>
>> >>> Is there a way to do ignore "required" or "constraint" if
>> >>> relevance="false()" on a bind ? Unless i am missing the point i
>> >>> would think
>> >>> it is actual a pretty common case to not have to require something
>> >>> that
>> >>> would not be displayed........ Of course I can adjust the required
>> >>> attribute's condition but i have lots of controls and things are
>> >>> already
>> >>> complex enough as it is.
>> >>>
>> >>> It would be great to adjust the relevance on a group of bound
>> >>> controls and
>> >>> consequently ignore all the required/constraint on those hidden
>> >>> controls. I
>> >>> would think this would be a nice model level functionality.
>> >>> Thoughts? Any
>> >>> change to get the exf:relevant/exf:required functions work for me in
>> >>> this
>> >>> scenario ? Thanks
>> >>>
>> >>> Nicolas
>> >>> --
>> >>> View this message in context:
>> >>>
>> >>> http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
>> >>> Sent from the ObjectWeb OPS - Users mailing list archive at
>> >>> Nabble.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
>> >>
>> >>
>> >> --
>> >> 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
>> >>
>> >>
>> >
>> > --
>> > View this message in context:
>> > http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787779.html
>> > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
>> >
>> >
>>
>> --
>> 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
>
>
> ________________________________
> View this message in context: Re: Re: Ignore required or constraint if
> relevance="false()"
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
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: Re: Re: Ignore required or constraint if relevance="false()"

Alessandro  Vernet
Administrator
Nicolas,

On Tue, Apr 20, 2010 at 3:45 PM, Erik Bruchez <[hidden email]> wrote:
> So your scenario should work just fine, unless I missed something!

Indeed, and you can see this in action in the following example:

http://gist.github.com/374081

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Ignore required or constraint if relevance="false()"

npujol73
In reply to this post by Erik Bruchez-3
The issue is that I am using the xforms-valid/xforms-invalid/xxforms-invalid/xxforms-valid events and those get triggered even when the nodes are not relevant.

On Tue, Apr 20, 2010 at 5:45 PM, Erik Bruchez <[hidden email]> wrote:
NIcolas,

That's a really good question, in fact the XForms working group had
interesting discussions on this at the last face to face meeting.

The notion of "relevance" got introduced early in XForms, and the idea
of it, in my understanding, is to cover exactly your scenario of the
"green card" section: it's data that, depending on a condition, is
not, well, "relevant" in the form. That translates into user interface
aspects (e.g. form section not shown), and into data aspects (e.g.
non-relevant data is not submitted by default).

Now it is come to the group's attention that relevance has also been
used as a tool to control user interface visibility, and this is
causing some confusion. The implications of this, and possible
solutions, are still being discussed by the working group.

The notion of "required", on the other hand, is much clearer:

* in the UI, it means you can style the control to indicate that the
data is required
* in the data, a required-but-empty element or attribute is marked as invalid

Now, if data is both non-relevant AND required:

* associated UI controls won't be visible/accessible, so you won't see
them as required either
* the data will be pruned during submission, so it doesn't matter that
they are invalid

So your scenario should work just fine, unless I missed something!

I hope this helps,

-Erik

On Wed, Apr 14, 2010 at 12:22 PM, npujol73 <[hidden email]> wrote:
>
> It is though I believe you had pointed out that the issue was really with
> the Xforms spec. I am not sure what the rationale is in the spec but i do
> not see why something that is not relevant would be required. I am guessing
> I may not be interpreting what required/relevant fundamentally REALLY means.
> Can you shade some light ?
>
> Nicolas
>
>
> On Wed, Apr 14, 2010 at 1:43 PM, Erik Bruchez-3 [via Orbeon Forms
> (ops-users)] <[hidden email]> wrote:
>>
>> Nicolas,
>>
>> Just wondering if this is still a current issue.
>>
>> -Erik
>>
>> On Wed, Nov 25, 2009 at 12:38 PM, npujol73 <[hidden email]> wrote:
>> >
>> > No not really. Let me clarify with an example. Say you have an entire
>> > section
>> > which is conditional. Something like
>> > "If you have green card". This new section may have 10-15
>> > required/constraint fields asking information specific to green card
>> > holders, for example. However, there is obviously no need to
>> > require/validate those fields if that entire section was not selected or
>> > relevant in the first place. As a matter of fact, I would not even need
>> > them
>> > in the submission if that section was not relevant. Right now I have to
>> > have
>> > a "required" or "constraint" that looks like this
>> >
>> > required="if($greenCard) then true() else false()"
>> > constraint="if($greenCard) then $whatever-my-previous-condition-was else
>> > true()"
>> >
>> > Come to think about it, I can probably work around it fairly easily for
>> > the
>> > "required" fields by finding an appropriate nodeset and applying
>> > required to
>> > it.
>> >
>> > However for "constraint" that does not work. The constraint applies
>> > whether
>> > or not the node is required/relevant. I guess this is really the issue
>> > come
>> > to think about it.   So I have to modify all my constraints like shown
>> > above.
>> >
>> >
>> > thanks
>> >
>> >
>> > Alessandro Vernet-2 wrote:
>> >>
>> >> Nicolas,
>> >>
>> >> I think the answer to your question is "no, sorry, but what Orbeon
>> >> Forms does here is what the XForms spec says". But just to clarify:
>> >> what observable results "ignoring" the constraint/type for non-
>> >> relevant nodes do? Is this about making sure the instance is still
>> >> valid so you can submit it?
>> >>
>> >> Alex
>> >>
>> >> On Nov 25, 2009, at 1:38 PM, npujol73 <[hidden email]> wrote:
>> >>
>> >>>
>> >>> Hi,
>> >>>
>> >>> Is there a way to do ignore "required" or "constraint" if
>> >>> relevance="false()" on a bind ? Unless i am missing the point i
>> >>> would think
>> >>> it is actual a pretty common case to not have to require something
>> >>> that
>> >>> would not be displayed........ Of course I can adjust the required
>> >>> attribute's condition but i have lots of controls and things are
>> >>> already
>> >>> complex enough as it is.
>> >>>
>> >>> It would be great to adjust the relevance on a group of bound
>> >>> controls and
>> >>> consequently ignore all the required/constraint on those hidden
>> >>> controls. I
>> >>> would think this would be a nice model level functionality.
>> >>> Thoughts? Any
>> >>> change to get the exf:relevant/exf:required functions work for me in
>> >>> this
>> >>> scenario ? Thanks
>> >>>
>> >>> Nicolas
>> >>> --
>> >>> View this message in context:
>> >>>
>> >>> http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
>> >>> Sent from the ObjectWeb OPS - Users mailing list archive at
>> >>> Nabble.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
>> >>
>> >>
>> >> --
>> >> 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
>> >>
>> >>
>> >
>> > --
>> > View this message in context:
>> > http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787779.html
>> > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
>> >
>> >
>>
>> --
>> 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
>
>
> ________________________________
> View this message in context: Re: Re: Ignore required or constraint if
> relevance="false()"
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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
>
>


--
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: Re: Re: Re: Ignore required or constraint if relevance="false()"

Erik Bruchez-3
Nicolas,

I can understand for xxforms-invalid/xxforms-valid. But are you sure
about xforms-invalid/xforms-valid?

The former as dispatched to instances, and currently the code does not
check for relevance at all when dispatching those events.

The latter are dispatched to controls, and if the controls are not
relevant they should be not dispatched.

-Erik

On Wed, Apr 21, 2010 at 10:08 AM, Nicolas Pujol
<[hidden email]> wrote:

> The issue is that I am using the
> xforms-valid/xforms-invalid/xxforms-invalid/xxforms-valid events and those
> get triggered even when the nodes are not relevant.
>
> On Tue, Apr 20, 2010 at 5:45 PM, Erik Bruchez <[hidden email]> wrote:
>>
>> NIcolas,
>>
>> That's a really good question, in fact the XForms working group had
>> interesting discussions on this at the last face to face meeting.
>>
>> The notion of "relevance" got introduced early in XForms, and the idea
>> of it, in my understanding, is to cover exactly your scenario of the
>> "green card" section: it's data that, depending on a condition, is
>> not, well, "relevant" in the form. That translates into user interface
>> aspects (e.g. form section not shown), and into data aspects (e.g.
>> non-relevant data is not submitted by default).
>>
>> Now it is come to the group's attention that relevance has also been
>> used as a tool to control user interface visibility, and this is
>> causing some confusion. The implications of this, and possible
>> solutions, are still being discussed by the working group.
>>
>> The notion of "required", on the other hand, is much clearer:
>>
>> * in the UI, it means you can style the control to indicate that the
>> data is required
>> * in the data, a required-but-empty element or attribute is marked as
>> invalid
>>
>> Now, if data is both non-relevant AND required:
>>
>> * associated UI controls won't be visible/accessible, so you won't see
>> them as required either
>> * the data will be pruned during submission, so it doesn't matter that
>> they are invalid
>>
>> So your scenario should work just fine, unless I missed something!
>>
>> I hope this helps,
>>
>> -Erik
>>
>> On Wed, Apr 14, 2010 at 12:22 PM, npujol73 <[hidden email]>
>> wrote:
>> >
>> > It is though I believe you had pointed out that the issue was really
>> > with
>> > the Xforms spec. I am not sure what the rationale is in the spec but i
>> > do
>> > not see why something that is not relevant would be required. I am
>> > guessing
>> > I may not be interpreting what required/relevant fundamentally REALLY
>> > means.
>> > Can you shade some light ?
>> >
>> > Nicolas
>> >
>> >
>> > On Wed, Apr 14, 2010 at 1:43 PM, Erik Bruchez-3 [via Orbeon Forms
>> > (ops-users)] <[hidden email]> wrote:
>> >>
>> >> Nicolas,
>> >>
>> >> Just wondering if this is still a current issue.
>> >>
>> >> -Erik
>> >>
>> >> On Wed, Nov 25, 2009 at 12:38 PM, npujol73 <[hidden email]> wrote:
>> >> >
>> >> > No not really. Let me clarify with an example. Say you have an entire
>> >> > section
>> >> > which is conditional. Something like
>> >> > "If you have green card". This new section may have 10-15
>> >> > required/constraint fields asking information specific to green card
>> >> > holders, for example. However, there is obviously no need to
>> >> > require/validate those fields if that entire section was not selected
>> >> > or
>> >> > relevant in the first place. As a matter of fact, I would not even
>> >> > need
>> >> > them
>> >> > in the submission if that section was not relevant. Right now I have
>> >> > to
>> >> > have
>> >> > a "required" or "constraint" that looks like this
>> >> >
>> >> > required="if($greenCard) then true() else false()"
>> >> > constraint="if($greenCard) then $whatever-my-previous-condition-was
>> >> > else
>> >> > true()"
>> >> >
>> >> > Come to think about it, I can probably work around it fairly easily
>> >> > for
>> >> > the
>> >> > "required" fields by finding an appropriate nodeset and applying
>> >> > required to
>> >> > it.
>> >> >
>> >> > However for "constraint" that does not work. The constraint applies
>> >> > whether
>> >> > or not the node is required/relevant. I guess this is really the
>> >> > issue
>> >> > come
>> >> > to think about it.   So I have to modify all my constraints like
>> >> > shown
>> >> > above.
>> >> >
>> >> >
>> >> > thanks
>> >> >
>> >> >
>> >> > Alessandro Vernet-2 wrote:
>> >> >>
>> >> >> Nicolas,
>> >> >>
>> >> >> I think the answer to your question is "no, sorry, but what Orbeon
>> >> >> Forms does here is what the XForms spec says". But just to clarify:
>> >> >> what observable results "ignoring" the constraint/type for non-
>> >> >> relevant nodes do? Is this about making sure the instance is still
>> >> >> valid so you can submit it?
>> >> >>
>> >> >> Alex
>> >> >>
>> >> >> On Nov 25, 2009, at 1:38 PM, npujol73 <[hidden email]> wrote:
>> >> >>
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> Is there a way to do ignore "required" or "constraint" if
>> >> >>> relevance="false()" on a bind ? Unless i am missing the point i
>> >> >>> would think
>> >> >>> it is actual a pretty common case to not have to require something
>> >> >>> that
>> >> >>> would not be displayed........ Of course I can adjust the required
>> >> >>> attribute's condition but i have lots of controls and things are
>> >> >>> already
>> >> >>> complex enough as it is.
>> >> >>>
>> >> >>> It would be great to adjust the relevance on a group of bound
>> >> >>> controls and
>> >> >>> consequently ignore all the required/constraint on those hidden
>> >> >>> controls. I
>> >> >>> would think this would be a nice model level functionality.
>> >> >>> Thoughts? Any
>> >> >>> change to get the exf:relevant/exf:required functions work for me
>> >> >>> in
>> >> >>> this
>> >> >>> scenario ? Thanks
>> >> >>>
>> >> >>> Nicolas
>> >> >>> --
>> >> >>> View this message in context:
>> >> >>>
>> >> >>>
>> >> >>> http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787351.html
>> >> >>> Sent from the ObjectWeb OPS - Users mailing list archive at
>> >> >>> Nabble.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
>> >> >>
>> >> >>
>> >> >> --
>> >> >> 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
>> >> >>
>> >> >>
>> >> >
>> >> > --
>> >> > View this message in context:
>> >> >
>> >> > http://n4.nabble.com/Ignore-required-or-constraint-if-relevance-false-tp787351p787779.html
>> >> > Sent from the ObjectWeb OPS - Users mailing list archive at
>> >> > Nabble.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
>> >> >
>> >> >
>> >>
>> >> --
>> >> 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
>> >
>> >
>> > ________________________________
>> > View this message in context: Re: Re: Ignore required or constraint if
>> > relevance="false()"
>> > Sent from the Orbeon Forms (ops-users) mailing list archive at
>> > Nabble.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
>> >
>> >
>>
>>
>> --
>> 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
>
>


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