gwt

Inherit external java source in GWT project

别说谁变了你拦得住时间么 提交于 2019-12-23 09:49:22
问题 I have an ENUM that is used on the server-side. I want to be ably to use this enum on the client side (GWT) aswell. This is the structure: se.mycompany.core se.mycompany.core.TheEnum <-- this Enum. se.mycomapny.web.gwtproject <-- The GWT project. se.mycomapny.web.gwtproject.client I have tried to add <inherits name="se.mycompany.core.TheEnum"/> to my gwtproject.gwt.xml file. But I get the following error message: [ERROR] Unable to find 'se/mycompany/core/TheEnum.gwt.xml' on your classpath;

Shift Key in GWT?

随声附和 提交于 2019-12-23 09:35:08
问题 Is there a way in GWT to tell if the Shift key is down inside of an onClick() handler? For example: import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; public class PanelTileBase implements ClickHandler { PanelTileBase() { addClickHandler(this); } public void onClick(ClickEvent event) { // is the shift key down? } } Thanks! 回答1: How about this (untested) void onClick(ClickEvent ev) { NativeEvent nEv = ev.getNativeEvent(); if ( nEv

How to style a standard GWT component (TabBar) differently?

和自甴很熟 提交于 2019-12-23 09:04:34
问题 I am using a TabBar and I want to style the component in different ways. So one time this style, another time that style. I thought this will work but it didn't: TabBar t = new TabBar(); t.addTab( "1" ); t.addTab( "2" ); t.addStyleName( MyResources.INSTANCE.css().slickTab() ); And: public interface MyResources extends ClientBundle { public static final MyResources INSTANCE = GWT.create(MyResources.class); @Source("style.css") MyCssResource css(); } public interface MyCssResource extends

Groovy and GWT: Combining both paradigms

爷,独闯天下 提交于 2019-12-23 08:59:50
问题 Is it possible to develop an application in groovy using GWT components? Luis 回答1: If you want to use Groovy on the server-side and GWT for the UI, that is certainly possible. You can use Grails (a Groovy web framework on the server), and the Grails GWT plugin to help you integrate GWT with this framework. 回答2: I don't think so, because the GWT compiler is basically a Java to JavaScript source compiler (it would be possible if the GWT compiler needed Java bytecode). You can use Groovy on the

gwt beginner- error "could not find any host pages in project'

让人想犯罪 __ 提交于 2019-12-23 07:38:08
问题 I m trying to create a GWT app- it has a single HTML file (main.html) and the java class is main.java. In Eclipse, I did right click-> GWT -> Module and defined the new module correctly. However after adding some code, when I try to run the app in Dev mode, I get the error "Could Not find any host pages in project <project-name> " I have simply added some code to main.java, then saved it and tried to run the app in dev mode... What am I doing wrong here? Is there something I am missing here?

convert String to Date on GWT

家住魔仙堡 提交于 2019-12-23 07:33:34
问题 How do I convert String to Date or Date to String using GWT 2.0.3? 回答1: With the methods on the java.util.Date class itself: parse(String s) and toString() . Although the first is deprecated it is the method to use with GWT. If you want more control over how the Date is formatted, when converting to String use the GWT specific class: com.google.gwt.i18n.client.DateTimeFormat . It will format the date given a pattern, similar to Java's own SimpleDateFormat . 回答2: import com.google.gwt.i18n

Deserialize server response

萝らか妹 提交于 2019-12-23 06:07:47
问题 I'm wondering if is the way to deserialize the server response. So in my case I have an LinkedHashMap<String,Date> and returing this from server: @Override public LinkedHashMap<String, Date> testHMap() { LinkedHashMap<String, Date> map = new LinkedHashMap<>(); map.put("AA", new Date()); map.put("BB", new Date()); return map; } I'm trying to get info about another application(gwt) so I can perform calls only via HTTP, and from upper example the HTTP response looks like : //OK['WM577vZ',4,5,2,

Adding same widget to two panel causing issue

冷暖自知 提交于 2019-12-23 06:06:20
问题 I have created two VerticalPanel(mainVP,subVP) and one TextBox(box).TextBox(box) is added to mainVP as well as subVP but i am adding mainVP only to RootPanel here If i lauch my application nothing is visible even though i have added TextBox(box) to VerticalPanel(mainVP) which is added to main Rootpanel. VerticalPanel mainVP=new VerticalPanel(); VerticalPanel subVP=new VerticalPanel(); TextBox box=new TextBox(); mainVP.add(box); //Textbox added to VerticalPanel subVP.add(box); RootPanel.get()

Problems with GWT 2.4

谁说我不能喝 提交于 2019-12-23 05:52:36
问题 I compiled the version in svn tagged as gwt2.4rc. Now there are a couple of more libraries than I had the last time. Are the any instructions on which library is needed for what? I tried it with only the standard libraries (servlet, servlet-deps, user) but I get the following error when a requestfactory call is made: java.lang.NoSuchMethodError: com.google.gwt.core.client.impl.WeakMapping.setWeak(Ljava/lang/ Object;Ljava/lang/String;Ljava/lang/Object;) I tried declaring the requestfactory

Problems with GWT 2.4

那年仲夏 提交于 2019-12-23 05:52:29
问题 I compiled the version in svn tagged as gwt2.4rc. Now there are a couple of more libraries than I had the last time. Are the any instructions on which library is needed for what? I tried it with only the standard libraries (servlet, servlet-deps, user) but I get the following error when a requestfactory call is made: java.lang.NoSuchMethodError: com.google.gwt.core.client.impl.WeakMapping.setWeak(Ljava/lang/ Object;Ljava/lang/String;Ljava/lang/Object;) I tried declaring the requestfactory