PerShing2014 / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

DroplistFilterEditor does not work when using ajax #290

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When configuring the DroplistFilterEditor for my jmesa table using ajax, the 
filter will work as expected the first time the filter is used. After that none 
of the filters of the table work any more (until after a web page refresh). 
This happens only if the option is selected by clicking on it, not when using 
the keyboard.

The reason is that the dynFilter internal variable is never reset to null after 
that. The click in the generated select-box not only triggers the call to 
saveDroplistDynFilterData() that resets the variable, but after that the event 
is propagated up to the surrounding div's onclick-handler which calls 
createDroplistDynFilter() one more time which in turn assigns the variable 
again - which the author did not intend.  And saveDroplistDynFilterData() is 
never called again to reset the variable because that element is replaced by 
the ajax call, so no event will be triggered when it looses focus.  When not 
using ajax this doesn't matter because the page is refreshed anyway. 

The patch is tested on FF 3.6 and Opera 10.62.

Original issue reported on code.google.com by and...@gmail.com on 4 Oct 2010 at 3:17

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! I will test this with IE. If it works I will include it. If IE has 
problems I will still include it, but wrap it with some browser specific logic.

Original comment by jeff.johnston.mn@gmail.com on 5 Oct 2010 at 5:23

GoogleCodeExporter commented 8 years ago
I tried this on IE8, Firefox 8. Chrome-whatever and it fixes it. I'd appreciate 
it if it was pushed as JMesa 3.0.5 so I don't have to carry an independent 
patch :-)

Original comment by nushio on 9 Nov 2011 at 10:46

GoogleCodeExporter commented 8 years ago
Yes. I really dropped the ball on this one!

I plan on starting up development with JMesa in Januaray as I have some heavy 
development coming up with something I am doing at work (that uses a lot of 
JMesa). In the meantime I will find some time to apply this patch so that it is 
on the trunk at the very least.

Original comment by jeff.johnston.mn@gmail.com on 10 Nov 2011 at 6:56

GoogleCodeExporter commented 8 years ago
Long time after this issue I hit the wall with this bug, only to find this post 
after a couple of hours searching for the problem origin, which now I see that 
is perfectly described in here. It's better sometimes to search than to think, 
hehe.

I am maybe stuck in an old Jmesa version but I'm not fan of jumping to newer 
versions after making lot of customization in old ones. I see that 3.0.4 (with 
this bug) is the last version of the v3 and the last I'm familiar with. 
Probably this problem is fixed in new versions but I will fix the problem as 
it's done in the patch.

Original comment by AlejaV...@gmail.com on 16 Apr 2013 at 9:51