does an insert on xforms-select event necessarily cancel select?

Hi,

i would like to invoke an insert (on another data node) when the user
selects an item in a select form control. however with an insert the
normal select doesn't work anymore. i searched through the spec's and
i couldn't find any reason why this should block the normal capture/
bubbling of xforms-select and cancel subsequent events...

is this a current limitation of the plugin or did i miss something in
the spec?

thanks in advance

claude

0
bernstein
2/10/2008 2:14:56 AM
mozilla.dev.tech.xforms 695 articles. 0 followers. Post Follow

7 Replies
564 Views

Similar Articles

[PageSpeed] 19

On Feb 10, 3:14=A0am, bernstein <clauden...@gmail.com> wrote:
> Hi,
>
> i would like to invoke an insert (on another data node) when the user
> selects an item in a select form control. however with an insert the
> normal select doesn't work anymore. i searched through the spec's and
> i couldn't find any reason why this should block the normal capture/
> bubbling of xforms-select and cancel subsequent events...
>
> is this a current limitation of the plugin or did i miss something in
> the spec?
>
> thanks in advance
>
> claude

forgot to attach relevant code :

<repeat nodeset=3D"instance('values')/types/*/*[field]">
	<select ref=3D"." appearance=3D"full">
		<label ref=3D"@label"/>
		<itemset nodeset=3D"field">
			<label ref=3D"@label"/>
			<value ref=3D"@value"/>
			<action ev:event=3D"xforms-select" ev:propagate=3D"continue">
				<insert nodeset=3D"instance('choice')/sort/*" origin=3D"current()/
options" at=3D"current()/options/@position"/>
			</action>
			<action ev:event=3D"xforms-deselect" ev:propagate=3D"continue">
				<delete nodeset=3D"instance('choice')/sort/options[current()/
@position]"/>
			</action>
		</itemset>
	</select>
</repeat>
0
bernstein
2/10/2008 2:17:34 AM
Hi Claude,

I would suggest simplifying your testcase to find where the problem is. 
  First I would try using a select that contains xf:items and not living 
in a xf:repeat.  If that works, then use a select with a xf:itemset that 
doesn't live in a xf:repeat.  Then put it in the repeat.  With repeats 
and itemsets there is a lot of generated anonymous content that could 
affect eventing.  If you can narrow down the scenario, then it'll be 
easier for us to find the bug.

--Aaron

bernstein wrote:
> On Feb 10, 3:14 am, bernstein <clauden...@gmail.com> wrote:
>> Hi,
>>
>> i would like to invoke an insert (on another data node) when the user
>> selects an item in a select form control. however with an insert the
>> normal select doesn't work anymore. i searched through the spec's and
>> i couldn't find any reason why this should block the normal capture/
>> bubbling of xforms-select and cancel subsequent events...
>>
>> is this a current limitation of the plugin or did i miss something in
>> the spec?
>>
>> thanks in advance
>>
>> claude
> 
> forgot to attach relevant code :
> 
> <repeat nodeset="instance('values')/types/*/*[field]">
> 	<select ref="." appearance="full">
> 		<label ref="@label"/>
> 		<itemset nodeset="field">
> 			<label ref="@label"/>
> 			<value ref="@value"/>
> 			<action ev:event="xforms-select" ev:propagate="continue">
> 				<insert nodeset="instance('choice')/sort/*" origin="current()/
> options" at="current()/options/@position"/>
> 			</action>
> 			<action ev:event="xforms-deselect" ev:propagate="continue">
> 				<delete nodeset="instance('choice')/sort/options[current()/
> @position]"/>
> 			</action>
> 		</itemset>
> 	</select>
> </repeat>
0
Aaron
2/11/2008 6:21:47 PM
Hi Aaron

i've put together a simple testcase (i can't think of a simplr one...)
and the behaviour described above still appears. still i am not
certain it really is a bug however to me it is unexpected behaviour.

thanks
claude

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
1.1//EN"
	"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en"
	xmlns:ev=3D"http://www.w3.org/2001/xml-events"
	xmlns:xi=3D"http://www.w3.org/2001/XInclude"
	xmlns:xf=3D"http://www.w3.org/2002/xforms">
<head>
	<xf:model id=3D"selection">
		<xf:instance id=3D"choice">
			<selection xmlns=3D"">
				<sort>
					<item label=3D"dummy"/>
				</sort>
				<types/>
			</selection>
		</xf:instance>
	</xf:model>
