| Issue 133: | Droplists when using AJAX | |
| 1 person starred this issue and may be notified of changes. | Back to list |
******** NOTES ********
I am adding a DropListFilter to one of the column from the API.
HtmlColumn source = row.getColumn("source");
source.getFilterRenderer().setFilterEditor(new
DroplistFilterEditor());
now,when I render the table,
<td><script type="text/javascript" >var
report_source_options={};report_source_options['FLARE']='FLARE';</
script><div class="dynFilter"
onclick="createDynDroplistFilter(this,'report','source',report_source_options)"
></div></td>
gets appended to the column.
But when I try to click on the column for the drop down there is a js
error that "report_source_options not defined"
My theory is,when I am getting the table first through the ajax
call,no js works,i.e anything within <script></script> does not work.
******** MY NOTES ********
With the dropdown list that would be a bug then. You are correct that it is
a loading issue. I bet the worksheet has the same problem as well. I know
you can load JavaScript by calling the eval() method but the trick would be
to just eval the JavaScript. What returns from the AJAX call is the entire
HTML markup and not just the JavaScript. This will take a little research
to figure out the best approach.
Aug 11, 2008
Thats a really good point! That will be the fix then. I will take a look at the worksheet as well but I am sure the same refactoring will apply.
Aug 11, 2008
fixed and checked into the trunk https://code.google.com/p/jmesa/source/browse/trunk/jmesa/src/org/jmesa/view/html/editor/DroplistFilterEditor.java
Status:
Fixed
|
Why not do something like this: onclick="createDynDroplistFilter(this,'report','source', {'FLARE': 'FLARE'})" instead? That way you don't need to worry about any script evaluation.