vaadin 7: Widgetset does not contain implementation of my custom widget - java

I'm using vaadin 7.5.6 to create a custom GWT widget and use it in my application, but when I run it, my custom component is not shown and I get the message "Widgetset does not contain an implementation for ...".
I know there are several questions related to the same issue but I've already tried all the "solutions" like:
Re-compile the widgetset
Clear all caches from Ivy
Clean the project
Check the annotation #VaadinServletConfiguration, which already contains widgetset = "com.example.myapp.widgetset.MyAppWidgetset")
But nothing works... Any suggestions of what might be the problem?
To create the widget I followed the instructions given in Vaadin's Wiki.
My widgetset looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Uncomment the following to compile the widgetset for one browser only.
Multiple browsers can be specified as a comma separated list. The
supported user agents at the moment of writing were:
ie8,ie9,gecko1_8,safari,opera
The value gecko1_8 is used for Firefox and safari is used for webkit
based browsers including Google Chrome.
-->
<!-- <set-property name="user.agent" value="safari"/> -->
<!--
To enable SuperDevMode, uncomment this line.
See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more
information and instructions.
-->
<!-- <set-configuration-property name="devModeRedirectEnabled" value="true" /> -->
<inherits name="com.lexaden.business.chart.widgetset.OrganisationWidgetset" />
<inherits name="com.vaadin.addon.touchkit.gwt.TouchKitWidgetSet" />
<inherits name="org.vaadin.alump.beforeunload.gwt.BeforeUnloadWidgetSet" />
<inherits name="com.example.fieldcustomcomponents.FieldcustomcomponentsWidgetset" />
Thanks in advance,
Matías

Related

vaadin superdevmode can't find custom widget classes

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.

GWT compilation failed in eclipse

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

Not able to run Gxt 3.1.1 application after upgrading from 3.0.0

I have tried upgrading my projects GWT and Gxt from 2.5.1,3.0.0 to 2.7,3.1.1 . I was able to build the project successfully with some workarounds but am not able to run it. Error I am getting is :
Loading inherited module 'com.ApplicationShellModule'
Loading inherited module 'com.sencha.gxt.ui.GXT'
Loading inherited module 'com.sencha.gxt.data.Data'
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Line 96: Value 'ie6' in not a valid value for property 'user.agent'
I am trying to find the cause in applicationShellModule.gxt.xml which is my gxt configuration which is as follows near line 96:
<property-provider name="gxt.user.agent">
<![CDATA[
{window.alert("inside user agent gxt");
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('trident') != -1) {
if (11 == document.documentMode) return 'gecko1_9';
return 'ie8';
}
if (ua.indexOf('msie') != -1) {
return 'ie8';
}
return 'chrome';
} ]]>
</property-provider>
<property-provider name="user.agent">
<![CDATA[
{ window.alert("inside user agent");
return 'ie8';
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('trident') != -1) {
if (11 == document.documentMode) return 'gecko1_8';
return 'ie8';
}
if (ua.indexOf('msie') != -1) {
return 'ie8';
}
return 'safari';
} ]]>
</property-provider>
<property-provider name="user.agent.os">
<![CDATA[
{window.alert("inside user agent os");
return 'windows';
} ]]>
</property-provider>
<!-- Supported Browsers -->
<!-- uncomment this for dev after upgrade
<set-property name="gxt.user.agent" value="chrome, ie8, gecko1_9" />
<set-property name="user.agent.os" value="windows" />
<extend-property name="locale" values="en,es,ko,pt,ru,fr,hu,pl,zh_CN,zh_TW,tr,uk"/>
<set-property-fallback name="locale" value="en" />
<collapse-property name="locale" values="en, default" />
-->
<!-- changes for upgrade gwt -->
<set-property name="user.agent" value="ie8,ie9,opera,gecko1_8,safari" />
<set-property name="gxt.user.agent" value="ie8" />
<set-property name="user.agent.os" value="windows" />
<extend-property name="locale" values="en" />
<set-property-fallback name="locale" value="en" />
<collapse-property name="locale" values="en" />
<collapse-all-properties />
<set-configuration-property name="CssResource.obfuscationPrefix"
value="empty" />
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-property name="compiler.useSourceMaps" value="true"/>
<!-- upgrade changes over check last line setting to false below revert it to original-->
I have set the user agent manually here as can be seen to a list of browsers but not ie6 which is coming under the error. I have searched for the string 'ie6' but nowhere I am getting the actual reason for this error. Please help me get out of the issue.
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Line 96: Value 'ie6' in not a valid value for property 'user.agent'
If you are seeing this, you have at least one copy of GXT 3.0 still on your classpath - the Core.gwt.xml in 3.1.1 has a blank line on 96.
As El Hoss mentions in the comments, GWT 2.7 dropped support for IE6, and to be compatible, GXT 3.1 did the same. If you are seeing references to IE6, you either have customizations in your own project that use IE6, or are not actually using the correct versions of GWT or GXT.
There are some properties which are being set in the GWT and GXT jars like
Ex :- user.agent - for GWT lesser than 2.6.0 - they support ie6
:- user.agent - for GWT greater than 2.6.0 - they do not support ie6
So you will get compilation error if you have different versions of GWT and GXT.
Even if you find a work around - it may fail later when you use the different widgets of GWT and GXT. So it is better to change the version earlier.
If youe Base GWT version is lesser than 2.6.0 - then you need GXT jar version lesser than 3.0.1
If you base GWT version greater than or equal to 2.6.0 then you need to add GXT jar version 3.1.X

Gwt and Sencha, did you forget yo inherit a required module.

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>

GWT.log logs not showing in the GWT Dev Mode console

I have a GWT application which is run with maven:
mvn gwt:run
However, all the GWT.log logs are not being showed what could be the problem?
In order for the logging to work you need to have the following:
Logging module inherited in your module xml file:
<inherits name="com.google.gwt.logging.Logging" />
Logging level set and handlers configured:
<set-property name="gwt.logging.logLevel" value="FINE" />
<set-property name="gwt.logging.systemHandler" value="ENABLED" />
<set-property name="gwt.logging.consoleHandler" value="ENABLED" />
<set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<set-property name="gwt.logging.firebugHandler" value="DISABLED" />
<set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
You may need a different handler configuration than this one based on what you are tring to achieve, for more info check the offical doc on that matter.
Notice that the level I set up is FINE which would ensure that most of what you log is not ignored by any handler since FINE is one of the lowest levels. By default loggers are configured to handle only SEVERE level logs, which usually ignores the rest, SEVERE being the highest level.
Next you need to ensure that the level you use to log is included withing the LEVEL you setup on the XML module file. For instance if you use...
static final Logger logger= Logger.getLogger(MyClass.class.getName());
logger.fine("--MESSAGE--");
// or
logger.log(Level.FINE, "--MESSAGE--");
...the level must be set to FINE or any other level below for this messages you appear in your log, if you choose any level above FINE, all those messages will be ignored.
Hope this helps...

Categories

Resources