</head>
<body>
	<group model=3D"selection" xmlns=3D"http://www.w3.org/2002/xforms">
		<select ref=3D"types" appearance=3D"full">
			<label>testcase</label>
			<item>
				<label>testitem</label>
				<value>cool</value>
				<insert ev:event=3D"xforms-select" nodeset=3D"../sort/item[1]"/>
			</item>
		</select>
	</group>
</body>
</html>


On Feb 11, 7:21=A0pm, Aaron Reed <aar...@us.ibm.com> wrote:
> Hi Claude,
>
> I would suggest simplifying your testcase to find where the problem is.
> =A0 First I would try using a select that contains xf:items and not living=

> in a xf:repeat. =A0If that works, then use a select with a xf:itemset that=

> doesn't live in a xf:repeat. =A0Then put it in the repeat. =A0With repeats=

> and itemsets there is a lot of generated anonymous content that could
> affect eventing. =A0If you can narrow down the scenario, then it'll be
> easier for us to find the bug.
>
> --Aaron
>
> bernstein wrote:
> > On Feb 10, 3:14 am, bernstein <clauden...@gmail.com> wrote:
> >> Hi,
>
> >> i would like to invoke an insert (on another data node) when the user
> >> selects an item in a select form control. however with an insert the
> >> normal select doesn't work anymore. i searched through the spec's and
> >> i couldn't find any reason why this should block the normal capture/
> >> bubbling of xforms-select and cancel subsequent events...
>
> >> is this a current limitation of the plugin or did i miss something in
> >> the spec?
>
> >> thanks in advance
>
> >> claude
>
> > forgot to attach relevant code :
>
> > <repeat nodeset=3D"instance('values')/types/*/*[field]">
> > =A0 =A0<select ref=3D"." appearance=3D"full">
> > =A0 =A0 =A0 =A0 =A0 =A0<label ref=3D"@label"/>
> > =A0 =A0 =A0 =A0 =A0 =A0<itemset nodeset=3D"field">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<label ref=3D"@label"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<value ref=3D"@value"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<action ev:event=3D"xforms-select=
" ev:propagate=3D"continue">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<insert nodeset=
=3D"instance('choice')/sort/*" origin=3D"current()/
> > options" at=3D"current()/options/@position"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</action>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<action ev:event=3D"xforms-desele=
ct" ev:propagate=3D"continue">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<delete nodeset=
=3D"instance('choice')/sort/options[current()/
> > @position]"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</action>
> > =A0 =A0 =A0 =A0 =A0 =A0</itemset>
> > =A0 =A0</select>
> > </repeat>

0
bernstein
2/23/2008 2:19:40 AM
Hi Aaron

i've put together a simple testcase (i can't think of a simplr one...)
and the behaviour described above still appears. still i am not
certain it really is a bug however to me it is unexpected behaviour.

thanks
claude

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
1.1//EN"
	"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en"
	xmlns:ev=3D"http://www.w3.org/2001/xml-events"
	xmlns:xi=3D"http://www.w3.org/2001/XInclude"
	xmlns:xf=3D"http://www.w3.org/2002/xforms">
<head>
	<xf:model id=3D"selection">
		<xf:instance id=3D"choice">
			<selection xmlns=3D"">
				<sort>
					<item label=3D"dummy"/>
				</sort>
				<types/>
			</selection>
		</xf:instance>
	</xf:model>
</head>
<body>
	<group model=3D"selection" xmlns=3D"http://www.w3.org/2002/xforms">
		<select ref=3D"types" appearance=3D"full">
			<label>testcase</label>
			<item>
				<label>testitem</label>
				<value>cool</value>
				<insert ev:event=3D"xforms-select" nodeset=3D"../sort/item[1]"/>
			</item>
		</select>
	</group>
</body>
</html>


On Feb 11, 7:21=A0pm, Aaron Reed <aar...@us.ibm.com> wrote:
> Hi Claude,
>
> I would suggest simplifying your testcase to find where the problem is.
> =A0 First I would try using a select that contains xf:items and not living=

> in a xf:repeat. =A0If that works, then use a select with a xf:itemset that=

> doesn't live in a xf:repeat. =A0Then put it in the repeat. =A0With repeats=

> and itemsets there is a lot of generated anonymous content that could
> affect eventing. =A0If you can narrow down the scenario, then it'll be
> easier for us to find the bug.
>
> --Aaron
>
> bernstein wrote:
> > On Feb 10, 3:14 am, bernstein <clauden...@gmail.com> wrote:
> >> Hi,
>
> >> i would like to invoke an insert (on another data node) when the user
> >> selects an item in a select form control. however with an insert the
> >> normal select doesn't work anymore. i searched through the spec's and
> >> i couldn't find any reason why this should block the normal capture/
> >> bubbling of xforms-select and cancel subsequent events...
>
> >> is this a current limitation of the plugin or did i miss something in
> >> the spec?
>
> >> thanks in advance
>
> >> claude
>
> > forgot to attach relevant code :
>
> > <repeat nodeset=3D"instance('values')/types/*/*[field]">
> > =A0 =A0<select ref=3D"." appearance=3D"full">
> > =A0 =A0 =A0 =A0 =A0 =A0<label ref=3D"@label"/>
> > =A0 =A0 =A0 =A0 =A0 =A0<itemset nodeset=3D"field">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<label ref=3D"@label"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<value ref=3D"@value"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<action ev:event=3D"xforms-select=
" ev:propagate=3D"continue">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<insert nodeset=
=3D"instance('choice')/sort/*" origin=3D"current()/
> > options" at=3D"current()/options/@position"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</action>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<action ev:event=3D"xforms-desele=
ct" ev:propagate=3D"continue">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<delete nodeset=
=3D"instance('choice')/sort/options[current()/
> > @position]"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</action>
> > =A0 =A0 =A0 =A0 =A0 =A0</itemset>
> > =A0 =A0</select>
> > </repeat>

0
bernstein
2/23/2008 2:20:00 AM
Thanks Claude!  Much easier to handle.

You have found a bug in our code.  During the processing of the 
xforms-select event the xf:insert happens which causes xforms-refresh to 
fire.  However, we assume that during xf:select processing that we won't 
get a xforms-refresh until we've updated the bound node.  So this 
unexpected refresh is screwing up our logic and we end up deselecting 
the newly selected item which means that the bound node for the select 
is never updated.

However, it isn't completely clear what SHOULD happen.  In the way I 
interpret the spec, the bound node shouldn't be changed until AFTER the 
xforms-select is processed so I think that we should see two 
xforms-refresh fire (one for xf:insert, one because the bound node of 
the select has changed).  But no other processor does this.  In fact, 
only formsPlayer even comes close to handling this correctly yet it only 
fires one refresh which leads me to believe that they actually update 
the bound node before they fire xforms-select (though, of course, I 
can't be positive of this).

I opened a bug on this issue if you'd like to cc yourself on it -> 
https://bugzilla.mozilla.org/show_bug.cgi?id=420394.  I will also start 
a thread on the W3C mailing list to try to resolve what should happen.

Thanks again for reporting your problem and making such a good minimized 
testcase!

--Aaron

bernstein wrote:
> Hi Aaron
> 
> i've put together a simple testcase (i can't think of a simplr one...)
> and the behaviour described above still appears. still i am not
> certain it really is a bug however to me it is unexpected behaviour.
> 
> thanks
> claude
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
> 1.1//EN"
> 	"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
> 	xmlns:ev="http://www.w3.org/2001/xml-events"
> 	xmlns:xi="http://www.w3.org/2001/XInclude"
> 	xmlns:xf="http://www.w3.org/2002/xforms">
> <head>
> 	<xf:model id="selection">
> 		<xf:instance id="choice">
> 			<selection xmlns="">
> 				<sort>
> 					<item label="dummy"/>
> 				</sort>
> 				<types/>
> 			</selection>
> 		</xf:instance>
> 	</xf:model>
> </head>
> <body>
> 	<group model="selection" xmlns="http://www.w3.org/2002/xforms">
> 		<select ref="types" appearance="full">
> 			<label>testcase</label>
> 			<item>
> 				<label>testitem</label>
> 				<value>cool</value>
> 				<insert ev:event="xforms-select" nodeset="../sort/item[1]"/>
> 			</item>
> 		</select>
> 	</group>
> </body>
> </html>
> 
> 
> On Feb 11, 7:21 pm, Aaron Reed <aar...@us.ibm.com> wrote:
>> Hi Claude,
>>
>> I would suggest simplifying your testcase to find where the problem is.
>>   First I would try using a select that contains xf:items and not living
>> in a xf:repeat.  If that works, then use a select with a xf:itemset that
>> doesn't live in a xf:repeat.  Then put it in the repeat.  With repeats
>> and itemsets there is a lot of generated anonymous content that could
>> affect eventing.  If you can narrow down the scenario, then it'll be
>> easier for us to find the bug.
>>
>> --Aaron
>>
>> bernstein wrote:
>>> On Feb 10, 3:14 am, bernstein <clauden...@gmail.com> wrote:
>>>> Hi,
>>>> i would like to invoke an insert (on another data node) when the user
>>>> selects an item in a select form control. however with an insert the
>>>> normal select doesn't work anymore. i searched through the spec's and
>>>> i couldn't find any reason why this should block the normal capture/
>>>> bubbling of xforms-select and cancel subsequent events...
>>>> is this a current limitation of the plugin or did i miss something in
>>>> the spec?
>>>> thanks in advance
>>>> claude
>>> forgot to attach relevant code :
>>> <repeat nodeset="instance('values')/types/*/*[field]">
>>>    <select ref="." appearance="full">
>>>            <label ref="@label"/>
>>>            <itemset nodeset="field">
>>>                    <label ref="@label"/>
>>>                    <value ref="@value"/>
>>>                    <action ev:event="xforms-select" ev:propagate="continue">
>>>                            <insert nodeset="instance('choice')/sort/*" origin="current()/
>>> options" at="current()/options/@position"/>
>>>                    </action>
>>>                    <action ev:event="xforms-deselect" ev:propagate="continue">
>>>                            <delete nodeset="instance('choice')/sort/options[current()/
>>> @position]"/>
>>>                    </action>
>>>            </itemset>
>>>    </select>
>>> </repeat>
> 
0
Aaron
3/1/2008 12:07:24 AM
On Mar 1, 2:07=A0am, Aaron Reed <aar...@us.ibm.com> wrote:
> Thanks Claude! =A0Much easier to handle.
>
> You have found a bug in our code. =A0During the processing of the
> xforms-select event the xf:insert happens which causes xforms-refresh to
> fire. =A0However, we assume that during xf:select processing that we won't=

