DMV Forms Example

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

RE: Checkbox problem/node splitting

Richard Braman
Same thing happens with select1 and it is a radio instead of checkbox.

-----Original Message-----
From: Ryan Puddephatt [mailto:[hidden email]]
Sent: Tuesday, February 14, 2006 6:03 PM
To: [hidden email]
Subject: RE: [ops-users] Checkbox problem/node splitting


Richard,
        Use select1 instead of select

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Richard Braman [mailto:[hidden email]]
>Sent: 14 February 2006 20:05
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>Erik,
>
>Both of the selects I have use bind instead of ref.  Also select1  
>seems to produce a radio button instead of a checkbox. I tried this
>code instead:
> <xforms:select appearance="full" bind="c1-1" >
>   <xforms:setvalue
>ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
value="''"/>
> <xforms:label/>
> <xforms:item>
> <xforms:name/>
> <xforms:value>X</xforms:value>
> </xforms:item>
> </xforms:select>
> <xforms:select appearance="full" bind="c1-2" >
> <xforms:setvalue ev:event="xforms-value-changed"

>ref="/form/f1040ez/SEQ0100" value="''"/>
> <xforms:label/>
> <xforms:item>
> <xforms:name/>
> <xforms:value>X</xforms:value>
> </xforms:item>
> </xforms:select>
>
>Which is close, but when you check one (while the other one is already
>checked) it unchecks the other checkbox and itself.  The same thing
>happens if I do select1 (but with radio button instead of checkboxes).
>I think it must have something to do with binding.
>
>See the presidential election campaign fund checkboxes on the form:
>http://24.75.221.234:8080/taxcode/1040ez
>
>
>
>-----Original Message-----
>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>Bruchez
>Sent: Tuesday, February 14, 2006 2:12 PM
>To: [hidden email]
>Subject: Re: [ops-users] Checkbox problem/node splitting
>
>
>Something like this should do:
>
><xforms:select1 ref="/path/to/my-node-1" ...>
>   <xforms:setvalue ev:event="xforms-value-changed"
>                    ref="/path/to/my-node-2"
>                    value="''"/>
>
></xforms:select1>
>
><xforms:select1 ref="/path/to/my-node-2" ...>
>   <xforms:setvalue ev:event="xforms-value-changed"
>                    ref="/path/to/my-node-1"
>                    value="''"/>
>
></xforms:select1>
>
>I.e. each time you change the value of one of the checkboxes, that
>clears the other one.
>
>-Erik
>
>Richard Braman wrote:
>> They could both be unchecked yes.
>>
>> -----Original Message-----
>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>> Bruchez
>> Sent: Monday, February 13, 2006 7:37 PM
>> To: [hidden email]
>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>
>>
>> So, two checkboxes, each bound to a different node, and exclusive.
>> Can they both be unchecked?
>>
>> -Erik
>>
>> Richard Braman wrote:
>>> ON that last question, assume the controls are bound to 2 separate
>>> nodes.
>>>
>>> -----Original Message-----
>>> From: Richard Braman [mailto:[hidden email]]
>>> Sent: Monday, February 13, 2006 6:51 PM
>>> To: [hidden email]
>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> Erik,  That worked, but suppose there are two checkboxes and the
>>> checkboes must be mutually exclusive, so that if one is checked then

>>> the other cannot be.  How does that change the syntax?
>>>
>>> -----Original Message-----
>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>> Bruchez
>>> Sent: Monday, February 13, 2006 9:35 AM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> Richard Braman wrote:
>>>> OK, suppose I have a node in my instance
>>>> <boolean_node> which can have either the value 'X' or be empty If
>>>> it is X I want my checkbox to be checked if it is empty I want
>>>> nothing. The checkbox doesn't have any label or anything else, it
>>>> is either checked or unchecked.
>>>>
>>>> This is my first crack , but I know I am missing something
>>>>
>>>> <xforms:model>
>>>> <xforms:instance>
>>>> <form>
>>>> <SEQ0010>X</SEQ0010>
>>>> </form>
>>>> </xforms:instance>
>>>>
>>>>
>>>> </xforms:model>
>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>> bind="ck-1">
>>>> <items>
>>>>       <true value="X"/>
>>>> <false value=""/>
>>>> </items>
>>>> </xforms:select>
>>> Try:
>>>
>>> <xforms:select bind="ck-1" appearance="full">
>>>    <xforms:label/>
>>>    <xforms:item>
>>>      <xforms:name/>
>>>      <xforms:value>X</xforms:value>
>>>    </xforms:item>
>>> </xforms:select>
>>>
>>> -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: Checkbox problem/node splitting

Ryan Puddephatt
It seems the xforms-value-change event is running when you change the value,
e.g. you tick one which runs the event to untick the other. When this is
done, it runs the event to untick the other.

Try putting the set-values as

<xforms:set-value ref="/path/to/node1" value="if(/path/to/node2 = '') then
/path/to/node1 else ''"/>

