I am in the process of migrating one page in my app into the NG XForms
engine. I have several buttons on the page. When I load the page, individually - all of the buttons work as expected. However, if I click one, wait for the action to complete and then click another, the second click does nothing. In fact, once one of the buttons other than the one first clicked does not work, not even the first one that did work functions any more. Is it possible that the casue is that the buttons are loading the same view? I think this might be the cause becasue one of the buttons does not call this page and if I click first one that does (like the delete button) and then clcik the "Cancel" button, the app behaves as expected. In other words, it looks like the JS functionality that facilitates communication between the browser and the OPS server seems to be broken. I tested this on Win using IE 6 and Mac using Firefox. The view xsl snippet with the triggers looks like this: <xforms:submit submission="submit-instance"> <xforms:label>Cancel Edits</xforms:label> </xforms:submit> <xforms:trigger> <xforms:label>Insert</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="../action">insert</xforms:setvalue> <xforms:send submission="insert-details"/> </xforms:action> </xforms:trigger> <xforms:trigger> <xforms:label>Delete</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="../action">delete</xforms:setvalue> <xforms:send submission="delete-detail"/> </xforms:action> </xforms:trigger> I tried to use also the submit element for the buttons like this: <xforms:submit submission="delete-detail"> <xforms:label>Delete</xforms:label> <xforms:setvalue ref="../action">delete</xforms:setvalue> </xforms:submit> ,,,,but it looks like the execution order is wrong here because the setvalue seems to be happening after the XML is submitted. The model submission elements look like this: <xforms:submission ref="instance('main')" id="submit-instance" method="post" action="/view-orders" replace="all"/> <xforms:submission ref="instance('main')" id="insert-details" method="post" action="/edit" replace="all"/> <xforms:submission ref="instance('main')" id="delete-detail" method="post" action="/edit/view-invoice" replace="all"/> And the pageflow relevant segment look like this: <page id="view-orders" path-info="/view-orders" xforms="view-orders-model.xml" model="view-orders.xpl" view="view-orders.xsl"/> <page id="edit-invoice" path-info="/edit" model="ship-notice.xpl" view="ship-notice-view.xsl"> <action when="/edit-actions/action = 'view-orders'"> <result page="view-orders"/> </action> </page> <page id="view-invoice" path-info="/edit/view-invoice" model="ship-notice.xpl" view="ship-notice-view.xsl"/> I tried to match the Bizdoc NG example and noticed that the summary-view.xsl contains model with submission elements with an "instance" ettribute that is not mentioned in the XForms 1.0 spec. Thanks 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 |
Administrator
|
Alex,
Can you send a complete XHTML + XForms example? Ideally, something that can be run in the XForms sandbox. This will accelerate our ability to reproduce the problem here! A few comments below: > I tried to use also the submit element for the buttons like this: > > <xforms:submit submission="delete-detail"> > <xforms:label>Delete</xforms:label> > <xforms:setvalue ref="../action">delete</xforms:setvalue> > </xforms:submit> > > ,,,,but it looks like the execution order is wrong here because the > setvalue seems to be happening after the XML is submitted. Your <xforms:setvalue> requires an @ev:event="DOMActivate" attribute, otherwise it won't run at all. Once you have done this, the setvalue action should take place before the default action for the <xforms:submit> control, which consists in submitting the form. > I tried to match the Bizdoc NG example and noticed that the > summary-view.xsl contains model with submission elements with an > "instance" ettribute that is not mentioned in the XForms 1.0 spec. It is mentioned in the XForms errata: http://www.w3.org/2003/10/REC-xforms-10-20031014-errata.html#E69a -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 |
Erik, sorry to respond this late. I will try to run the form in the
Sandbox before sending it to you. Thanks On Oct 5, 2005, at 7:49 AM, Erik Bruchez wrote: > Alex, > > Can you send a complete XHTML + XForms example? Ideally, something > that can be run in the XForms sandbox. This will accelerate our > ability to reproduce the problem here! > > A few comments below: > > > I tried to use also the submit element for the buttons like this: > > > > <xforms:submit submission="delete-detail"> > > <xforms:label>Delete</xforms:label> > > <xforms:setvalue ref="../action">delete</xforms:setvalue> > > </xforms:submit> > > > > ,,,,but it looks like the execution order is wrong here because the > > setvalue seems to be happening after the XML is submitted. > > Your <xforms:setvalue> requires an @ev:event="DOMActivate" attribute, > otherwise it won't run at all. Once you have done this, the setvalue > action should take place before the default action for the > <xforms:submit> control, which consists in submitting the form. > > > I tried to match the Bizdoc NG example and noticed that the > > summary-view.xsl contains model with submission elements with an > > "instance" ettribute that is not mentioned in the XForms 1.0 spec. > > It is mentioned in the XForms errata: > > http://www.w3.org/2003/10/REC-xforms-10-20031014-errata.html#E69a > > -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 |
Free forum by Nabble | Edit this page |