For some reason, my custom appearance is not being used to replace gxt class any longer (worked yesterday).
All I did was comment out this part, recompile application and then revert it and recompile again:
<replace-with class='com.test.Test_portal.web.theme.client.header.TestColumnHeaderAppearance'>
<when-type-is class='com.sencha.gxt.widget.core.client.grid.ColumnHeader.ColumnHeaderAppearance' />
</replace-with>
Relevant code:
<module>
<inherits name="com.sencha.gxt.theme.base.Base" />
<replace-with class='com.acdlabs.Test_portal.web.theme.client.header.TestColumnHeaderAppearance'>
<when-type-is class='com.sencha.gxt.widget.core.client.grid.ColumnHeader.ColumnHeaderAppearance' />
</replace-with>
</module>
public class TestColumnHeaderAppearance extends ColumnHeaderDefaultAppearance {
public interface TestColumnHeaderResources extends ColumnHeaderResources {
#Override
#Source({ "com/sencha/gxt/theme/base/client/grid/ColumnHeader.gss", "TestColumnHeader.gss" })
public TestColumnHeaderStyle style();
}
public interface TestColumnHeaderStyle extends DefaultColumnHeaderStyles {
String filterIcon();
}
public TestColumnHeaderAppearance() {
super(GWT.<ColumnHeaderResources> create(TestColumnHeaderResources.class));
}
}
public class TestColumnHeader<M> extends ColumnHeader<M> {
public TestColumnHeader(Grid<M> container, ColumnModel<M> cm, ColumnHeaderAppearance appearance) {
super(container, cm, appearance);
if (appearance.styles() instanceof TestColumnHeaderStyle) {
styles = (TestColumnHeaderStyle) appearance.styles(); // <-- this is never reached and I that's why I get exceptions like "Cannot read property 'filterIcon_0_g$' of undefined"
}
}
}
Can my browser be caching themes and ignoring my TestColumnHeaderAppearance?
Added a comment in TestColumnHeader, which shows that TestColumnHeaderAppearance is not being loaded.
Any ideas?
EDIT
It's working in different browser (fire fox), so it does seem like cache problem. Though I clear cache of the browser that's not working (chrome) and still no change. Deleted /target folter, recompile everything, still no changes.
EDIT 2
When application is built in .war format and deployed to tomcat, everything works (I can see that styling has changed). Might be a problem with super dev mode then or its configuration.
WeblibTheme.gwt.xml
<module>
<inherits name="com.sencha.gxt.theme.base.Base" />
<!-- Buttons -->
<replace-with class="com.test.Test_portal.web.theme.client.button.TestWebButtonCellAppearance">
<when-type-is class="com.sencha.gxt.cell.core.client.ButtonCell.ButtonCellAppearance" />
</replace-with>
<replace-with class="com.test.Test_portal.web.theme.client.field.TestWebDualListFieldAppearance">
<when-type-is class="com.sencha.gxt.widget.core.client.form.DualListField.DualListFieldAppearance" />
</replace-with>
<replace-with class='com.test.Test_portal.web.theme.client.header.TestColumnHeaderAppearance'>
<when-type-is class='com.sencha.gxt.widget.core.client.grid.ColumnHeader.ColumnHeaderAppearance' />
</replace-with>
<!-- Slider -->
<replace-with class="com.test.Test_portal.web.theme.client.slider.TestWebSliderAppearance">
<any>
<when-type-is class="com.sencha.gxt.cell.core.client.SliderCell.SliderAppearance" />
<when-type-is class="com.sencha.gxt.cell.core.client.SliderCell.HorizontalSliderAppearance" />
</any>
</replace-with>
<!-- TreeAppearance -->
<replace-with class="com.test.Test_portal.web.theme.client.tree.TestTreeAppearance">
<when-type-is class="com.sencha.gxt.widget.core.client.tree.Tree.TreeAppearance"/>
</replace-with>
<!-- DatePicker -->
<replace-with class="com.test.Test_portal.web.theme.client.datepicker.TestDatePickerAppearance">
<when-type-is class="com.sencha.gxt.widget.core.client.DatePicker.DatePickerAppearance"/>
</replace-with>
</module>
TestWeb.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='TestWeb'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name='com.google.gwt.inject.Inject' />
<inherits name='com.google.gwt.resources.Resources' />
<!-- Other module inherits -->
<inherits name='com.gwtplatform.mvp.Mvp' />
<inherits name='com.gwtplatform.dispatch.Dispatch' />
<inherits name="org.atmosphere.gwt20.AtmosphereGwt20" />
<inherits name='com.sencha.gxt.chart.Chart' />
<inherits name='com.sencha.gxt.ui.GXT' />
<inherits name="com.google.gwt.logging.Logging" />
<inherits name="com.google.gwt.uibinder.UiBinder" />
<inherits name="com.googlecode.gwt.crypto.Crypto" />
<inherits name="com.test.chemwidgets.ChemWidgets" />
<inherits name="com.test.gxt_widgets.GxtWidgets" />
<inherits name="com.test.Test_portal.web.theme.WeblibTheme" />
<collapse-property name="user.agent.os" values="*" />
<collapse-property name="gxt.user.agent" values="air, safari*, chrome" />
<collapse-property name="gxt.user.agent" values="ie9, ie10" />
<collapse-property name="gxt.user.agent" values="gecko*" />
<replace-with class='com.sencha.gxt.chart.client.draw.engine.VML'>
<when-type-is class='com.sencha.gxt.chart.client.draw.Surface' />
<any>
<when-property-is name='user.agent' value='ie8' />
</any>
</replace-with>
<!-- Specify the app entry point class. -->
<entry-point class='com.test.Test_portal.web.client.TestWeb' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<set-property name="gwt.logging.logLevel" value="INFO" />
<set-configuration-property name='gin.ginjector'
value='com.test.Test_portal.web.client.gin.ClientGinjector' />
<set-configuration-property name='gin.ginjector'
value='com.test.Test_portal.web.client.gin.ClientGinjector' />
<!-- By default (GWT 2.7.0) CssResources uses CSS instead of GSS -->
<set-configuration-property name="CssResource.enableGss"
value="true" />
<!-- GWT Compiler converts all .css files to .gss, if value for CssResource.enableGss
is true -->
<set-configuration-property name="CssResource.conversionMode"
value="strict" />
<!-- The default for GSS in UiBinder -->
<set-configuration-property name="CssResource.gssDefaultInUiBinder"
value="true" />
<set-property name="compiler.stackMode" value="emulated" />
<set-configuration-property name="compiler.emulatedStack.recordFileNames"
value="true" />
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers"
value="true" />
<set-property name="compiler.stackMode" value="emulated" />
<set-configuration-property name="compiler.emulatedStack.recordFileNames"
value="true" />
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers"
value="true" />
</module>
TestWeb-dev.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='TestWeb'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name="com.test.Test_portal.web.TestWeb" />
<!-- Collapsing all permutations into one. -->
<collapse-all-properties />
</module>
EDIT (fixed, no idea why):
Cleared my AppData\Local\Temp\ folder and recompiled the application. Maybe super dev mode ignored the changes made to modules until as long as temp folder held previous version?
Related
I am trying to use the GXT4 in my GWT project but it gives me an error when i launch the app. I followed the GXT guide from their site and added the inherit in the module of my project but it gives me this error: Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Line 67: Unexpected element 'resource'
[ERROR] Failure while parsing XML
PS I'm not using maven. What is wrong?
My module
<module rename-to='myproject'>
<!-- 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.clean.Clean'/>-->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name="com.google.maps.gwt.GoogleMaps" />
<inherits name='com.sencha.gxt.ui.GXT' />
<stylesheet src="reset.css" />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Specify the app entry point class. -->
<entry-point class='com.myproject.project.client.Myproject'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- allow Super Dev Mode -->
<add-linker name="xsiframe"/>
</module>
I want to apply the neptune theme on my application GWT but it's not working.
I already added theme neptune.jar and theme builder to dependences:
my app.gwt.xml:
<inherits name='com.sencha.gxt.theme.neptune.Theme' />
<inherits name="com.google.gwt.http.HTTP" />
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.google.gwt.logging.Logging"/>
<inherits name="com.google.gwt.xml.XML"/>
<inherits name='com.sencha.gxt.ui.GXT'/>
<inherits name='org.gwtopenmaps.openlayers.OpenLayers' />
<set-property name="gwt.logging.enabled" value="FALSE"/>
<set-property name="gwt.logging.consoleHandler" value="DISABLED"/>
<set-configuration-property name="locale.cookie" value="GWT_LOCALE" />
<entry-point class='org.traccar.web.client.Traccar'/>
<source path='client'/>
<source path='shared'/>
And my pom:
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt-themebuilder</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt-theme-neptune</artifactId>
<version>3.1.1</version>
</dependency>
What did I do wrong?
Move <inherits name='com.sencha.gxt.theme.neptune.Theme' /> to after the inherits for GXT - if you put it earlier, it gets overridden by the default.
While creating a LibGDX app I was trying to get the GWT and HTML5 version to work. While I got the generated basic app working, I tried to get an app that i have been working on for a while working and after updating the *.gwt.xml file with the locations of the sources I then encountered this error.
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source
java.lang.StringIndexOutOfBoundsException
If you want to read the whole log: http://pastebin.com/NxVKp2eA
I am not sure where to even start finding the source of this error as it seems to be rooted inside libGDX and scene2d if you could enlighten me that would be excellent.
MY HTML ENTRY POINT:
package com.mygdx.game.client;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
import com.nolevelcap.wc.MainWC;
public class HtmlLauncher extends GwtApplication {
#Override
public GwtApplicationConfiguration getConfig () {
return new GwtApplicationConfiguration(1280, 720);
}
#Override
public ApplicationListener getApplicationListener () {
return new MainWC();
}
}
MY *.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module>
<source path="com/nolevelcap/wc" />
<source path="com/nolevelcap/events" />
<source path="com/nolevelcap/widget" />
<source path="com/nolevelcap/utils" />
</module>
My GwtDefinition.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' />
<inherits name='MainWC' />
<entry-point class='com.mygdx.game.client.HtmlLauncher' />
<set-configuration-property name="gdx.assetpath" value="../core/assets" />
</module>
My GwtDefinitionSuperDev.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' />
<inherits name='MyTestGame' />
<entry-point class='com.mygdx.game.client.HtmlLauncher' />
<add-linker name="xsiframe"/>
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-configuration-property name="gdx.assetpath" value="../core/assets" />
</module>
I just did a checkout of a project with SVN, and is showing me the following error.
I am really new using gwt and be very grateful if you could help me.
This is the error:
Loading inherited module 'com.google.web.bindery.event.Event'
[ERROR] Unable to find 'com/google/web/bindery/event/Event.gwt.xml' on your classpath; could be a
a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 22: Unexpected exception while processing element 'inherits'
This is my xml file
<?xml version="1.0" encoding="UTF-8"?>
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name="com.smartgwt.SmartGwt" />
<inherits name="com.smartgwt.tools.SmartGwtTools" />
<inherits name="com.google.gwt.activity.Activity" />
<inherits name="com.google.gwt.place.Place" />
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.google.web.bindery.event.Event" />
<inherits name="com.google.gwt.core.Core" />
<entry-point class='ch.datalynx.clessidra.client.Clessidra' />
<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'/> -->
<replace-with
class="ch.datalynx.clessidra.client.mvp.clientfactories.ClientFactoryImpl">
<when-type-is
class="ch.datalynx.clessidra.client.mvp.clientfactories.ClientFactory" />
</replace-with>
<source path='client' />
<source path='shared' />
</module>
Make sure the gwt-user.jar file is in your build path. It's part of the GWT SDK.
It is unable to find gwt-user.jar/com/google/web/bindery/event/Event.gwt.xml
I have a .jsp page (the main page of my gwt module) and I'm trying to enable super dev mode as I'm migrating to gwt 2.6.
Following the explanations I found out on internet, once I launch the codeserver and add the bookmarklets, next I gotta open the page in my browser, so I call the jsp page from my tomcat server.
The problem is that nothing happens, and looking at the chrome console it seems it is unable to find my module/module.nocache.js
Any idea?
EDIT : added .gwt.xml
<inherits name="XXX.frontend.gwt.Framework"/>
<inherits name="XXX.frontend.gwt.sample.frontend.module.blanc.Module"/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- Specify the application entry point class -->
<entry-point class='XXX.frontend.gwt.client.FrameworkEntryPoint'/>
<!-- Compile for specific browser -->
<!-- <set-property name="user.agent" value="ie8,ie9,ie10,gecko1_8,safari" /-->
<!-- Compile for specific language -->
<extend-property name="locale" values="fr" />
<set-property-fallback name="locale" value="fr" />
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE' />
<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(localhost|127\.0\.0\.1)(:\d+)?/.*" />
<add-linker name="xsiframe" />
<set-property name="compiler.useSourceMaps" value="true" />
You have to load your .nocache.js file from your codeserver instance.
In your .jsp you must have something like this:
<script src="http://localhost:9876/myapp/myapp.nocache.js"></script>
In your gwt.xml you need these lines as well:
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-property name="compiler.useSourceMaps" value="true" />