Thread: [Xsltforms-support] Two defects in xforms.close method
Brought to you by:
alain-couthures
From: Ivan P. <ipo...@ma...> - 2011-04-18 10:16:01
|
Dear Alain, as soon as our date picker bugfix proved to be useful, maybe you will find some time to include another piece of our code in /trunk, so we will not have to continue merging our patches into your code? Thanks a lot in advance! As I wrote once, we are dependent on xforms.close() method, because we are showing and hiding XForms dynamically using AJAX without page reload, and the problem is that standard version of xforms.close() actually doesn't clean up everything! This causes two problems I reported earlier, this one: http://sourceforge.net/mailarchive/forum.php?thread_name=4D332B30.8070300%40mail.ru&forum_name=xsltforms-support and the first of the two given here (thanks God, we're completely finished with the second one): http://sourceforge.net/mailarchive/forum.php?thread_name=4D3A0CE5.4020709%40mail.ru&forum_name=xsltforms-support We solved both of them, here is a solution: in xforms.close method, after xforms.dispose(... (1627) the following code should be inserted: Calendar.INSTANCE = null; /*so the next time this object will be recreated and all event handlers will be bound properly*/ dropHasXFElement(document.documentElement); where /*Just full recursion over the whole DOM to remove hasXFElement attributes that will spoil everything the next time!!*/ function dropHasXFElement(element){ element.hasXFElement = null; var subelement = element.firstChild; while(subelement){ if (subelement.nodeType == NodeType.ELEMENT) dropHasXFElement(subelement); subelement = subelement.nextSibling; } } Regards, Ivan Ponomarev. |
From: Alain C. <ala...@ag...> - 2011-04-18 19:44:54
|
Ivan, I have added the Calendar.INSTANCE cleaning and I have integrated your suggestion about the hasXFElement directly into xforms.dispose() into Rev 500. Thank you for your feedbacks! -Alain Le 18/04/2011 12:15, Ivan Ponomarev a écrit : > Dear Alain, > > as soon as our date picker bugfix proved to be useful, maybe you will > find some time to include another piece of our code in /trunk, so we > will not have to continue merging our patches into your code? Thanks a > lot in advance! > > As I wrote once, we are dependent on xforms.close() method, because we > are showing and hiding XForms dynamically using AJAX without page > reload, and the problem is that standard version of xforms.close() > actually doesn't clean up everything! > > This causes two problems I reported earlier, this one: > > http://sourceforge.net/mailarchive/forum.php?thread_name=4D332B30.8070300%40mail.ru&forum_name=xsltforms-support > > and the first of the two given here (thanks God, we're completely > finished with the second one): > http://sourceforge.net/mailarchive/forum.php?thread_name=4D3A0CE5.4020709%40mail.ru&forum_name=xsltforms-support > > We solved both of them, here is a solution: > > in xforms.close method, after xforms.dispose(... (1627) the following > code should be inserted: > > Calendar.INSTANCE = null; /*so the next time this object will be > recreated and all event handlers will be bound properly*/ > dropHasXFElement(document.documentElement); > > where > > /*Just full recursion over the whole DOM to remove hasXFElement > attributes that will spoil everything the next time!!*/ > function dropHasXFElement(element){ > element.hasXFElement = null; > var subelement = element.firstChild; > while(subelement){ > if (subelement.nodeType == NodeType.ELEMENT) > dropHasXFElement(subelement); > subelement = subelement.nextSibling; > } > } > > > Regards, > > Ivan Ponomarev. > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Ivan P. <ipo...@ma...> - 2011-04-19 08:37:44
|
Hello, Alain, thank you very much for this and thanks a lot for a perfect product! It seems that our company is the only one that uses XSLTForms in AJAX/GWT environment. Anyway, after these small tweaks XSLTForms work perfectly well with series of completely different forms being dynamically generated / cleaned up on page without page reload. Regards, Ivan Ponomarev. On 18.04.2011 23:46, Alain Couthures wrote: > Ivan, > > I have added the Calendar.INSTANCE cleaning and I have integrated your > suggestion about the hasXFElement directly into xforms.dispose() into > Rev 500. > > Thank you for your feedbacks! |
From: Alain C. <ala...@ag...> - 2011-04-19 10:58:09
|
Hello Ivan, I know already that other companies are using XSLTForms with AJAX but they didn't encounter the same issues... There are more and more interesting implementations of XML technologies based on GWT and integrating them with XSLTForms might be very important in fact. Is it possible for you to post a link to a demo page? Thanks! -Alain Le 19/04/2011 10:37, Ivan Ponomarev a écrit : > Hello, Alain, > > thank you very much for this and thanks a lot for a perfect product! > > It seems that our company is the only one that uses XSLTForms in > AJAX/GWT environment. Anyway, after these small tweaks XSLTForms work > perfectly well with series of completely different forms being > dynamically generated / cleaned up on page without page reload. > > Regards, > > Ivan Ponomarev. |