Thanks Ian -- was banging my head against the wall, and this narrowed it down.
How are people typically debugging the java GWT client code -- since you can't breakpoint it -- I assume the only way is to compile it down with pretty printing and use something like firebug? I separate the logic as much as possible with MVP and write straight JUnit tests for presenter classes, but this isn't a silver bullet against all possible pitfalls. The problem was code that stores references to RootPanel div wrappers, and later it tried to add these to VerticalPanel. You obviously can't add RootPanel to other panels. This was a simple typo mistake, and once corrected, the problem went away. The bummer in all this is that I didn't get any warning or error or exception, it just generated javascript without my div elements. On Sep 10, 6:37 pm, Ian Bambury <[email protected]> wrote: > Take a backup > Cut out everything except the basic HTML and the > RootPanel.get("header").add(... > > If it still does it, post the exact code here. > > If not, go back and cut whole chunks out until it works. Then look at what > you just cut out. > > Ian > > http://examples.roughian.com > > 2009/9/10 davis <[email protected]> > > > > > Hi, I've been coding a project for quite some time now. It has been > > stable, and everything was working great, until this afternoon. I > > have a file called Admin.html that has a few div tags: > > > <div id="header" align="center"></div> > > <div id="button-row" align="center"></div> > > <div id="content" align="center"></div> > > <div id="footer" align="center"></div> > > > This was working fine for a long time. A lot of code has changed > > recently...some re-factoring, etc. If I knew specifically what change > > caused the problem, I wouldn't be asking for help. It doesn't make > > any sense to me. > > > The problem is that something like RootPanel.get("header").add(... > > triggers NullPointerException. > > > In the browser (FF or IE), if I do View Page Source, I see my four DIV > > elements. But if I debug it in FireBug, I see that the footer div is > > there but the others are not: > > > <body class="page-body"> > > <div id="footer"><table cellspacing="0" cellpadding="0" style="height: > > 5%; width: 100%;" class="footer-panel"><tbody><tr><td align="center" > > style="vertical-align: top;"><table style="width: 40%; height: > > 100%;"><colgroup><col/></colgroup><tbody><tr><td align="center" > > style="vertical-align: top;"><div class="footer">Copyright © 2009 > > Footer Text Here. All Rights Reserved.</div></td></tr><tr><td > > align="center" style="vertical-align: top;"><div class="footer">Header > > Text Here</div></td></tr></tbody></table></td></tr></tbody></table></ > > div> > > > <!-- OPTIONAL: include this if you want history support --> > > <iframe style="border: 0pt none ; position: absolute; width: 0pt; > > height: 0pt;" tabindex="-1" id="__gwt_historyFrame" > > src="javascript:''"/> > > > <iframe src="javascript:''" id="com.example.audit.das.Admin" > > style="border: medium none ; position: absolute; width: 0pt; height: > > 0pt;" tabindex="-1"/></body> > > > I'm running out of ideas on this one...any clues? > > > Regards, > > Davis --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