> get a xforms-refresh until we've updated the bound node. =A0So this
> unexpected refresh is screwing up our logic and we end up deselecting
> the newly selected item which means that the bound node for the select
> is never updated.
>
> However, it isn't completely clear what SHOULD happen. =A0In the way I
> interpret the spec, the bound node shouldn't be changed until AFTER the
> xforms-select is processed so I think that we should see two
> xforms-refresh fire (one for xf:insert, one because the bound node of
> the select has changed). =A0But no other processor does this. =A0In fact,
> only formsPlayer even comes close to handling this correctly yet it only
> fires one refresh which leads me to believe that they actually update
> the bound node before they fire xforms-select (though, of course, I
> can't be positive of this).
>
> I opened a bug on this issue if you'd like to cc yourself on it ->https://=
bugzilla.mozilla.org/show_bug.cgi?id=3D420394. =A0I will also start
> a thread on the W3C mailing list to try to resolve what should happen.
>
> Thanks again for reporting your problem and making such a good minimized
> testcase!
>
> --Aaron
>
> bernstein wrote:
> > Hi Aaron
>
> > i've put together a simple testcase (i can't think of a simplr one...)
> > and the behaviour described above still appears. still i am not
> > certain it really is a bug however to me it is unexpected behaviour.
>
> > thanks
> > claude
>
> > <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
> > 1.1//EN"
> > =A0 =A0"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
> > <html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en"
> > =A0 =A0xmlns:ev=3D"http://www.w3.org/2001/xml-events"
> > =A0 =A0xmlns:xi=3D"http://www.w3.org/2001/XInclude"
> > =A0 =A0xmlns:xf=3D"http://www.w3.org/2002/xforms">
> > <head>
> > =A0 =A0<xf:model id=3D"selection">
> > =A0 =A0 =A0 =A0 =A0 =A0<xf:instance id=3D"choice">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<selection xmlns=3D"">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<sort>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<=
item label=3D"dummy"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</sort>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<types/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</selection>
> > =A0 =A0 =A0 =A0 =A0 =A0</xf:instance>
> > =A0 =A0</xf:model>
> > </head>
> > <body>
> > =A0 =A0<group model=3D"selection" xmlns=3D"http://www.w3.org/2002/xforms=
">
> > =A0 =A0 =A0 =A0 =A0 =A0<select ref=3D"types" appearance=3D"full">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<label>testcase</label>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<item>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<label>testitem</=
label>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<value>cool</valu=
e>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<insert ev:event=
=3D"xforms-select" nodeset=3D"../sort/item[1]"/>
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</item>
> > =A0 =A0 =A0 =A0 =A0 =A0</select>
> > =A0 =A0</group>
> > </body>
> > </html>
>
> > On Feb 11, 7:21 pm, Aaron Reed <aar...@us.ibm.com> wrote:
> >> Hi Claude,
>
> >> I would suggest simplifying your testcase to find where the problem is.=

