Bug in Wiring-UI

26 views
Skip to first unread message

Andreas Joseph Krogh

unread,
Jun 26, 2015, 4:10:31 AM6/26/15
to lif...@googlegroups.com
Hi Lifters.
 
I've finally chased down a bug which has haunted our project for some time.
 
A minimal project is here which exposes the issue: https://github.com/andreak/wiring-bug
 
The problem is that wiring-content isn't replaced correctly when it is part of an AJAX-response and the AJAX-response is generated in a JsCmd.toJsCmd when toJsCmd is a `def`. The Wiring-content is then first replaced on the subsequent AJAX-response.
 
Changing the toJsCmd to a `val` makes everything work correctly and the wiring-content is replaced on the first AJAX-response.
 
For some reason, when the AJAX-response is generated in "def toJsCmd" it is not included as part the current AJAX-response.
 
Anyone familiar with the Wiring-code willing to take a look?
 
Thanks.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963

Antonio Salazar Cardozo

unread,
Jul 3, 2015, 12:15:00 PM7/3/15
to lif...@googlegroups.com, and...@visena.com
I'm not familiar, but if and when I get time I'd probably be interested. Seems like a cool bug.

Can you open an issue on the repo?
Thanks,
Antonio

Andreas Joseph Krogh

unread,
Jul 3, 2015, 6:34:54 PM7/3/15
to lif...@googlegroups.com
På fredag 03. juli 2015 kl. 18:15:00, skrev Antonio Salazar Cardozo <savedf...@gmail.com>:
I'm not familiar, but if and when I get time I'd probably be interested. Seems like a cool bug.
 
Can you open an issue on the repo?
 

Antonio Salazar Cardozo

unread,
Jul 12, 2015, 11:41:37 PM7/12/15
to lif...@googlegroups.com, and...@visena.com
Started a fix for this in PR 1711. It was a slightly more nefarious bug with `appendJs`
from inside `toJsCmd` in general. It still needs testing in other scenarios of `appendJs`
usage beyond that example before we can merge it though.
Thanks,
Antonio
Reply all
Reply to author
Forward
0 new messages