- From: John Boyer <boyerj@ca.ibm.com>
- Date: Thu, 12 Apr 2007 16:07:52 -0700
- To: www-forms-editor@w3.org
- Message-ID: <OFFCD33581.88EA82F2-ON882572BB.007E7B82-882572BB.007F1188@ca.ibm.com>
It is supposed to be the case that you can setfocus to a control that is
within a repeat, like this:
<trigger>
<label>Send me to I2</label>
<setfocus ev:event="DOMActivate" control="I2"/>
</trigger>
<repeat id="R" nodeset="a/b/c">
<input id="I1" ...> ...</input>
<input id="I2" ...> ...</input>
</repeat>
But the specification does not say what happens when the focus is sent to
I2 on a newly created repeat item:
<trigger>
<label>Send me to I2</label>
<action ev:event="DOMActivate" >
<insert nodeset="a/b/c" ... />
<setfocus control="I2"/>
</action>
</trigger>
I believe that the focus should still arrive on I2 in the newly created
set of UI controls, but this is because I believe that setfocus has a
deferred behavior that is imposed at the end of xforms-refresh.
This deferred behavior is not specified, so I wonder what other
implementations are doing. Either way, clearly the above markup (the
second trigger) should not fail to set the focus, but a literal reading of
the current spec would seem to imply that it does because the repeat index
of R is increased as soon as the insert occurs, yet the corresponding
controls do not exist until the next xforms-refresh.
John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com
Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Received on Thursday, 12 April 2007 23:08:02 UTC