> >> =A0 First I would try using a select that contains xf:items and not liv=
ing
> >> in a xf:repeat. =A0If that works, then use a select with a xf:itemset t=
hat
> >> doesn't live in a xf:repeat. =A0Then put it in the repeat. =A0With repe=
ats
> >> and itemsets there is a lot of generated anonymous content that could
> >> affect eventing. =A0If you can narrow down the scenario, then it'll be
> >> easier for us to find the bug.
>
> >> --Aaron
>
> >> bernstein wrote:
> >>> On Feb 10, 3:14 am, bernstein <clauden...@gmail.com> wrote:
> >>>> Hi,
> >>>> i would like to invoke an insert (on another data node) when the user=

> >>>> selects an item in a select form control. however with an insert the
> >>>> normal select doesn't work anymore. i searched through the spec's and=

> >>>> i couldn't find any reason why this should block the normal capture/
> >>>> bubbling of xforms-select and cancel subsequent events...
> >>>> is this a current limitation of the plugin or did i miss something in=

> >>>> the spec?
> >>>> thanks in advance
> >>>> claude
> >>> forgot to attach relevant code :
> >>> <repeat nodeset=3D"instance('values')/types/*/*[field]">
> >>> =A0 =A0<select ref=3D"." appearance=3D"full">
> >>> =A0 =A0 =A0 =A0 =A0 =A0<label ref=3D"@label"/>
> >>> =A0 =A0 =A0 =A0 =A0 =A0<itemset nodeset=3D"field">
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<label ref=3D"@label"/>
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<value ref=3D"@value"/>
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<action ev:event=3D"xforms-sele=
ct" ev:propagate=3D"continue">
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<insert nodeset=
=3D"instance('choice')/sort/*" origin=3D"current()/
> >>> options" at=3D"current()/options/@position"/>
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</action>
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<action ev:event=3D"xforms-dese=
lect" ev:propagate=3D"continue">
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<delete nodeset=
=3D"instance('choice')/sort/options[current()/
> >>> @position]"/>
> >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0</action>
> >>> =A0 =A0 =A0 =A0 =A0 =A0</itemset>
> >>> =A0 =A0</select>
> >>> </repeat>

i finally read up on the discussion on the w3 list. however i'm not
sure if i could follow the discussion though. do i understand
correctly that it the xf:insert should trigger an insert (as it is
now) and then the bound node should change (which is currently not
done)  ?

well if so i have two follow up questions :

A) would it be possible to cancel the changing of the bound node
(effectively cancel the xforms-select) when the xforms-insert is fired
(maybe through ev:propagate) ?

B) although i don't see a use case : what would happen if there where
more than one xf:insert (eg. a second xf:insert right after the first
one) ? would all insert's be handled in order of occurrence and at the
end the bound node will be changed and the ui updated?

claude
0
bernstein
4/15/2008 1:53:04 AM
Hi claude,

My answers below.

bernstein wrote:
> 
> i finally read up on the discussion on the w3 list. however i'm not
> sure if i could follow the discussion though. do i understand
> correctly that it the xf:insert should trigger an insert (as it is
> now) and then the bound node should change (which is currently not
> done)  ?

Right, the xf:insert will happen due to the xforms-select firing and 
this xf:insert will happen before the bound node is changed.  So you 
should see:

xforms-select
xf:insert
xforms-rebuild
xforms-recalculate
xforms-revalidate
xforms-refresh
bound node changes due to selecting item
xforms-recalculate
xforms-revalidate
xforms-refresh

> 
> well if so i have two follow up questions :
> 
> A) would it be possible to cancel the changing of the bound node
> (effectively cancel the xforms-select) when the xforms-insert is fired
> (maybe through ev:propagate) ?
> 

