Hi, I'm trying to "compose" the widget, but I get the same mistake.I
simplified the code of 2 modules that I consider:
---------
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Composite;
public class MenuHome extends Composite {
public void Composite() {
VerticalPanel vPanel = new VerticalPanel();
vPanel.setTitle("GOOD!");
vPanel.setWidth("100%");
vPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
initWidget(vPanel);
RootPanel.get().add(vPanel);}
}
-----------------
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.Window;
public class Home implements EntryPoint {
private MenuHome menuhome;
public void onModuleLoad() {
Window.setTitle("Title");
menuhome = new MenuHome();
RootPanel.get().add(menuhome);
}
}
------------------------------
MenuHome.gwt.xml
<module>
<inherits name='com.google.gwt.user.User'/>
<entry-point class='com.gwt.client.MenuHome'/>
<stylesheet src='MenuHome.css' />
</module>
---------------------------------
Home.gwt.xml
<module>
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<entry-point class='com.gwt.client.Home'/>
<stylesheet src='Home.css' />
</module>
------------------------------------------
MenuHome.html
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<title>MenuHome</title>
<script type="text/javascript" language="javascript"
src="com.gwt.MenuHome.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
style="position:absolute;width:0;height:0;border:0"></iframe>
</body>
</html>
---------------------------------
Home.html
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<title>Home</title>
<script type="text/javascript" language="javascript"
src="com.gwt.Home.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
style="position:absolute;width:0;height:0;border:0"></iframe>
</body>
</html>
------------------------------------------
ERROR:
[ERROR] Unable to load module entry point class com.gwt.client.Home
(see associated exception for details)
java.lang.AssertionError: This UIObject's element is not set; you may
be missing a call to either Composite.initWidget() or
UIObject.setElement()
at com.google.gwt.user.client.ui.UIObject.getElement(UIObject.java:
511)
at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:
83)
at com.google.gwt.user.client.ui.AbsolutePanel.add(AbsolutePanel.java:
80)
at com.gwt.client.Home.onModuleLoad(Home.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:
329)
at com.google.gwt.dev.shell.moz.BrowserWidgetMoz.access
$100(BrowserWidgetMoz.java:35)
at com.google.gwt.dev.shell.moz.BrowserWidgetMoz
$ExternalObjectImpl.gwtOnLoad(BrowserWidgetMoz.java:59)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:
1428)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
someone knows the problem?thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---