Re: [Xsltforms-support] xf:setvalue/@ev:event="xforms-enabled" not working
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2013-09-19 19:35:51
|
Hi Eric, The issue is due to the document element not being added in the dependency nodeset: this testcase works if the tested node is not the document element but a subnode: <xf:instance id="xfu-init"> <init xmlns="" status="false"/> </xf:instance> <xf:action ev:event="xforms-ready"> <xf:setvalue ref="instance('xfu-init')/@status">true</xf:setvalue> <xf:recalculate></xf:recalculate> <xf:refresh></xf:refresh> </xf:action> <xf:group ref=".[instance('xfu-init')/@status = 'true']"> I will fix this as soon as possible. Thanks! -Alain Le 19/09/2013 10:26, Eric van der Vlist a écrit : > Hi Alain, > > Le vendredi 06 septembre 2013 à 16:30 +0200, Eric van der Vlist a > écrit : > >> I'll keep you updated on my progress! > A solution should be to make sure controls are in a predicable state > when xforms-ready fires so that you can then track their status. > > I have added an instance: > > <xf:instance id="xfu-init"> > <init xmlns="">false</init> > </xf:instance> > > This instance is updated on xforms-ready: > > <xf:action ev:event="xforms-ready"> > <xf:setvalue ref="instance('xfu-init')">true</xf:setvalue> > <xf:recalculate></xf:recalculate> > <xf:refresh></xf:refresh> > </xf:action> > > And all the controls are embedded in this group: > > <xf:group ref=".[instance('xfu-init') = 'true']"> > .../... > </xf:group> > > For whatever reason, this group is never enabled! > > I am testing with the build directory of your latest commit: > >> commit a7879461945997de25c848aa64f538aa713741ab >> Author: Alain Couthures <ala...@ag...> >> Date: Fri Sep 13 14:31:12 2013 +0200 >> >> Insertion of non-relevant node >> >> Signed-off-by: Alain Couthures <ala...@ag...> > (Complete repro: > http://xformsunit.org/trac/browser/sandbox/track-xforms-enable-disable-workaround.xhtml?rev=35d9c347f9a7e419cc44b306be99d147e33a4de5 ) > > Thanks, > > Eric > > |