xforms-value-changed event problem

Posted by hcr on
URL: https://discuss.orbeon.com/xforms-value-changed-event-problem-tp34092.html

Hi.
   I have a problem with xforms-value-changed event. The example code like that:
<html>
    <head>
        <xforms:model>
            <xforms:instance id="instance">
                 <form xmlns="">
                     <person>
                         <name>Mr.Li</name>
                         <age>23</age>
                     </person>
                 </form>
            </xforms:instance> 
 
            <xforms:submission id="next" ref="instance('instance')"
                 method="post" replace="instance" instance="instance"
                 action="/get-next-person"/>
        </xforms:model>
    </head>
    <body>
          <xforms:input ref="instance('instance')/person/name">
              <xforms:label>Name: </xforms:label>
          </xforms:input> 
 
          <xforms:input ref="instance('instance')/person/age">
              <xforms:label>Age: </xforms:label>
              <xforms:action ev:event="xforms-value-changed">
                   <xxforms:script>
                         alert('xforms-value-changed of age');
                   </xxforms:script> 
              <xforms:action> 
          </xforms:input> 
 
          <xforms:trigger>
              <xforms:label>Get Next Person</xforms:label>
              <xforms:action ev:event="DOMActivate">
                   <xforms:send submission="next"/>
              <xforms:action> 
          </xforms:trigger>
    </body>
</html>
 
    The 'xforms-value-changed' event didn't fire when click 'Get Next Person' button. In fact, the value of person's age is changed.
    I test these case:
1.  'replace' of submission control is 'instance', xforms-value-changed event is not fired;
2.  'replace' of submission control is 'node', xforms-value-changed event is fired;
3.  'replace' of submission control is 'text', xforms-value-changed event is fired;
 
    My problem is that: why doesn't fire xforms-value-changed in first case?
 
 



百万玩家同玩的乐园,人气爆发的梦幻西游

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