zorba-the-geek / smartgwt

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

TreeGrid and DynamicForm: different behaviours under hosted mode and browser #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See: http://forums.smartclient.com/showthread.php?t=4331

What version of the product are you using? On what operating system?
Revision 333

Original issue reported on code.google.com by jimch...@gmail.com on 24 Feb 2009 at 7:00

GoogleCodeExporter commented 9 years ago
Are you sure you have not included external CSS that is interfering with the 
display?

Original comment by sanjiv.j...@gmail.com on 24 Feb 2009 at 9:16

GoogleCodeExporter commented 9 years ago
Yes I'm sure. I'm building a prototype right now so I'm not polishing the UI by
including some external CSS or other JS of any sort.

I just discovered something maybe related to this problem: I added a
RecordDoubleClick listener for the tree, and in the event handler, I have:

TreeNode node = Tree.recordForNode(event.getRecord());
if (grid.getTree().isFolder(node)) {
  // Do something;
} else {
  if (grid.getTree().isOpen(node)) {
    grid.getTree().closeFolder(node);
  } else {
    grid.getTree().openFolder(node);
  }
}

Basically it checks if the record double-clicked on is a folder, then it
expands/collapses it. Otherwise, do something to the leaf element. Again, it 
works
fine in the hosted mode, and it doesn't work when I run it in the browser.
(Double-click does nothing).  I removed the event listener and in the browser, 
it
responds to my double-click again, although the layout is still messed up (all
records are right-aligned).

Original comment by jchiu1...@gmail.com on 24 Feb 2009 at 9:44

GoogleCodeExporter commented 9 years ago
Can you post a standalone testcase? Also use firebug or fiddler to make sure 
all the 
css / js resource are found. Also which OS / GWT version are you on.

Original comment by sanjiv.j...@gmail.com on 24 Feb 2009 at 10:34

GoogleCodeExporter commented 9 years ago
The revision I'm using is 333. Yes I used Firebug and all resources are found. I
compiled SmartGWT Rev:333 on Ubuntu Linux with GWT-linux-1.5.3.

I investigated more into this issue, and here's what I found.
http://forums.smartclient.com/showthread.php?p=17572#post17572

I think it might have something to do with data source validation, although it's
still weird (since it's running isFloat validator on all my data source fields)

Thanks,

Original comment by jimch...@gmail.com on 25 Feb 2009 at 3:13

GoogleCodeExporter commented 9 years ago
Problem solved!

It turned out that I was trying to be smart using Java reflection in GWT code to
create DataSource fields. Because reflection is not fully supported in GWT, the
created fields get weird behaviour!

Original comment by jimch...@gmail.com on 25 Feb 2009 at 5:05

GoogleCodeExporter commented 9 years ago
Good, though I'm surprised you code even compiled by the GWT compiler.

Original comment by sanjiv.j...@gmail.com on 25 Feb 2009 at 6:45