web applications - GWT extending DecoratorPanel and adding to rootPanel -


I'm new to using gwt, though I'm starting to hang things. A troubled situation I had come today, was the following. (This is short to simplify my question)

  The public class expandes the MyPanel decorator panel {Public MyPanel () {last text box TB = new text box (); Tb .setText ("test"); This.add (TB); TB .setFocus (true); }} Applies the public class class A to EntryPoint () {public void onModuleLoad () {MyPanel mp = new MyPanel (); RootPanel.get ("Reference") Add (mp). }}  

For some reason my problem is on this line:

  root panel.get ("references"). Add (log);  

I get an empty pointer exception ... The lines on the line above the line above the line are:

  java.lang NullPointerException: com Com.google.g.google.glive.user.client.ui.Panel.doAttachChildren (panel.java: 163) at com.google.gwt.user.client.ui.Widget.onAttach (Widget.java:259) .gwt.user.client.ui.Widget.setParent (widget.java 393) at com.google.gwt.user.client.ui.Panel.adopt (Panel.java:119) at com.google. Gwt.user.client.ui.ComplexPanel.add at Com.google.gwt.user.client.ui.AbsolutePanel.add (AbsolutePanel.java:80) (ComplexPanel.java:86)  
< P> So I thought it would be just a simple problem, when I had put all the codes in my Axium from MyPanel into the Auction Method and just made a decorator panel there, there was no zero indicator exception. Why is this and how can I fix it. It seems like a simple problem, but I'm not sure which direction anyone has an idea?

In the panel there is a zero-point exception on this line:

(Iterator = iterator (); it.hasNext ();) {

So, I believe this was due to a wrong jar in the library. Either way it works now though I have another question. How can you add a panel to a panel in the root panel on which the module is not loaded? Is it possible?


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -