rickilama54 / smartgwt

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

Bug + suggestion. #381

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
First of all, I like your work!

I have found a small bug in the library which can be reproduced with the
online showcase:
- drag a record from a ListGrid and while dragging, use the arrow keys to
change selected record
- drop the dragged record
- not the dragged, but the currently selected record is being dropped

Also a small suggestion:
The following line is mandatory for using SmartGWT:
<script>var isomorphicDir="mymodule/sc/";</script>
Not cool.. take a look at com.google.gwt.core.client.GWT.getModuleName()
That way, you could get rid of the now needed variable declaration.

Keep up the good work!

Original issue reported on code.google.com by yoeri.ro...@gmail.com on 18 Dec 2009 at 12:05

GoogleCodeExporter commented 8 years ago
Fixed in SVN.

If you can post a complete solution not requiring <script>var 
isomorphicDir="mymodule/sc/";</script> please 
do so.

Original comment by sanjiv.j...@gmail.com on 1 Apr 2010 at 11:23

GoogleCodeExporter commented 8 years ago
I will try to provide a complete solution when I find some time this week.

Original comment by yoeri.ro...@gmail.com on 1 Apr 2010 at 12:12

GoogleCodeExporter commented 8 years ago
Sanjiv,

A possible approach in fixing this is by placing the following code in an 
entry-point
of smartGWT:

private static final String isomorphicDir = GWT.getModuleName() + "/sc/";

static {
    publishIsomorphicDir(isomorphicDir);
}

private static native void publishIsomorphicDir(String isomorphicDir) /*-{
    $wnd.isomorphicDir = isomorphicDir;
}-*/;

Original comment by yoeri.ro...@gmail.com on 2 May 2010 at 6:31

GoogleCodeExporter commented 8 years ago
Unfortunately that will not work because isomorphicDir needs to be set before 
the JS files are loaded. The good 
news is that I have come up with a solution and the enhancement has been 
checked into SVN. The solution 
involved writing a custom GWT Linker that at compile time injects the 
isomorphicDir value into the core 
SmartClient JS file so users no longer need to declare isomorphicDir in the 
host html file.

Original comment by sanjiv.j...@gmail.com on 3 May 2010 at 2:47