I think this should work

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Richard Braman [mailto:[hidden email]]
>Sent: 14 February 2006 22:56
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>Same thing happens with select1 and it is a radio instead of checkbox.
>
>-----Original Message-----
>From: Ryan Puddephatt [mailto:[hidden email]]
>Sent: Tuesday, February 14, 2006 6:03 PM
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>
>Richard,
> Use select1 instead of select
>
>Ryan Puddephatt
>Software Engineer
>TFX Group - IT UK
>1 Michaelson Square
>Livingston
>West Lothian
>Scotand
>EH54 7DP
>
>* [hidden email]
>( 01506 407 110
>7  01506 407 108
>
>>-----Original Message-----
>>From: Richard Braman [mailto:[hidden email]]
>>Sent: 14 February 2006 20:05
>>To: [hidden email]
>>Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>Erik,
>>
>>Both of the selects I have use bind instead of ref.  Also select1
>>seems to produce a radio button instead of a checkbox. I tried this
>>code instead:
>> <xforms:select appearance="full" bind="c1-1" >
>>   <xforms:setvalue
>>ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
>value="''"/>
>> <xforms:label/>
>> <xforms:item>
>> <xforms:name/>
>> <xforms:value>X</xforms:value>
>> </xforms:item>
>> </xforms:select>
>> <xforms:select appearance="full" bind="c1-2" >
>> <xforms:setvalue ev:event="xforms-value-changed"
>
>>ref="/form/f1040ez/SEQ0100" value="''"/>
>> <xforms:label/>
>> <xforms:item>
>> <xforms:name/>
>> <xforms:value>X</xforms:value>
>> </xforms:item>
>> </xforms:select>
>>
>>Which is close, but when you check one (while the other one is already
>>checked) it unchecks the other checkbox and itself.  The same thing
>>happens if I do select1 (but with radio button instead of checkboxes).
>>I think it must have something to do with binding.
>>
>>See the presidential election campaign fund checkboxes on the form:
>>http://24.75.221.234:8080/taxcode/1040ez
>>
>>
>>
>>-----Original Message-----
>>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>Bruchez
>>Sent: Tuesday, February 14, 2006 2:12 PM
>>To: [hidden email]
>>Subject: Re: [ops-users] Checkbox problem/node splitting
>>
>>
>>Something like this should do:
>>
>><xforms:select1 ref="/path/to/my-node-1" ...>
>>   <xforms:setvalue ev:event="xforms-value-changed"
>>                    ref="/path/to/my-node-2"
>>                    value="''"/>
>>
>></xforms:select1>
>>
>><xforms:select1 ref="/path/to/my-node-2" ...>
>>   <xforms:setvalue ev:event="xforms-value-changed"
>>                    ref="/path/to/my-node-1"
>>                    value="''"/>
>>
>></xforms:select1>
>>
>>I.e. each time you change the value of one of the checkboxes, that
>>clears the other one.
>>
>>-Erik
>>
>>Richard Braman wrote:
>>> They could both be unchecked yes.
>>>
>>> -----Original Message-----
>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>> Bruchez
>>> Sent: Monday, February 13, 2006 7:37 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> So, two checkboxes, each bound to a different node, and exclusive.
>>> Can they both be unchecked?
>>>
>>> -Erik
>>>
>>> Richard Braman wrote:
>>>> ON that last question, assume the controls are bound to 2 separate
>>>> nodes.
>>>>
>>>> -----Original Message-----
>>>> From: Richard Braman [mailto:[hidden email]]
>>>> Sent: Monday, February 13, 2006 6:51 PM
>>>> To: [hidden email]
>>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> Erik,  That worked, but suppose there are two checkboxes and the
>>>> checkboes must be mutually exclusive, so that if one is checked then
>
>>>> the other cannot be.  How does that change the syntax?
>>>>
>>>> -----Original Message-----
>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>> Bruchez
>>>> Sent: Monday, February 13, 2006 9:35 AM
>>>> To: [hidden email]
>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> Richard Braman wrote:
>>>>> OK, suppose I have a node in my instance
>>>>> <boolean_node> which can have either the value 'X' or be empty If
>>>>> it is X I want my checkbox to be checked if it is empty I want
>>>>> nothing. The checkbox doesn't have any label or anything else, it
>>>>> is either checked or unchecked.
>>>>>
>>>>> This is my first crack , but I know I am missing something
>>>>>
>>>>> <xforms:model>
>>>>> <xforms:instance>
>>>>> <form>
>>>>> <SEQ0010>X</SEQ0010>
>>>>> </form>
>>>>> </xforms:instance>
>>>>>
>>>>>
>>>>> </xforms:model>
>>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>>> bind="ck-1">
>>>>> <items>
>>>>>       <true value="X"/>
>>>>> <false value=""/>
>>>>> </items>
>>>>> </xforms:select>
>>>> Try:
>>>>
>>>> <xforms:select bind="ck-1" appearance="full">
>>>>    <xforms:label/>
>>>>    <xforms:item>
>>>>      <xforms:name/>
>>>>      <xforms:value>X</xforms:value>
>>>>    </xforms:item>
>>>> </xforms:select>
>>>>
>>>> -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: Checkbox problem/node splitting

Erik Bruchez
Administrator
Absolutely right, we came up with the same solution. The attached works
in the sandbox.

-Erik

Ryan Puddephatt wrote:

> It seems the xforms-value-change event is running when you change the value,
> e.g. you tick one which runs the event to untick the other. When this is
> done, it runs the event to untick the other.
>
> Try putting the set-values as
>
> <xforms:set-value ref="/path/to/node1" value="if(/path/to/node2 = '') then
> /path/to/node1 else ''"/>
>
> I think this should work
>
> Ryan Puddephatt
> Software Engineer
> TFX Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>  
>> -----Original Message-----
>> From: Richard Braman [mailto:[hidden email]]
>> Sent: 14 February 2006 22:56
>> To: [hidden email]
>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>> Same thing happens with select1 and it is a radio instead of checkbox.
>>
>> -----Original Message-----
>> From: Ryan Puddephatt [mailto:[hidden email]]
>> Sent: Tuesday, February 14, 2006 6:03 PM
>> To: [hidden email]
>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>
>> Richard,
>> Use select1 instead of select
>>
>> Ryan Puddephatt
>> Software Engineer
>> TFX Group - IT UK
>> 1 Michaelson Square
>> Livingston
>> West Lothian
>> Scotand
>> EH54 7DP
>>
>> * [hidden email]
>> ( 01506 407 110
>> 7  01506 407 108
>>
>>> -----Original Message-----
>>> From: Richard Braman [mailto:[hidden email]]
>>> Sent: 14 February 2006 20:05
>>> To: [hidden email]
>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>
>>> Erik,
>>>
>>> Both of the selects I have use bind instead of ref.  Also select1
>>> seems to produce a radio button instead of a checkbox. I tried this
>>> code instead:
>>> <xforms:select appearance="full" bind="c1-1" >
>>>   <xforms:setvalue
>>> ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
>> value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>> <xforms:select appearance="full" bind="c1-2" >
>>> <xforms:setvalue ev:event="xforms-value-changed"
>>> ref="/form/f1040ez/SEQ0100" value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>>
>>> Which is close, but when you check one (while the other one is already
>>> checked) it unchecks the other checkbox and itself.  The same thing
>>> happens if I do select1 (but with radio button instead of checkboxes).
>>> I think it must have something to do with binding.
>>>
>>> See the presidential election campaign fund checkboxes on the form:
>>> http://24.75.221.234:8080/taxcode/1040ez
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>> Bruchez
>>> Sent: Tuesday, February 14, 2006 2:12 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> Something like this should do:
>>>
>>> <xforms:select1 ref="/path/to/my-node-1" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-2"
>>>                    value="''"/>
>>>
>>> </xforms:select1>
>>>
>>> <xforms:select1 ref="/path/to/my-node-2" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-1"
>>>                    value="''"/>
>>>
>>> </xforms:select1>
>>>
>>> I.e. each time you change the value of one of the checkboxes, that
>>> clears the other one.
>>>
>>> -Erik
>>>
>>> Richard Braman wrote:
>>>> They could both be unchecked yes.
>>>>
>>>> -----Original Message-----
>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>> Bruchez
>>>> Sent: Monday, February 13, 2006 7:37 PM
>>>> To: [hidden email]
>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> So, two checkboxes, each bound to a different node, and exclusive.
>>>> Can they both be unchecked?
>>>>
>>>> -Erik
>>>>
>>>> Richard Braman wrote:
>>>>> ON that last question, assume the controls are bound to 2 separate
>>>>> nodes.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Richard Braman [mailto:[hidden email]]
>>>>> Sent: Monday, February 13, 2006 6:51 PM
>>>>> To: [hidden email]
>>>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Erik,  That worked, but suppose there are two checkboxes and the
>>>>> checkboes must be mutually exclusive, so that if one is checked then
>>>>> the other cannot be.  How does that change the syntax?
>>>>>
>>>>> -----Original Message-----
>>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>>> Bruchez
>>>>> Sent: Monday, February 13, 2006 9:35 AM
>>>>> To: [hidden email]
>>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Richard Braman wrote:
>>>>>> OK, suppose I have a node in my instance
>>>>>> <boolean_node> which can have either the value 'X' or be empty If
>>>>>> it is X I want my checkbox to be checked if it is empty I want
>>>>>> nothing. The checkbox doesn't have any label or anything else, it
>>>>>> is either checked or unchecked.
>>>>>>
>>>>>> This is my first crack , but I know I am missing something
>>>>>>
>>>>>> <xforms:model>
>>>>>> <xforms:instance>
>>>>>> <form>
>>>>>> <SEQ0010>X</SEQ0010>
>>>>>> </form>
>>>>>> </xforms:instance>
>>>>>>
>>>>>>
>>>>>> </xforms:model>
>>>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>>>> bind="ck-1">
>>>>>> <items>
>>>>>>       <true value="X"/>
>>>>>> <false value=""/>
>>>>>> </items>
>>>>>> </xforms:select>
>>>>> Try:
>>>>>
>>>>> <xforms:select bind="ck-1" appearance="full">
>>>>>    <xforms:label/>
>>>>>    <xforms:item>
>>>>>      <xforms:name/>
>>>>>      <xforms:value>X</xforms:value>
>>>>>    </xforms:item>
>>>>> </xforms:select>
>>>>>
>>>>> -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

exclusive-checkboxes.xhtml (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Does Xforms bind foce ajax

Adrian Baker-2
In reply to this post by Alessandro Vernet
Couple of questions on this

1. When/why would a input field change from an input field to a date
picker *at runtime*?
2. <textarea> elements are not wrapped: is this perhaps a little
inconsistent?

Alessandro Vernet wrote:

> Hi Richard,
>
> Since there is not a one to one mapping between XForms controls and
> HTML elements, XForms control are often rendered by putting together a
> number of HTML elements. This is the case for <xforms:input>, which
> appearance can change as runtime from an input field to a date picker,
> and vice versa. For instance, an <xforms:input> input is rendered as a
> span that contains an input form element, a span that contains the
> date selected with the date picker, and a span that contains an image
> you can click on to show the date picker. If in the XForms code we
> find a class or style attribute, on which one of those HTML elements
> should this attribute be copied? The answer is always going to be
> arbitrary because we don't know what you are trying to style. Should
> it be on the input form element, the image? We chose to consistently
> copy the style and class attributes on the container, in this case the
> span element.
>
> What about using a class on the input? E.g. <xforms:input
> class="large-input">. Then in CSS you do:
>
> .large-input input { my CSS that applies to the HTML input form element }
>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Does Xforms bind foce ajax

Erik Bruchez
Administrator
Adrian Baker wrote:
> Couple of questions on this
>
> 1. When/why would a input field change from an input field to a date
> picker *at runtime*?

If you display the date picker for xforms:input based on the type bound
to it, then that type may change at runtime. Just imagine a bind of the
form:

<xforms:bind nodeset="my-input[position() = /form/position]"
              type="xs:dateTime"/>

And in instance of the form:

<form>
   <my-input/>
   <my-input/>
   <my-input/>
   <position>1</position>
</form>

Now if the content of <position> changes from 1 to 2, the type of the
first <my-input> element changes from xs:dateTime to no type bound
(xs:string), and the second one changes from no type bound to xs:dateTime.

> 2. <textarea> elements are not wrapped: is this perhaps a little
> inconsistent?

Right, that probably should be changed. But so far, <textarea> is always
displayed the same way so this has not been a requirement.

-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: Checkbox problem/node splitting

Richard Braman
In reply to this post by Ryan Puddephatt
I am afraid this is not working for me.  Are you saying to put the
set-value statement on both select controls?  Or the converse statement
on the second control?  Or just on the fist control?   None of seem to
be working for me.  

-----Original Message-----
From: Ryan Puddephatt [mailto:[hidden email]]
Sent: Tuesday, February 14, 2006 6:26 PM
To: [hidden email]
Subject: RE: [ops-users] Checkbox problem/node splitting


It seems the xforms-value-change event is running when you change the
value, e.g. you tick one which runs the event to untick the other. When
this is done, it runs the event to untick the other.

Try putting the set-values as

<xforms:set-value ref="/path/to/node1" value="if(/path/to/node2 = '')
then /path/to/node1 else ''"/>

I think this should work

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Richard Braman [mailto:[hidden email]]
>Sent: 14 February 2006 22:56
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>Same thing happens with select1 and it is a radio instead of checkbox.
>
>-----Original Message-----
>From: Ryan Puddephatt [mailto:[hidden email]]
>Sent: Tuesday, February 14, 2006 6:03 PM
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>
>Richard,
> Use select1 instead of select
>
>Ryan Puddephatt
>Software Engineer
>TFX Group - IT UK
>1 Michaelson Square
>Livingston
>West Lothian
>Scotand
>EH54 7DP
>
>* [hidden email]
>( 01506 407 110
>7  01506 407 108
>
>>-----Original Message-----
>>From: Richard Braman [mailto:[hidden email]]
>>Sent: 14 February 2006 20:05
>>To: [hidden email]
>>Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>Erik,
>>
>>Both of the selects I have use bind instead of ref.  Also select1
>>seems to produce a radio button instead of a checkbox. I tried this
>>code instead:
>> <xforms:select appearance="full" bind="c1-1" >
>>   <xforms:setvalue
>>ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
>value="''"/>
>> <xforms:label/>
>> <xforms:item>
>> <xforms:name/>
>> <xforms:value>X</xforms:value>
>> </xforms:item>
>> </xforms:select>
>> <xforms:select appearance="full" bind="c1-2" >
>> <xforms:setvalue ev:event="xforms-value-changed"
>
>>ref="/form/f1040ez/SEQ0100" value="''"/>
>> <xforms:label/>
>> <xforms:item>
>> <xforms:name/>
>> <xforms:value>X</xforms:value>
>> </xforms:item>
>> </xforms:select>
>>
>>Which is close, but when you check one (while the other one is already
>>checked) it unchecks the other checkbox and itself.  The same thing
>>happens if I do select1 (but with radio button instead of checkboxes).

>>I think it must have something to do with binding.
>>
>>See the presidential election campaign fund checkboxes on the form:
>>http://24.75.221.234:8080/taxcode/1040ez
>>
>>
>>
>>-----Original Message-----
>>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>Bruchez
>>Sent: Tuesday, February 14, 2006 2:12 PM
>>To: [hidden email]
>>Subject: Re: [ops-users] Checkbox problem/node splitting
>>
>>
>>Something like this should do:
>>
>><xforms:select1 ref="/path/to/my-node-1" ...>
>>   <xforms:setvalue ev:event="xforms-value-changed"
>>                    ref="/path/to/my-node-2"
>>                    value="''"/>
>>
>></xforms:select1>
>>
>><xforms:select1 ref="/path/to/my-node-2" ...>
>>   <xforms:setvalue ev:event="xforms-value-changed"
>>                    ref="/path/to/my-node-1"
>>                    value="''"/>
>>
>></xforms:select1>
>>
>>I.e. each time you change the value of one of the checkboxes, that
>>clears the other one.
>>
>>-Erik
>>
>>Richard Braman wrote:
>>> They could both be unchecked yes.
>>>
>>> -----Original Message-----
>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>> Bruchez
>>> Sent: Monday, February 13, 2006 7:37 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> So, two checkboxes, each bound to a different node, and exclusive.
>>> Can they both be unchecked?
>>>
>>> -Erik
>>>
>>> Richard Braman wrote:
>>>> ON that last question, assume the controls are bound to 2 separate
>>>> nodes.
>>>>
>>>> -----Original Message-----
>>>> From: Richard Braman [mailto:[hidden email]]
>>>> Sent: Monday, February 13, 2006 6:51 PM
>>>> To: [hidden email]
>>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> Erik,  That worked, but suppose there are two checkboxes and the
>>>> checkboes must be mutually exclusive, so that if one is checked
>>>> then
>
>>>> the other cannot be.  How does that change the syntax?
>>>>
>>>> -----Original Message-----
>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>> Bruchez
>>>> Sent: Monday, February 13, 2006 9:35 AM
>>>> To: [hidden email]
>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> Richard Braman wrote:
>>>>> OK, suppose I have a node in my instance
>>>>> <boolean_node> which can have either the value 'X' or be empty If
>>>>> it is X I want my checkbox to be checked if it is empty I want
>>>>> nothing. The checkbox doesn't have any label or anything else, it
>>>>> is either checked or unchecked.
>>>>>
>>>>> This is my first crack , but I know I am missing something
>>>>>
>>>>> <xforms:model>
>>>>> <xforms:instance>
>>>>> <form>
>>>>> <SEQ0010>X</SEQ0010>
>>>>> </form>
>>>>> </xforms:instance>
>>>>>
>>>>>
>>>>> </xforms:model>
>>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>>> bind="ck-1">
>>>>> <items>
>>>>>       <true value="X"/>
>>>>> <false value=""/>
>>>>> </items>
>>>>> </xforms:select>
>>>> Try:
>>>>
>>>> <xforms:select bind="ck-1" appearance="full">
>>>>    <xforms:label/>
>>>>    <xforms:item>
>>>>      <xforms:name/>
>>>>      <xforms:value>X</xforms:value>
>>>>    </xforms:item>
>>>> </xforms:select>
>>>>
>>>> -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: Does Xforms bind foce ajax

Adrian Baker-2
In reply to this post by Erik Bruchez
Erik Bruchez wrote:

> Adrian Baker wrote:
>> Couple of questions on this
>>
>> 1. When/why would a input field change from an input field to a date
>> picker *at runtime*?
>
> If you display the date picker for xforms:input based on the type
> bound to it, then that type may change at runtime. Just imagine a bind
> of the form:
>
> <xforms:bind nodeset="my-input[position() = /form/position]"
>              type="xs:dateTime"/>
Ah I see, tricky. Does that not quality as a dynamic dependency though?
(http://www.w3.org/TR/2005/PER-xforms-20051006/slice7.html#expr-dynamic-dependency)


Admittedly re-reading that section I find it a little hard to understand
precisely what predicates are allowed and what aren't, but doesn't the
/form/position reference fail this test:
    "...a value that will not change between operations explicitly
defined as rebuilding computational dependencies"

Hmm.. this also has the unfortunate consequence that you have to render
all the possible extra html widgets you might develop for different
datatypes.

>
> And in instance of the form:
>
> <form>
>   <my-input/>
>   <my-input/>
>   <my-input/>
>   <position>1</position>
> </form>
>
> Now if the content of <position> changes from 1 to 2, the type of the
> first <my-input> element changes from xs:dateTime to no type bound
> (xs:string), and the second one changes from no type bound to
> xs:dateTime.
>
>> 2. <textarea> elements are not wrapped: is this perhaps a little
>> inconsistent?
>
> Right, that probably should be changed. But so far, <textarea> is
> always displayed the same way so this has not been a requirement.
>
> -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: Does Xforms bind foce ajax

Erik Bruchez
Administrator
Interesting point. In OPS, we do not check binding expressions for that
kind of restriction. But I am not 100% clear on what this actually
means, as the spec says later:

"Dynamic dependencies in model binding expressions will generally
require manual rebuilding of dependencies."

and:

"Dynamic dependences are allowed in UI binding expressions based on the
conformance profile."

So it looks like dynamic dependencies are not prohibited, just that they
may have some particular consequences.

There are other restrictions in XForms, such as the homogeneous node-set
concept, which in our opinion really should not be there. I am not sure
why the "dynamic dependencies" restriction is in place, but it may be
another thing to revise in the future.

-Erik

Adrian Baker wrote:

> Erik Bruchez wrote:
>> Adrian Baker wrote:
>>> Couple of questions on this
>>>
>>> 1. When/why would a input field change from an input field to a date
>>> picker *at runtime*?
>>
>> If you display the date picker for xforms:input based on the type
>> bound to it, then that type may change at runtime. Just imagine a bind
>> of the form:
>>
>> <xforms:bind nodeset="my-input[position() = /form/position]"
>>              type="xs:dateTime"/>
>
> Ah I see, tricky. Does that not quality as a dynamic dependency though?
> (http://www.w3.org/TR/2005/PER-xforms-20051006/slice7.html#expr-dynamic-dependency)
>
>
> Admittedly re-reading that section I find it a little hard to understand
> precisely what predicates are allowed and what aren't, but doesn't the
> /form/position reference fail this test:
>    "...a value that will not change between operations explicitly
> defined as rebuilding computational dependencies"
>
> Hmm.. this also has the unfortunate consequence that you have to render
> all the possible extra html widgets you might develop for different
> datatypes.
>
>>
>> And in instance of the form:
>>
>> <form>
>>   <my-input/>
>>   <my-input/>
>>   <my-input/>
>>   <position>1</position>
>> </form>
>>
>> Now if the content of <position> changes from 1 to 2, the type of the
>> first <my-input> element changes from xs:dateTime to no type bound
>> (xs:string), and the second one changes from no type bound to
>> xs:dateTime.
>>
>>> 2. <textarea> elements are not wrapped: is this perhaps a little
>>> inconsistent?
>>
>> Right, that probably should be changed. But so far, <textarea> is
>> always displayed the same way so this has not been a requirement.
>>
>> -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



--
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: Does Xforms bind foce ajax

Adrian Baker-2
In reply to this post by Erik Bruchez
Erik Bruchez wrote:
> Adrian Baker wrote:
>
>> 2. <textarea> elements are not wrapped: is this perhaps a little
>> inconsistent?
>
> Right, that probably should be changed. But so far, <textarea> is
> always displayed the same way so this has not been a requirement.
>
> -Erik

Ok - I don't know how complex this change would be, but from an end-user
point of view it would make the CSS more consistent.



--
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: Checkbox problem/node splitting

Ryan Puddephatt
In reply to this post by Richard Braman
You need to put the set value in both select items. But obviously reverse it
on the second one!

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: Richard Braman [mailto:[hidden email]]
>Sent: 15 February 2006 00:40
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>I am afraid this is not working for me.  Are you saying to put the
>set-value statement on both select controls?  Or the converse statement
>on the second control?  Or just on the fist control?   None of seem to
>be working for me.
>
>-----Original Message-----
>From: Ryan Puddephatt [mailto:[hidden email]]
>Sent: Tuesday, February 14, 2006 6:26 PM
>To: [hidden email]
>Subject: RE: [ops-users] Checkbox problem/node splitting
>
>
>It seems the xforms-value-change event is running when you change the
>value, e.g. you tick one which runs the event to untick the other. When
>this is done, it runs the event to untick the other.
>
>Try putting the set-values as
>
><xforms:set-value ref="/path/to/node1" value="if(/path/to/node2 = '')
>then /path/to/node1 else ''"/>
>
>I think this should work
>
>Ryan Puddephatt
>Software Engineer
>TFX Group - IT UK
>1 Michaelson Square
>Livingston
>West Lothian
>Scotand
>EH54 7DP
>
>* [hidden email]
>( 01506 407 110
>7  01506 407 108
>
>>-----Original Message-----
>>From: Richard Braman [mailto:[hidden email]]
>>Sent: 14 February 2006 22:56
>>To: [hidden email]
>>Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>Same thing happens with select1 and it is a radio instead of checkbox.
>>
>>-----Original Message-----
>>From: Ryan Puddephatt [mailto:[hidden email]]
>>Sent: Tuesday, February 14, 2006 6:03 PM
>>To: [hidden email]
>>Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>
>>Richard,
>> Use select1 instead of select
>>
>>Ryan Puddephatt
>>Software Engineer
>>TFX Group - IT UK
>>1 Michaelson Square
>>Livingston
>>West Lothian
>>Scotand
>>EH54 7DP
>>
>>* [hidden email]
>>( 01506 407 110
>>7  01506 407 108
>>
>>>-----Original Message-----
>>>From: Richard Braman [mailto:[hidden email]]
>>>Sent: 14 February 2006 20:05
>>>To: [hidden email]
>>>Subject: RE: [ops-users] Checkbox problem/node splitting
>>>
>>>Erik,
>>>
>>>Both of the selects I have use bind instead of ref.  Also select1
>>>seems to produce a radio button instead of a checkbox. I tried this
>>>code instead:
>>> <xforms:select appearance="full" bind="c1-1" >
>>>   <xforms:setvalue
>>>ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
>>value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>> <xforms:select appearance="full" bind="c1-2" >
>>> <xforms:setvalue ev:event="xforms-value-changed"
>>
>>>ref="/form/f1040ez/SEQ0100" value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>>
>>>Which is close, but when you check one (while the other one is already
>>>checked) it unchecks the other checkbox and itself.  The same thing
>>>happens if I do select1 (but with radio button instead of checkboxes).
>
>>>I think it must have something to do with binding.
>>>
>>>See the presidential election campaign fund checkboxes on the form:
>>>http://24.75.221.234:8080/taxcode/1040ez
>>>
>>>
>>>
>>>-----Original Message-----
>>>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>Bruchez
>>>Sent: Tuesday, February 14, 2006 2:12 PM
>>>To: [hidden email]
>>>Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>>Something like this should do:
>>>
>>><xforms:select1 ref="/path/to/my-node-1" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-2"
>>>                    value="''"/>
>>>
>>></xforms:select1>
>>>
>>><xforms:select1 ref="/path/to/my-node-2" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-1"
>>>                    value="''"/>
>>>
>>></xforms:select1>
>>>
>>>I.e. each time you change the value of one of the checkboxes, that
>>>clears the other one.
>>>
>>>-Erik
>>>
>>>Richard Braman wrote:
>>>> They could both be unchecked yes.
>>>>
>>>> -----Original Message-----
>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>> Bruchez
>>>> Sent: Monday, February 13, 2006 7:37 PM
>>>> To: [hidden email]
>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> So, two checkboxes, each bound to a different node, and exclusive.
>>>> Can they both be unchecked?
>>>>
>>>> -Erik
>>>>
>>>> Richard Braman wrote:
>>>>> ON that last question, assume the controls are bound to 2 separate
>>>>> nodes.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Richard Braman [mailto:[hidden email]]
>>>>> Sent: Monday, February 13, 2006 6:51 PM
>>>>> To: [hidden email]
>>>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Erik,  That worked, but suppose there are two checkboxes and the
>>>>> checkboes must be mutually exclusive, so that if one is checked
>>>>> then
>>
>>>>> the other cannot be.  How does that change the syntax?
>>>>>
>>>>> -----Original Message-----
>>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>>> Bruchez
>>>>> Sent: Monday, February 13, 2006 9:35 AM
>>>>> To: [hidden email]
>>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Richard Braman wrote:
>>>>>> OK, suppose I have a node in my instance
>>>>>> <boolean_node> which can have either the value 'X' or be empty If
>>>>>> it is X I want my checkbox to be checked if it is empty I want
>>>>>> nothing. The checkbox doesn't have any label or anything else, it
>>>>>> is either checked or unchecked.
>>>>>>
>>>>>> This is my first crack , but I know I am missing something
>>>>>>
>>>>>> <xforms:model>
>>>>>> <xforms:instance>
>>>>>> <form>
>>>>>> <SEQ0010>X</SEQ0010>
>>>>>> </form>
>>>>>> </xforms:instance>
>>>>>>
>>>>>>
>>>>>> </xforms:model>
>>>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>>>> bind="ck-1">
>>>>>> <items>
>>>>>>       <true value="X"/>
>>>>>> <false value=""/>
>>>>>> </items>
>>>>>> </xforms:select>
>>>>> Try:
>>>>>
>>>>> <xforms:select bind="ck-1" appearance="full">
>>>>>    <xforms:label/>
>>>>>    <xforms:item>
>>>>>      <xforms:name/>
>>>>>      <xforms:value>X</xforms:value>
>>>>>    </xforms:item>
>>>>> </xforms:select>
>>>>>
>>>>> -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: Does Xforms bind foce ajax

Erik Bruchez
Administrator
In reply to this post by Adrian Baker-2
Adrian Baker wrote:

> Erik Bruchez wrote:
>> Adrian Baker wrote:
>>
>>> 2. <textarea> elements are not wrapped: is this perhaps a little
>>> inconsistent?
>>
>> Right, that probably should be changed. But so far, <textarea> is
>> always displayed the same way so this has not been a requirement.
>>
>> -Erik
>
> Ok - I don't know how complex this change would be, but from an end-user
> point of view it would make the CSS more consistent.
Yes. I added a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=304679&group_id=168&atid=350207

-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: Checkbox problem/node splitting

Richard Braman
In reply to this post by Erik Bruchez
This still doesn't work for me.  I saw it work in your sanbox though.
Would using binds vs refs make a difference?

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Tuesday, February 14, 2006 6:33 PM
To: [hidden email]
Subject: Re: [ops-users] Checkbox problem/node splitting


Absolutely right, we came up with the same solution. The attached works
in the sandbox.

-Erik

Ryan Puddephatt wrote:

> It seems the xforms-value-change event is running when you change the
> value, e.g. you tick one which runs the event to untick the other.
> When this is done, it runs the event to untick the other.
>
> Try putting the set-values as
>
> <xforms:set-value ref="/path/to/node1" value="if(/path/to/node2 = '')
> then /path/to/node1 else ''"/>
>
> I think this should work
>
> Ryan Puddephatt
> Software Engineer
> TFX Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>  
>> -----Original Message-----
>> From: Richard Braman [mailto:[hidden email]]
>> Sent: 14 February 2006 22:56
>> To: [hidden email]
>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>> Same thing happens with select1 and it is a radio instead of
>> checkbox.
>>
>> -----Original Message-----
>> From: Ryan Puddephatt [mailto:[hidden email]]
>> Sent: Tuesday, February 14, 2006 6:03 PM
>> To: [hidden email]
>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>
>> Richard,
>> Use select1 instead of select
>>
>> Ryan Puddephatt
>> Software Engineer
>> TFX Group - IT UK
>> 1 Michaelson Square
>> Livingston
>> West Lothian
>> Scotand
>> EH54 7DP
>>
>> * [hidden email]
>> ( 01506 407 110
>> 7  01506 407 108
>>
>>> -----Original Message-----
>>> From: Richard Braman [mailto:[hidden email]]
>>> Sent: 14 February 2006 20:05
>>> To: [hidden email]
>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>
>>> Erik,
>>>
>>> Both of the selects I have use bind instead of ref.  Also select1
>>> seems to produce a radio button instead of a checkbox. I tried this
>>> code instead:
>>> <xforms:select appearance="full" bind="c1-1" >
>>>   <xforms:setvalue
>>> ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
>> value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>> <xforms:select appearance="full" bind="c1-2" >
>>> <xforms:setvalue ev:event="xforms-value-changed"

>>> ref="/form/f1040ez/SEQ0100" value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>>
>>> Which is close, but when you check one (while the other one is
>>> already
>>> checked) it unchecks the other checkbox and itself.  The same thing
>>> happens if I do select1 (but with radio button instead of
checkboxes).

>>> I think it must have something to do with binding.
>>>
>>> See the presidential election campaign fund checkboxes on the form:
>>> http://24.75.221.234:8080/taxcode/1040ez
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>> Bruchez
>>> Sent: Tuesday, February 14, 2006 2:12 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> Something like this should do:
>>>
>>> <xforms:select1 ref="/path/to/my-node-1" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-2"
>>>                    value="''"/>
>>>
>>> </xforms:select1>
>>>
>>> <xforms:select1 ref="/path/to/my-node-2" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-1"
>>>                    value="''"/>
>>>
>>> </xforms:select1>
>>>
>>> I.e. each time you change the value of one of the checkboxes, that
>>> clears the other one.
>>>
>>> -Erik
>>>
>>> Richard Braman wrote:
>>>> They could both be unchecked yes.
>>>>
>>>> -----Original Message-----
>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>> Bruchez
>>>> Sent: Monday, February 13, 2006 7:37 PM
>>>> To: [hidden email]
>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> So, two checkboxes, each bound to a different node, and exclusive.
>>>> Can they both be unchecked?
>>>>
>>>> -Erik
>>>>
>>>> Richard Braman wrote:
>>>>> ON that last question, assume the controls are bound to 2 separate

>>>>> nodes.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Richard Braman [mailto:[hidden email]]
>>>>> Sent: Monday, February 13, 2006 6:51 PM
>>>>> To: [hidden email]
>>>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Erik,  That worked, but suppose there are two checkboxes and the
>>>>> checkboes must be mutually exclusive, so that if one is checked
>>>>> then the other cannot be.  How does that change the syntax?
>>>>>
>>>>> -----Original Message-----
>>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>>> Bruchez
>>>>> Sent: Monday, February 13, 2006 9:35 AM
>>>>> To: [hidden email]
>>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Richard Braman wrote:
>>>>>> OK, suppose I have a node in my instance
>>>>>> <boolean_node> which can have either the value 'X' or be empty If

>>>>>> it is X I want my checkbox to be checked if it is empty I want
>>>>>> nothing. The checkbox doesn't have any label or anything else, it

>>>>>> is either checked or unchecked.
>>>>>>
>>>>>> This is my first crack , but I know I am missing something
>>>>>>
>>>>>> <xforms:model>
>>>>>> <xforms:instance>
>>>>>> <form>
>>>>>> <SEQ0010>X</SEQ0010>
>>>>>> </form>
>>>>>> </xforms:instance>
>>>>>>
>>>>>>
>>>>>> </xforms:model>
>>>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>>>> bind="ck-1">
>>>>>> <items>
>>>>>>       <true value="X"/>
>>>>>> <false value=""/>
>>>>>> </items>
>>>>>> </xforms:select>
>>>>> Try:
>>>>>
>>>>> <xforms:select bind="ck-1" appearance="full">
>>>>>    <xforms:label/>
>>>>>    <xforms:item>
>>>>>      <xforms:name/>
>>>>>      <xforms:value>X</xforms:value>
>>>>>    </xforms:item>
>>>>> </xforms:select>
>>>>>
>>>>> -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
|

Mutually Exclusive Checkboxes

Richard Braman
The examples and Erik sent me (that worked in the sandbox) and the ones
Ryan came up with both used refs to connect the control to the instance.
My checkboxes use binds.  On mine, the checkboxes aren't mutually
exclusive, when one is checked the other doesn't uncheck if its
currently checked.  Both can be unchecked which is fine in this use
case, but how would you enforce one of them always being checked.  I
know in the sandbox it works.  I also tried it with the refs like it ran
in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in
chiba).  I understand the set-value syntax.  I agree it works with the
refs and .  Is this a potential bug?


My code:
        <xforms:model>
                <xforms:instance id="main-instance">
                        <form xmlns="">
                                <f1040ez>
                                        <SEQ0010>123456789</SEQ0010>
                                        <SEQ0100>X</SEQ0100>
                                        <SEQ0110/>
                                                </f1040ez>
                        </form>
                </xforms:instance>
                <xforms:bind nodeset="instance('main-instance')">
                        <!--PRES ELECTION-->
                        <xforms:bind id="c1-1"
nodeset="/form/f1040ez/SEQ0100"/>
                        <xforms:bind id="c1-2"
nodeset="/form/f1040ez/SEQ0110"/>
                </xforms:bind>
        </xforms:model>
       
        <xforms:select appearance="full" bind="c1-1">
                <xforms:set-value ev:event="xforms-value-changed"
ref="instance(main-instance)//f1040ez/SEQ0110" value="
                                                if
(instance(main-instance)//f1040ez/SEQ0100 = '' ) then
       
instance(main-instance)//f1040ez/SEQ0110
                                                else ''
                            "/>
                <xforms:label>Yes</xforms:label>
                <xforms:item>
                        <xforms:name/>
                        <xforms:value>X</xforms:value>
                </xforms:item>
        </xforms:select>
        <xforms:select appearance="full" bind="c1-2">
                <xforms:set-value ev:event="xforms-value-changed"
ref="instance(main-instance)//f1040ez/SEQ0100" value="
                                                if
(instance(main-instance)//f1040ez/SEQ0110 = '') then
       
instance(main-instance)//f1040ez/SEQ0100
                                                else ''

                                                "/>
                <xforms:label>No</xforms:label>
                <xforms:item>
                        <xforms:name/>
                        <xforms:value>X</xforms:value>
                </xforms:item>
        </xforms:select>


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


Erik's code (works in the sandbox)

<!--
    Copyright (C) 2006 Orbeon, Inc.

    This program is free software; you can redistribute it and/or modify
it under the terms of the
    GNU Lesser General Public License as published by the Free Software
Foundation; either version
    2.1 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
    See the GNU Lesser General Public License for more details.

    The full text of the license is available at
http://www.gnu.org/copyleft/lesser.html
-->
<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
    xmlns:f="http://orbeon.org/oxf/xml/formatting"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
    xmlns:widget="http://orbeon.org/oxf/xml/widget"
    xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xhtml:head>
        <xhtml:title>Exclusive Checkboxes</xhtml:title>
        <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
            <xforms:instance id="instance">
                <instance xmlns="">
                    <value1/>
                    <value2/>
                </instance>
            </xforms:instance>
            <xforms:bind id="value1" nodeset="/value1"></xforms:bind>
             <xforms:bind id="value2" nodeset="/value2"></xforms:bind>
        </xforms:model>
    </xhtml:head>
    <xhtml:body>
        <xhtml:p>
            <xforms:select bind="value1" appearance="full">
                <xforms:action ev:event="xforms-value-changed">
                    <xforms:setvalue ref="../value2" value="if
(../value1 = '') then ../value2 else ''"/>
                </xforms:action>
                <xforms:label>Value1: </xforms:label>
                <xforms:item>
                    <xforms:name/>
                    <xforms:value>x</xforms:value>
                </xforms:item>
            </xforms:select>
            <xforms:select bind="value2" appearance="full">
                <xforms:action ev:event="xforms-value-changed">
                    <xforms:setvalue ref="../value1" value="if
(../value2 = '') then ../value1 else ''"/>
                </xforms:action>
                <xforms:label>Value2: </xforms:label>
                <xforms:item>
                    <xforms:name/>
                    <xforms:value>x</xforms:value>
                </xforms:item>
            </xforms:select>
        </xhtml:p>
    </xhtml:body>
</xhtml:html>

-----Original Message-----
From: Richard Braman [mailto:[hidden email]]
Sent: Thursday, February 23, 2006 3:26 AM
To: [hidden email]
Subject: RE: [ops-users] Checkbox problem/node splitting


This still doesn't work for me.  I saw it work in your sanbox though.
Would using binds vs refs make a difference?

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Tuesday, February 14, 2006 6:33 PM
To: [hidden email]
Subject: Re: [ops-users] Checkbox problem/node splitting


Absolutely right, we came up with the same solution. The attached works
in the sandbox.

-Erik

Ryan Puddephatt wrote:

> It seems the xforms-value-change event is running when you change the
> value, e.g. you tick one which runs the event to untick the other.
> When this is done, it runs the event to untick the other.
>
> Try putting the set-values as
>
> <xforms:set-value ref="/path/to/node1" value="if(/path/to/node2 = '')
> then /path/to/node1 else ''"/>
>
> I think this should work
>
> Ryan Puddephatt
> Software Engineer
> TFX Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>  
>> -----Original Message-----
>> From: Richard Braman [mailto:[hidden email]]
>> Sent: 14 February 2006 22:56
>> To: [hidden email]
>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>> Same thing happens with select1 and it is a radio instead of
>> checkbox.
>>
>> -----Original Message-----
>> From: Ryan Puddephatt [mailto:[hidden email]]
>> Sent: Tuesday, February 14, 2006 6:03 PM
>> To: [hidden email]
>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>
>>
>> Richard,
>> Use select1 instead of select
>>
>> Ryan Puddephatt
>> Software Engineer
>> TFX Group - IT UK
>> 1 Michaelson Square
>> Livingston
>> West Lothian
>> Scotand
>> EH54 7DP
>>
>> * [hidden email]
>> ( 01506 407 110
>> 7  01506 407 108
>>
>>> -----Original Message-----
>>> From: Richard Braman [mailto:[hidden email]]
>>> Sent: 14 February 2006 20:05
>>> To: [hidden email]
>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>
>>> Erik,
>>>
>>> Both of the selects I have use bind instead of ref.  Also select1
>>> seems to produce a radio button instead of a checkbox. I tried this
>>> code instead:
>>> <xforms:select appearance="full" bind="c1-1" >
>>>   <xforms:setvalue
>>> ev:event="xforms-value-changed" ref="/form/f1040ez/SEQ0110"
>> value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>> <xforms:select appearance="full" bind="c1-2" >
>>> <xforms:setvalue ev:event="xforms-value-changed"

>>> ref="/form/f1040ez/SEQ0100" value="''"/>
>>> <xforms:label/>
>>> <xforms:item>
>>> <xforms:name/>
>>> <xforms:value>X</xforms:value>
>>> </xforms:item>
>>> </xforms:select>
>>>
>>> Which is close, but when you check one (while the other one is
>>> already
>>> checked) it unchecks the other checkbox and itself.  The same thing
>>> happens if I do select1 (but with radio button instead of
checkboxes).

>>> I think it must have something to do with binding.
>>>
>>> See the presidential election campaign fund checkboxes on the form:
>>> http://24.75.221.234:8080/taxcode/1040ez
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>> Bruchez
>>> Sent: Tuesday, February 14, 2006 2:12 PM
>>> To: [hidden email]
>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>
>>>
>>> Something like this should do:
>>>
>>> <xforms:select1 ref="/path/to/my-node-1" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-2"
>>>                    value="''"/>
>>>
>>> </xforms:select1>
>>>
>>> <xforms:select1 ref="/path/to/my-node-2" ...>
>>>   <xforms:setvalue ev:event="xforms-value-changed"
>>>                    ref="/path/to/my-node-1"
>>>                    value="''"/>
>>>
>>> </xforms:select1>
>>>
>>> I.e. each time you change the value of one of the checkboxes, that
>>> clears the other one.
>>>
>>> -Erik
>>>
>>> Richard Braman wrote:
>>>> They could both be unchecked yes.
>>>>
>>>> -----Original Message-----
>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>> Bruchez
>>>> Sent: Monday, February 13, 2006 7:37 PM
>>>> To: [hidden email]
>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>
>>>>
>>>> So, two checkboxes, each bound to a different node, and exclusive.
>>>> Can they both be unchecked?
>>>>
>>>> -Erik
>>>>
>>>> Richard Braman wrote:
>>>>> ON that last question, assume the controls are bound to 2 separate

>>>>> nodes.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Richard Braman [mailto:[hidden email]]
>>>>> Sent: Monday, February 13, 2006 6:51 PM
>>>>> To: [hidden email]
>>>>> Subject: RE: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Erik,  That worked, but suppose there are two checkboxes and the
>>>>> checkboes must be mutually exclusive, so that if one is checked
>>>>> then the other cannot be.  How does that change the syntax?
>>>>>
>>>>> -----Original Message-----
>>>>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik
>>>>> Bruchez
>>>>> Sent: Monday, February 13, 2006 9:35 AM
>>>>> To: [hidden email]
>>>>> Subject: Re: [ops-users] Checkbox problem/node splitting
>>>>>
>>>>>
>>>>> Richard Braman wrote:
>>>>>> OK, suppose I have a node in my instance
>>>>>> <boolean_node> which can have either the value 'X' or be empty If

>>>>>> it is X I want my checkbox to be checked if it is empty I want
>>>>>> nothing. The checkbox doesn't have any label or anything else, it

>>>>>> is either checked or unchecked.
>>>>>>
>>>>>> This is my first crack , but I know I am missing something
>>>>>>
>>>>>> <xforms:model>
>>>>>> <xforms:instance>
>>>>>> <form>
>>>>>> <SEQ0010>X</SEQ0010>
>>>>>> </form>
>>>>>> </xforms:instance>
>>>>>>
>>>>>>
>>>>>> </xforms:model>
>>>>>> <xforms:bind id="chk1" nodeset="/form/SEQ0010"> <xforms:select
>>>>>> bind="ck-1">
>>>>>> <items>
>>>>>>       <true value="X"/>
>>>>>> <false value=""/>
>>>>>> </items>
>>>>>> </xforms:select>
>>>>> Try:
>>>>>
>>>>> <xforms:select bind="ck-1" appearance="full">
>>>>>    <xforms:label/>
>>>>>    <xforms:item>
>>>>>      <xforms:name/>
>>>>>      <xforms:value>X</xforms:value>
>>>>>    </xforms:item>
>>>>> </xforms:select>
>>>>>
>>>>> -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: [Chiba-users] Mutually Exclusive Checkboxes

Joern Turner-5
Richard,

you should be aware if you're using standard XForms or not. Orbeon
obviously support non-standard extensions like 'if then else' which are
not standard XForms nor be available in Chiba so you just can't simply
expect it to work.

Joern
Richard Braman wrote:

> The examples and Erik sent me (that worked in the sandbox) and the ones
> Ryan came up with both used refs to connect the control to the instance.
> My checkboxes use binds.  On mine, the checkboxes aren't mutually
> exclusive, when one is checked the other doesn't uncheck if its
> currently checked.  Both can be unchecked which is fine in this use
> case, but how would you enforce one of them always being checked.  I
> know in the sandbox it works.  I also tried it with the refs like it ran
> in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in
> chiba).  I understand the set-value syntax.  I agree it works with the
> refs and .  Is this a potential bug?
>
>
> My code:
> <xforms:model>
> <xforms:instance id="main-instance">
> <form xmlns="">
> <f1040ez>
> <SEQ0010>123456789</SEQ0010>
> <SEQ0100>X</SEQ0100>
> <SEQ0110/>
> </f1040ez>
> </form>
> </xforms:instance>
> <xforms:bind nodeset="instance('main-instance')">
> <!--PRES ELECTION-->
> <xforms:bind id="c1-1"
> nodeset="/form/f1040ez/SEQ0100"/>
> <xforms:bind id="c1-2"
> nodeset="/form/f1040ez/SEQ0110"/>
> </xforms:bind>
> </xforms:model>
>
> <xforms:select appearance="full" bind="c1-1">
> <xforms:set-value ev:event="xforms-value-changed"
> ref="instance(main-instance)//f1040ez/SEQ0110" value="
> if
> (instance(main-instance)//f1040ez/SEQ0100 = '' ) then
>
> instance(main-instance)//f1040ez/SEQ0110
> else ''
>    "/>
> <xforms:label>Yes</xforms:label>
> <xforms:item>
> <xforms:name/>
> <xforms:value>X</xforms:value>
> </xforms:item>
> </xforms:select>
> <xforms:select appearance="full" bind="c1-2">
> <xforms:set-value ev:event="xforms-value-changed"
> ref="instance(main-instance)//f1040ez/SEQ0100" value="
> if
> (instance(main-instance)//f1040ez/SEQ0110 = '') then
>
> instance(main-instance)//f1040ez/SEQ0100
> else ''
>
> "/>
> <xforms:label>No</xforms:label>
> <xforms:item>
> <xforms:name/>
> <xforms:value>X</xforms:value>
> </xforms:item>
> </xforms:select>
>
>
<snip/>



--
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: Re: [Chiba-users] Mutually Exclusive Checkboxes

Erik Bruchez
Administrator
Richard,

What Joern is saying is correct. OPS uses XPath 2.0 and because there is
conflict between 2.0's if/then/else construct and XForms 1.0's built-in
if() function, you cannot use the latter directly.

But you can use it with OPS under the name xfif(). Similarly, to try
with Chiba, you can use the standard XForms if() function. We still
haven't swallowed that the XForms working group called this function if().

We know that good old XPath 1.0 support would be a good compatibility
move for OPS, but beyond that aspect it is fairly pointless as XPath 2.0
is so much better than 1.0. We have a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=303758&group_id=168&atid=350207

It is on the XForms working group's future agenda to officially look at
XPath 2.0 integration with XForms.

-Erik

Joern Turner wrote:
 > Richard,
 >
 > you should be aware if you're using standard XForms or not. Orbeon
 > obviously support non-standard extensions like 'if then else' which are
 > not standard XForms nor be available in Chiba so you just can't simply
 > expect it to work.
 >
 > Joern
 > Richard Braman wrote:
 >> The examples and Erik sent me (that worked in the sandbox) and the ones
 >> Ryan came up with both used refs to connect the control to the instance.
 >> My checkboxes use binds.  On mine, the checkboxes aren't mutually
 >> exclusive, when one is checked the other doesn't uncheck if its
 >> currently checked.  Both can be unchecked which is fine in this use
 >> case, but how would you enforce one of them always being checked.  I
 >> know in the sandbox it works.  I also tried it with the refs like it ran
 >> in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in
 >> chiba).  I understand the set-value syntax.  I agree it works with the
 >> refs and .  Is this a potential bug?
 >>
 >>
 >> My code:
 >>     <xforms:model>
 >>         <xforms:instance id="main-instance">
 >>             <form xmlns="">
 >>                 <f1040ez>
 >>                     <SEQ0010>123456789</SEQ0010>
 >>                     <SEQ0100>X</SEQ0100>
 >>                     <SEQ0110/>
 >>                         </f1040ez>
 >>             </form>
 >>         </xforms:instance>
 >>         <xforms:bind nodeset="instance('main-instance')">
 >>             <!--PRES ELECTION-->
 >>             <xforms:bind id="c1-1"
 >> nodeset="/form/f1040ez/SEQ0100"/>
 >>             <xforms:bind id="c1-2"
 >> nodeset="/form/f1040ez/SEQ0110"/>
 >>         </xforms:bind>
 >>     </xforms:model>
 >>
 >>     <xforms:select appearance="full" bind="c1-1">
 >>         <xforms:set-value ev:event="xforms-value-changed"
 >> ref="instance(main-instance)//f1040ez/SEQ0110" value="
 >>                         if
 >> (instance(main-instance)//f1040ez/SEQ0100 = '' ) then
 >> instance(main-instance)//f1040ez/SEQ0110
 >>                         else ''
 >>                 "/>
 >>         <xforms:label>Yes</xforms:label>
 >>         <xforms:item>
 >>             <xforms:name/>
 >>             <xforms:value>X</xforms:value>
 >>         </xforms:item>
 >>     </xforms:select>
 >>     <xforms:select appearance="full" bind="c1-2">
 >>         <xforms:set-value ev:event="xforms-value-changed"
 >> ref="instance(main-instance)//f1040ez/SEQ0100" value="
 >>                         if
 >> (instance(main-instance)//f1040ez/SEQ0110 = '') then
 >> instance(main-instance)//f1040ez/SEQ0100                         else ''
 >>
 >>                         "/>
 >>         <xforms:label>No</xforms:label>
 >>         <xforms:item>
 >>             <xforms:name/>
 >>             <xforms:value>X</xforms:value>
 >>         </xforms:item>
 >>     </xforms:select>
 >>
 >>
 > <snip/>
 >
 >
 > ------------------------------------------------------------------------
 >
 >
 > --
 > 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
Reply | Threaded
Open this post in threaded view
|

RE: Re: [Chiba-users] Mutually Exclusive Checkboxes

Richard Braman
Calling the Xforms function "if" is certianly strange considering Xforms
wanting to stay compatible with other X Langauges.

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Friday, February 24, 2006 10:09 AM
To: [hidden email]
Cc: [hidden email]; [hidden email];
[hidden email]
Subject: Re: [ops-users] Re: [Chiba-users] Mutually Exclusive Checkboxes


Richard,

What Joern is saying is correct. OPS uses XPath 2.0 and because there is

conflict between 2.0's if/then/else construct and XForms 1.0's built-in
if() function, you cannot use the latter directly.

But you can use it with OPS under the name xfif(). Similarly, to try
with Chiba, you can use the standard XForms if() function. We still
haven't swallowed that the XForms working group called this function
if().

We know that good old XPath 1.0 support would be a good compatibility
move for OPS, but beyond that aspect it is fairly pointless as XPath 2.0

is so much better than 1.0. We have a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=303758&grou
p_id=168&atid=350207

It is on the XForms working group's future agenda to officially look at
XPath 2.0 integration with XForms.

-Erik

Joern Turner wrote:
 > Richard,
 >
 > you should be aware if you're using standard XForms or not. Orbeon  >
obviously support non-standard extensions like 'if then else' which are
> not standard XForms nor be available in Chiba so you just can't simply
> expect it to work.  >  > Joern  > Richard Braman wrote:  >> The
examples and Erik sent me (that worked in the sandbox) and the ones  >>
Ryan came up with both used refs to connect the control to the instance.
>> My checkboxes use binds.  On mine, the checkboxes aren't mutually  >>
exclusive, when one is checked the other doesn't uncheck if its  >>
currently checked.  Both can be unchecked which is fine in this use  >>
case, but how would you enforce one of them always being checked.  I  >>
know in the sandbox it works.  I also tried it with the refs like it ran
>> in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in
>> chiba).  I understand the set-value syntax.  I agree it works with
the  >> refs and .  Is this a potential bug?  >>  >>  >> My code:
 >>     <xforms:model>
 >>         <xforms:instance id="main-instance">
 >>             <form xmlns="">
 >>                 <f1040ez>
 >>                     <SEQ0010>123456789</SEQ0010>
 >>                     <SEQ0100>X</SEQ0100>
 >>                     <SEQ0110/>
 >>                         </f1040ez>
 >>             </form>
 >>         </xforms:instance>
 >>         <xforms:bind nodeset="instance('main-instance')">
 >>             <!--PRES ELECTION-->
 >>             <xforms:bind id="c1-1"
 >> nodeset="/form/f1040ez/SEQ0100"/>
 >>             <xforms:bind id="c1-2"
 >> nodeset="/form/f1040ez/SEQ0110"/>
 >>         </xforms:bind>
 >>     </xforms:model>
 >>
 >>     <xforms:select appearance="full" bind="c1-1">
 >>         <xforms:set-value ev:event="xforms-value-changed"
 >> ref="instance(main-instance)//f1040ez/SEQ0110" value="
 >>                         if
 >> (instance(main-instance)//f1040ez/SEQ0100 = '' ) then
 >> instance(main-instance)//f1040ez/SEQ0110
 >>                         else ''
 >>                 "/>
 >>         <xforms:label>Yes</xforms:label>
 >>         <xforms:item>
 >>             <xforms:name/>
 >>             <xforms:value>X</xforms:value>
 >>         </xforms:item>
 >>     </xforms:select>
 >>     <xforms:select appearance="full" bind="c1-2">
 >>         <xforms:set-value ev:event="xforms-value-changed"
 >> ref="instance(main-instance)//f1040ez/SEQ0100" value="
 >>                         if
 >> (instance(main-instance)//f1040ez/SEQ0110 = '') then
 >> instance(main-instance)//f1040ez/SEQ0100
else ''
 >>
 >>                         "/>
 >>         <xforms:label>No</xforms:label>
 >>         <xforms:item>
 >>             <xforms:name/>
 >>             <xforms:value>X</xforms:value>
 >>         </xforms:item>
 >>     </xforms:select>
 >>
 >>
 > <snip/>
 >
 >
 >
------------------------------------------------------------------------
 >
 >
 > --
 > 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
Reply | Threaded
Open this post in threaded view
|

RE: [Chiba-users] Mutually Exclusive Checkboxes

Richard Braman
In reply to this post by Joern Turner-5
How would you do a mutually exclsive checkbox in Chiba?  I am interested
to see the difference.
A mutally exclusive checkbox in my use case is one where each checkbox
is bound to a different element in the instance, and when one is checked
the other cannot be.  The value we are setting in the instance when
checked is X.


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Joern
Turner
Sent: Friday, February 24, 2006 8:22 AM
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: Re: [Chiba-users] Mutually Exclusive Checkboxes


Richard,

you should be aware if you're using standard XForms or not. Orbeon
obviously support non-standard extensions like 'if then else' which are
not standard XForms nor be available in Chiba so you just can't simply
expect it to work.

Joern
Richard Braman wrote:
> The examples and Erik sent me (that worked in the sandbox) and the
> ones Ryan came up with both used refs to connect the control to the
> instance. My checkboxes use binds.  On mine, the checkboxes aren't
> mutually exclusive, when one is checked the other doesn't uncheck if
> its currently checked.  Both can be unchecked which is fine in this
> use case, but how would you enforce one of them always being checked.

> I know in the sandbox it works.  I also tried it with the refs like it

> ran in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in

> chiba).  I understand the set-value syntax.  I agree it works with the

> refs and .  Is this a potential bug?
>
>
> My code:
> <xforms:model>
> <xforms:instance id="main-instance">
> <form xmlns="">
> <f1040ez>
> <SEQ0010>123456789</SEQ0010>
> <SEQ0100>X</SEQ0100>
> <SEQ0110/>
> </f1040ez>
> </form>
> </xforms:instance>
> <xforms:bind nodeset="instance('main-instance')">
> <!--PRES ELECTION-->
> <xforms:bind id="c1-1"
> nodeset="/form/f1040ez/SEQ0100"/>
> <xforms:bind id="c1-2"
> nodeset="/form/f1040ez/SEQ0110"/>
> </xforms:bind>
> </xforms:model>
>
> <xforms:select appearance="full" bind="c1-1">
> <xforms:set-value ev:event="xforms-value-changed"
> ref="instance(main-instance)//f1040ez/SEQ0110" value="
> if
> (instance(main-instance)//f1040ez/SEQ0100 = '' ) then
>
> instance(main-instance)//f1040ez/SEQ0110
> else ''
>    "/>
> <xforms:label>Yes</xforms:label>
> <xforms:item>
> <xforms:name/>
> <xforms:value>X</xforms:value>
> </xforms:item>
> </xforms:select>
> <xforms:select appearance="full" bind="c1-2">
> <xforms:set-value ev:event="xforms-value-changed"
> ref="instance(main-instance)//f1040ez/SEQ0100" value="
> if
> (instance(main-instance)//f1040ez/SEQ0110 = '') then
>
> instance(main-instance)//f1040ez/SEQ0100
> else ''
>
> "/>
> <xforms:label>No</xforms:label>
> <xforms:item>
> <xforms:name/>
> <xforms:value>X</xforms:value>
> </xforms:item>
> </xforms:select>
>
>
<snip/>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language that extends applications into web and mobile media. Attend the
live webcast and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Chiba-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/chiba-users




--
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: Re: [Chiba-users] Mutually Exclusive Checkboxes

Richard Braman
In reply to this post by Erik Bruchez
What is the difference between XFOrms 'if' and Xpath 'if'   if it is in
a calculate= attribute of a bind?

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Friday, February 24, 2006 10:09 AM
To: [hidden email]
Cc: [hidden email]; [hidden email];
[hidden email]
Subject: Re: [ops-users] Re: [Chiba-users] Mutually Exclusive Checkboxes


Richard,

What Joern is saying is correct. OPS uses XPath 2.0 and because there is

conflict between 2.0's if/then/else construct and XForms 1.0's built-in
if() function, you cannot use the latter directly.

But you can use it with OPS under the name xfif(). Similarly, to try
with Chiba, you can use the standard XForms if() function. We still
haven't swallowed that the XForms working group called this function
if().

We know that good old XPath 1.0 support would be a good compatibility
move for OPS, but beyond that aspect it is fairly pointless as XPath 2.0

is so much better than 1.0. We have a bug to track this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=303758&grou
p_id=168&atid=350207

It is on the XForms working group's future agenda to officially look at
XPath 2.0 integration with XForms.

-Erik

Joern Turner wrote:
 > Richard,
 >
 > you should be aware if you're using standard XForms or not. Orbeon  >
obviously support non-standard extensions like 'if then else' which are
> not standard XForms nor be available in Chiba so you just can't simply
> expect it to work.  >  > Joern  > Richard Braman wrote:  >> The
examples and Erik sent me (that worked in the sandbox) and the ones  >>
Ryan came up with both used refs to connect the control to the instance.
>> My checkboxes use binds.  On mine, the checkboxes aren't mutually  >>
exclusive, when one is checked the other doesn't uncheck if its  >>
currently checked.  Both can be unchecked which is fine in this use  >>
case, but how would you enforce one of them always being checked.  I  >>
know in the sandbox it works.  I also tried it with the refs like it ran
>> in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in
>> chiba).  I understand the set-value syntax.  I agree it works with
the  >> refs and .  Is this a potential bug?  >>  >>  >> My code:
 >>     <xforms:model>
 >>         <xforms:instance id="main-instance">
 >>             <form xmlns="">
 >>                 <f1040ez>
 >>                     <SEQ0010>123456789</SEQ0010>
 >>                     <SEQ0100>X</SEQ0100>
 >>                     <SEQ0110/>
 >>                         </f1040ez>
 >>             </form>
 >>         </xforms:instance>
 >>         <xforms:bind nodeset="instance('main-instance')">
 >>             <!--PRES ELECTION-->
 >>             <xforms:bind id="c1-1"
 >> nodeset="/form/f1040ez/SEQ0100"/>
 >>             <xforms:bind id="c1-2"
 >> nodeset="/form/f1040ez/SEQ0110"/>
 >>         </xforms:bind>
 >>     </xforms:model>
 >>
 >>     <xforms:select appearance="full" bind="c1-1">
 >>         <xforms:set-value ev:event="xforms-value-changed"
 >> ref="instance(main-instance)//f1040ez/SEQ0110" value="
 >>                         if
 >> (instance(main-instance)//f1040ez/SEQ0100 = '' ) then
 >> instance(main-instance)//f1040ez/SEQ0110
 >>                         else ''
 >>                 "/>
 >>         <xforms:label>Yes</xforms:label>
 >>         <xforms:item>
 >>             <xforms:name/>
 >>             <xforms:value>X</xforms:value>
 >>         </xforms:item>
 >>     </xforms:select>
 >>     <xforms:select appearance="full" bind="c1-2">
 >>         <xforms:set-value ev:event="xforms-value-changed"
 >> ref="instance(main-instance)//f1040ez/SEQ0100" value="
 >>                         if
 >> (instance(main-instance)//f1040ez/SEQ0110 = '') then
 >> instance(main-instance)//f1040ez/SEQ0100
else ''
 >>
 >>                         "/>
 >>         <xforms:label>No</xforms:label>
 >>         <xforms:item>
 >>             <xforms:name/>
 >>             <xforms:value>X</xforms:value>
 >>         </xforms:item>
 >>     </xforms:select>
 >>
 >>
 > <snip/>
 >
 >
 >
------------------------------------------------------------------------
 >
 >
 > --
 > 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
Reply | Threaded
Open this post in threaded view
|

Re: Does Xforms bind foce ajax

Adrian Baker-2
In reply to this post by Erik Bruchez
Erik Bruchez wrote:

> Adrian Baker wrote:
>> Erik Bruchez wrote:
>>> Adrian Baker wrote:
>>>
>>>> 2. <textarea> elements are not wrapped: is this perhaps a little
>>>> inconsistent?
>>>
>>> Right, that probably should be changed. But so far, <textarea> is
>>> always displayed the same way so this has not been a requirement.
>>>
>>> -Erik
>>
>> Ok - I don't know how complex this change would be, but from an
>> end-user point of view it would make the CSS more consistent.
>
> Yes. I added a bug to track this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=304679&group_id=168&atid=350207 
>
>
> -Erik
The html <select> element should probably be wrapped the same way - this
is particularly useful because of the limitations of applying CSS
directly to the <select> (in IE anyway).



--
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: Re: [Chiba-users] Mutually Exclusive Checkboxes

Erik Bruchez
Administrator
In reply to this post by Richard Braman
About none semantically, but the syntax is just different. XPath uses if
(condition) then expression1 else expression2; XForms 1.0 uses if
(condition, expression1, expression2).

-Erik

Richard Braman wrote:

> What is the difference between XFOrms 'if' and Xpath 'if'   if it is in
> a calculate= attribute of a bind?
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: Friday, February 24, 2006 10:09 AM
> To: [hidden email]
> Cc: [hidden email]; [hidden email];
> [hidden email]
> Subject: Re: [ops-users] Re: [Chiba-users] Mutually Exclusive Checkboxes
>
>
> Richard,
>
> What Joern is saying is correct. OPS uses XPath 2.0 and because there is
>
> conflict between 2.0's if/then/else construct and XForms 1.0's built-in
> if() function, you cannot use the latter directly.
>
> But you can use it with OPS under the name xfif(). Similarly, to try
> with Chiba, you can use the standard XForms if() function. We still
> haven't swallowed that the XForms working group called this function
> if().
>
> We know that good old XPath 1.0 support would be a good compatibility
> move for OPS, but beyond that aspect it is fairly pointless as XPath 2.0
>
> is so much better than 1.0. We have a bug to track this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=303758&grou
> p_id=168&atid=350207
>
> It is on the XForms working group's future agenda to officially look at
> XPath 2.0 integration with XForms.
>
> -Erik
>
> Joern Turner wrote:
>  > Richard,
>  >
>  > you should be aware if you're using standard XForms or not. Orbeon  >
> obviously support non-standard extensions like 'if then else' which are
>> not standard XForms nor be available in Chiba so you just can't simply
>> expect it to work.  >  > Joern  > Richard Braman wrote:  >> The
> examples and Erik sent me (that worked in the sandbox) and the ones  >>
> Ryan came up with both used refs to connect the control to the instance.
>>> My checkboxes use binds.  On mine, the checkboxes aren't mutually  >>
> exclusive, when one is checked the other doesn't uncheck if its  >>
> currently checked.  Both can be unchecked which is fine in this use  >>
> case, but how would you enforce one of them always being checked.  I  >>
> know in the sandbox it works.  I also tried it with the refs like it ran
>>> in the orbeon  sandbox on Chiba and it didn't work (maybe a bug in
>>> chiba).  I understand the set-value syntax.  I agree it works with
> the  >> refs and .  Is this a potential bug?  >>  >>  >> My code:
>  >>     <xforms:model>
>  >>         <xforms:instance id="main-instance">
>  >>             <form xmlns="">
>  >>                 <f1040ez>
>  >>                     <SEQ0010>123456789</SEQ0010>
>  >>                     <SEQ0100>X</SEQ0100>
>  >>                     <SEQ0110/>
>  >>                         </f1040ez>
>  >>             </form>
>  >>         </xforms:instance>
>  >>         <xforms:bind nodeset="instance('main-instance')">
>  >>             <!--PRES ELECTION-->
>  >>             <xforms:bind id="c1-1"
>  >> nodeset="/form/f1040ez/SEQ0100"/>
>  >>             <xforms:bind id="c1-2"
>  >> nodeset="/form/f1040ez/SEQ0110"/>
>  >>         </xforms:bind>
>  >>     </xforms:model>
>  >>
>  >>     <xforms:select appearance="full" bind="c1-1">
>  >>         <xforms:set-value ev:event="xforms-value-changed"
>  >> ref="instance(main-instance)//f1040ez/SEQ0110" value="
>  >>                         if
>  >> (instance(main-instance)//f1040ez/SEQ0100 = '' ) then
>  >> instance(main-instance)//f1040ez/SEQ0110
>  >>                         else ''
>  >>                 "/>
>  >>         <xforms:label>Yes</xforms:label>
>  >>         <xforms:item>
>  >>             <xforms:name/>
>  >>             <xforms:value>X</xforms:value>
>  >>         </xforms:item>
>  >>     </xforms:select>
>  >>     <xforms:select appearance="full" bind="c1-2">
>  >>         <xforms:set-value ev:event="xforms-value-changed"
>  >> ref="instance(main-instance)//f1040ez/SEQ0100" value="
>  >>                         if
>  >> (instance(main-instance)//f1040ez/SEQ0110 = '') then
>  >> instance(main-instance)//f1040ez/SEQ0100
> else ''
>  >>
>  >>                         "/>
>  >>         <xforms:label>No</xforms:label>
>  >>         <xforms:item>
>  >>             <xforms:name/>
>  >>             <xforms:value>X</xforms:value>
>  >>         </xforms:item>
>  >>     </xforms:select>
>  >>
>  >>
>  > <snip/>
>  >
>  >
>  >
> ------------------------------------------------------------------------
>  >
>  >
>  > --
>  > 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



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