I'm trying to debug a Vaadin custom widgetset using superdevmode. In "normal" mode the custom widget shows up correctly in the browser. When using superdevmode though, it shows the following text instead of the custom widget:
Widgetset xxx does not contain implementation for yyy
Tried all the usual things such as recompile from command line, restart superdevmode server, to no avail.
The weird thing is that the class in the error message (yyy above) is a server side class, used in the client side code only in #Connect(yyy.class), in the client side Connector. Obviously compiled widgetsets do not contain server side classes. So why would it complain about this class?
Also the fact that it works in normal mode makes me wonder what can be wrong. Many similar questions throughout the forums are unanswered. Any help would be appreciated.
Using Vaadin 7.6.6
Contents of widgetset.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module>
<set-configuration-property name="devModeRedirectEnabled" value="true" />
<add-linker name="xsiframe" />
<inherits name="com.vaadin.DefaultWidgetSet" />
<inherits name="..." />
<source path='client' />
<source path='shared' />
<stylesheet src="resetbuttonfortextfield/styles.css" />
</module>
Solved it eventually by adding -src ${project_loc}/src/main/java to my superdevmode run configuration. Beats me why it wasn't able to figure that for itself.
guys i am trying to make small app using gxt but it gives me GWT compilation failed and then [ERROR] Line 96: Value 'ie6' in not a valid value for property 'user.agent' appears in the console
here is my code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD GWT 2.7.0//EN"
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='gxt_project'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' />
<set-property name="user.agent" value="safari" />
<!-- GXT stylesheet -->
<stylesheet src="reset.css" />
<!-- Specify the app entry point class. -->
<entry-point class='com.sencha.gxt.project.client.GXT_Project' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>
and
public class GXT_Project implements EntryPoint {
#Override
public void onModuleLoad() {
TextButton textButton = new TextButton("Verify GXT Works");
RootPanel.get().add(textButton);
textButton.addSelectHandler(new SelectHandler() {
#Override
public void onSelect(SelectEvent event) {
MessageBox messageBox = new MessageBox("GXT Works.");
messageBox.show();
}
});
}
}
also here is the project trace
project trace
any help would be appreciated .. thanks a lot
GWT 2.7.0 does not support ie6, but GXT 3.0.1 uses it in itself .gwt.xml (com/sencha/gxt/core/Core.gwt.xml etc).
You should upgrade GXT version or downgrade GWT version.
See Also: GXT 4.0 Guides | GWT and GXT Versions
I am trying to implement a BarChart in GWT 2.6 using Sencha GXT 3.1 beta.
It compiles fine but i do get several
14:40:40.102 [ERROR] [comav200] Line 71: No source code is available for type com.sencha.gxt.chart.client.chart.Chart; did you forget to inherit a required module?
Errors. I do use the import com.sencha.gxt.chart.client.chart.Chart; (and several more).
Anyone has any thoughts on why this occur or what i have forgotten?
Best regards,
Kerrai
Please validate below inherits in gwt.xml
<inherits name='com.sencha.gxt.chart.Chart' />
For detailed information and basic chart example please have a look at
Getting started with GXT charts
Copied form the above link if you don't want to go to the link.
Project module setup
Using charts requires a library be added to the GWT project xml module.
Add com.sencha.gxt.chart.Chart to the GWT project module:
<inherits name='com.sencha.gxt.chart.Chart' />
Project.gwt.xml module example: (This is a complete example and much of this is optional.)
Please validate your gwt.xml
<!-- Project.gwt.xml module file -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='project'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' />
<!-- Add this for using GXT charts -->
<inherits name='com.sencha.gxt.chart.Chart' />
<!-- GXT Stylesheet -->
<stylesheet src="reset.css" />
<!-- Override the blue theme -->
<inherits name="com.sencha.gxt.theme.gray.Gray" />
<!-- Specify the app entry point class. -->
<entry-point class='com.sencha.gxt.project.client.ProjectEntryPoint' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>
I'm going through the book: GWT in Action. On chapter I'm working through the very first hello world application. It's all in development mode.
My issue is that the label in my .java file is not showing up when I open the URL webpage. There is nothing being displayed versus the Label("Hello World!") appearing.
EDIT: When at the displayed webpage, I pressed F12 in google chrome to see if I could find anything weird. Got the error: Failed to load resource: the server responded with a status of 404 (Not Found)
HelloWorld.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.6.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.6.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.google.gwt.user.User" />
<source path="client" />
<entry-point class="com.example.gwt.client.HelloWorld"></entry-point>
</module>
HelloWorld.java
package com.example.gwt.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
public class HelloWorld implements EntryPoint {
#Override
public void onModuleLoad() {
RootPanel.get().add(new Label("Hello World!"));
}
}
HelloWorld.html
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>HelloWorld</title>
<script type="text/javascript" language="javascript" src=".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>
My console is displaying this after I run it as a web application:
[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/Qs/Desktop/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
For additional info see: file:/C:/Users/Qs/Desktop/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/doc/helpInfo/webAppClassPath.html
If you don't specify the rename-to in your gwt.xml as shown below then by default GWT places the generated nocache.js under war directory by the name of location of gwt.xml followed by its name as shown in below snapshot.
<module rename-to="xyz">
For more info have a look at gwt-module dtd.
Please have a look Defining a module and Renaming modules
There are two ways to solve this issue:
define rename-to in gwt.xml that is more preferable over second solution
gwt.xml
<module rename-to="hello">
html
<script type="text/javascript" language="javascript" src="hello/hello.nocache.js"></script>
use default way
html
<script type="text/javascript" language="javascript" src="com.example.gwt.HelloWorld/com.example.gwt.HelloWorld.nocache.js"></script>
Here is a snapshot to make it more clear
Change the src attribute of the script tag in HelloWorld.html to
src="com.example.gwt.client.HelloWorld/com.example.gwt.client.HelloWorld.nocache.js"
If that still doesn't work, run the GWT compiler and look at the files it generates to determine the exact name of the *.nocache.js file.
I'm still newbie in SmartGWT, currently having a strange problem..
I am using Windows XP and SmartGWT version 3.0,
GWT SDK 2.4.0 (using Eclipse IDE).
So my problem is, I kind of copied examples from the SmartGWT showcase: Styled ComboBox
DynamicForm df = new DynamicForm();
ComboBoxItem cb = new ComboBoxItem();
cb.setValueMap("cat", "dog", "bird");
cb.setTitle("Select:");
df.setItems(cb);
...
layout.addMember(df);
And when I run it as Web Application, the valuemap doesn't appear.
I mean, the [v] button is there but nothing happens when i clicked it..
Sorry for the noob question, and thanks for your help! :D
UPDATE - 05/03/2012
Here is what appears on my browser:
screenshot removed
Here is the full standalone code:
HelloWorld.java
package com.example.helloworld.client;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
public class HelloWorld implements EntryPoint {
public void onModuleLoad() {
VLayout layout = new VLayout();
layout.setWidth100();
layout.setHeight100();
DynamicForm df = new DynamicForm();
ComboBoxItem cb = new ComboBoxItem();
cb.setTitle("Select :");
cb.setValueMap("Cat", "Dog", "Bird");
df.setItems(cb);
layout.addMember(df);
layout.draw();
}
}
HelloWorld.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='helloworld'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name="com.smartgwt.SmartGwt" />
<!-- Specify the app entry point class. -->
<entry-point class='com.example.helloworld.client.HelloWorld'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
On the 'Development Mode' tab in Eclipse (the one that shows you link to run on browser),
i get this message:
[INFO] [helloworld] - Your *.gwt.xml module configuration prohibits
the use of the current doucment rendering mode (document.compatMode='
CSS1Compat').Modify your application's host HTML page doctype, or
update your custom 'document.compatMode' configuration property
settings.
There is also a single warning:
The following classpath entry 'C:\some-path\smartgwt-3.0\smartgwt.jar'
will not be available on the server's classpath.
UPDATE 2 - HTML and CSS file
HTML:
<!doctype html>
<!-- The DOCTYPE declaration above will set the -->
<!-- browser's rendering engine into -->
<!-- "Standards Mode". Replacing this declaration -->
<!-- with a "Quirks Mode" doctype is not supported. -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- -->
<!-- Consider inlining CSS to reduce the number of requested files -->
<!-- -->
<link type="text/css" rel="stylesheet" href="HelloWorld.css">
<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>Web Application Starter Project</title>
<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="helloworld/helloworld.nocache.js"></script>
</head>
<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<body>
<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
</body>
</html>
and the CSS file:
/** Add css rules here for your application. */
/** Example rules used by the template application (remove for your app) */
h1 {
font-size: 2em;
font-weight: bold;
color: #777777;
margin: 40px 0px 70px;
text-align: center;
}
.sendButton {
display: block;
font-size: 16pt;
}
/** Most GWT widgets already have a style name defined */
.gwt-DialogBox {
width: 400px;
}
.dialogVPanel {
margin: 5px;
}
.serverResponseLabelError {
color: red;
}
/** Set ids using widget.getElement().setId("idOfElement") */
#closeButton {
margin: 15px 6px 6px;
}
IMPORTANT UPDATE
I forgot to inform you that I am currently using Google Chrome(18.0.1025.168) for debug / test build. When I ran it on Firefox, it runs OK!
I noticed this thread a bit late.. So this is currently a known bug.
conclusion: do NOT use google chrome for GWT / smartGWT development mode (for now).
Thank you for your help! :D
I forgot to inform you that I am currently using Google Chrome(18.0.1025.168) for debug / test build. When I ran it on Firefox, it runs OK!
I noticed this thread (smartclient forum) a bit late.. So this is currently a known bug.
conclusion: do NOT use google chrome for GWT / smartGWT development mode (for now).
Thank you for your help! :D
ComboBox is not SmartGWT. Where is it coming from ?
This code works as expected :
DynamicForm df = new DynamicForm();
ComboBoxItem cb = new ComboBoxItem();
cb.setValueMap("cat", "dog", "bird");
cb.setTitle("Select");
df.setItems(cb);
HLayout layout = new HLayout();
layout.addMember(df);
layout.draw();
DynamicForm df = new DynamicForm();
ComboBox cb = new ComboBox();
cb.setValueMap("cat", "dog", "bird");
cb.setTitle("Select:");
//other fields
df.setFields(cb); // Use this to add fields
layout.addMember(df);
Have a look At Show Case
Try this..
DynamicForm df = new DynamicForm();
ComboBox cb = new ComboBox();
Map<String,String> valuesMap = new HashMap<String,String>();
valuesMap.put("cat","cat");
valuesMap.put("dog","dog");
valuesMap.put("bird","bird");
cb.setValueMap(valuesMap);
cb.setTitle("Select:");
df.setItems(cb);
...
layout.addMember(df);
If you are in debug mode you never will see the content of this selectItem or comboBox, but if you select down with the keyboard you will see the content. You should be in "production" mode for see everything correctly
Is a problem with chrome, if you work with firefox you will see the content