Nope.  xforms-select and xforms-deselect are for notification only and 
are not cancelable per spec (http://www.w3.org/TR/xforms11/#evt-select).

> B) although i don't see a use case : what would happen if there where
> more than one xf:insert (eg. a second xf:insert right after the first
> one) ? would all insert's be handled in order of occurrence and at the
> end the bound node will be changed and the ui updated?
> 

If you have two xf:inserts both fired due to xforms-select, then both 
would happen before the bound node changed due to the item selection. 
However, the order of their firing is only guaranteed if they are 
contained inside a xf:action and the xf:action is the real handler for 
the xforms-select event.  Otherwise if they are just two xf:inserts both 
listening for xforms-select then there will be no guarantee which will 
will be handled first.

If you want the xf:insert to overwrite the value of the xf:select's 
bound node, then it would be better to have them handle 
xforms-value-changed so that they happen after the bound node is 
changed.  However, you'll only want them to fire if the 
xforms-value-change was preceded by a xforms-select otherwise you'll end 
up in an infinite loop.

--Aaron

> claude
0
Aaron
4/16/2008 9:09:09 PM
Reply:

Similar Artilces:

xforms:select & xforms:select1 events
Dear Collective, I'm attempting to fire an event when a item from a dropdown is selected. The below code, taken from a previous post, works correctly for an "xforms:select" block. Further below, I tried to do the same for an "xforms:select1" block, but it doesn't work. <xforms:switch> <xforms:case id="case1"> <xforms:label>Case 1</xforms:label> </xforms:case> <xforms:case id="case2"> <xforms:label>Case 2</xforms:label> </xforms:case> </xforms:switch> ...

insert select and select into
Hello, I am using temp tables to generate a report. I created most of the temp tables and then use insert select. I found for one, when I use insert select, I get a different query plan than if I use select into. The select into get a much better performance. The problem is I get dead locks on the statement. Is there anything I can do to change this behavior? Thanks, Josh Manfred ...

SELECT from SELECT
Hi! I remember seeing an example where you can do a select from a nested select, but I cannot seem to make it work. So it would be something like this: select max( name ) from ( select name from customer union select name from vendor ) Was I dreaming I saw that? Thanks! D In article <4500243f@forums-2-dub>, daniel_AT_infrontsoftware_DOT_com@N0SPAM.com says... > Hi! > > I remember seeing an example where you can do a select from a nested > select, but I cannot seem to make it work. No, you weren't. Try (UNTESTED!) adding a...

select into vs insert/select
I am looking for ways to speed up a procedure, which as a part of an overnight processing is called about 3000 times. The procedure begins by inserting about 20 rows into a temp table created outside of the proc. I thought that this may be better done by a select into statement because it is minimally logged etc. I am running the two versions of the statement (insert/select and select into) 2700 times on a quiet server and it seems that the insert/select is a bit faster, a second or two. Any ideas what I'm doing wrong? Is it my assumption about select into being fas...

Select into vs. insert ... select ...
Hello, I am using temp tables to generate a report. I created most of the temp tables and then use insert select. I found for one that when I use insert select I get a different query plan that if I use select into. The select into get a much better performance. The problem is I get dead lock on the statement. Is there anything I can do to change this behavior? Thanks, Josh Manfred SELECT INTO #temp is a non-logged operation. This can provide a performance increase. However, one downside is that you may end up with a lot of contention on system tables. (I didn...

Why is the select saying selected after an item is selected?
This was a whitelisting issue due to a software upgrade at hostgator..  Nothing wrong with my code..Scot King SEO Software Tool | Search Engine Optimization"Get your page rank high"  huh? It is smart to put your question in the body and not just in the title. Have no idea what your question is or if it even a question.Eric Pascarello.com | Twitter epascarello | LinkedIn use thisddl.options[ddl.selectedIndex].selected = false; //Clear the selection ddl.options[1].selected = trueMAKMark as Answer if this reply helps youMVP ASP/ASP.NetASP.Net Hosting : Host DepotMy Sit...

superreview cancelled: [Bug 358714] implement accessible object for xforms minimal select in xhtml context
alexander surkov <surkov.alexander@gmail.com> has cancelled alexander surkov <surkov.alexander@gmail.com>'s request for superreview: Bug 358714: implement accessible object for xforms minimal select in xhtml context https://bugzilla.mozilla.org/show_bug.cgi?id=358714 Attachment 250416: patch3 https://bugzilla.mozilla.org/attachment.cgi?id=250416&action=edit ------- Additional Comments from alexander surkov <surkov.alexander@gmail.com> I forgot to implement nsIAccessibleProvider for xforms:item and xforms:choices. Fixed. ...

SqlDataSource events selecting and selected not work
When I handle a event for selecting to change the value of a parameter it does not use the new value and the selected event is never called. What am I doing wrong?   protected void OptionListSource_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { string productID = Request.QueryString["p"].ToString(); SqlDataSourceView Source = (SqlDataSourceView)sender; Source.SelectParameters["ProductID"].DefaultValue=productID; } protected void OptionListSource_Selected(object sender, SqlDataSourceStatusEventArgs e) { SqlDataSourceView Source = (SqlDataSourceView)sender; } ...

SqlDataSource Selecting/Selected events not firing
Hi,I have a SqlDataSource and am trying to establish if it returns rows using the selected event e.AffectedRows statement. Unfortunately the selected event does not fire. I am using a stored procedure with 2 parameters:applicantID - Int32 - Parameter source from control label textissueStatus - Int16 - Parameter source 'None' default value = 1 When i test it during configuration it returns 1 row as expected. I am manually running the DataSource using ds.DataBind(); after a button click. Anyone know why its not firing the event?Thanks  Solved it. The problem was with...

superreview cancelled: [Bug 358713] implement accessible objects for xforms selects of full apperance : [Attachment 249345] patch6
alexander surkov <surkov.alexander@gmail.com> has cancelled alexander surkov <surkov.alexander@gmail.com>'s request for superreview: Bug 358713: implement accessible objects for xforms selects of full apperance https://bugzilla.mozilla.org/show_bug.cgi?id=358713 Attachment 249345: patch6 https://bugzilla.mozilla.org/attachment.cgi?id=249345&action=edit ------- Additional Comments from alexander surkov <surkov.alexander@gmail.com> I'll file new patch ...

superreview cancelled: [Bug 181105] Selection behaves badly when SpellCheck Selection is on : [Attachment 141155] Make alternate selection types render properly
Neil Deakin <enndeakin@sympatico.ca> has cancelled Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 181105: Selection behaves badly when SpellCheck Selection is on http://bugzilla.mozilla.org/show_bug.cgi?id=181105 Attachment 141155: Make alternate selection types render properly http://bugzilla.mozilla.org/attachment.cgi?id=141155&action=edit ...

remote server select passed through/insert ... select not
This statement is passed through to a remote oracle server: select p.product_id, cast(so.fixed_std_time as int) + cast(so.fixed_std_time_hh as int)*60 + cast(so.fixed_std_time_dd as int)*1440 as fixed_std_time_minutes, cast(cast(socextgauge.operation_char_val as decimal(14,7))*.0000001 as decimal(7,7)) as gauge, cast(socpass.operation_char_val as int) as passnumber, cast(socalloy.operation_char_val as char(6)) as alloy from ppsprod.product p join ppsprod.standard_operation so on p.product_id=so.product_id and required_res_1='811' join ppsprod.standard_op_ch...

Assigning Select Parameters in Selecting event too late
I had some code in the SQLDataSource selecting() event which set all my selectparameters to control values on the page (e.g. SQLDataSource.SelectParameters(0).DefaultValue = ....). However I was finding that after databinding, the SQLDataSource was only actually sending the newly assigned parameters in the 2nd call to the stored procedure. So the underlying rule seems to be don't set your select parameters in the Selecting() event of your SQLDataSource as this is too late.  I've moved it into a button click handler before the databind() was called on my GridView.  I'm s...

Raise Event when a selected date is selected again in Calendar
Hi all,When I view source of the rendered page that contains a calendar control, I see it's a table, with a child table where each date is a table cell calling the all powerful __dopostback function with the calendar id as the event target and a unique numeric string as the event argument.Since the selected date is also containing the dopostback function, could that be exploited to call a routine during page load due to postback.I have come upto this and got stuck after that.'aspx.vb code snippet:If TypeOf sender Is Control Then     dim ctl as control  &...

Web resources about - does an insert on xforms-select event necessarily cancel select? - mozilla.dev.tech.xforms

Resources last updated: 11/24/2015 5:42:27 AM