gwt

what is best way to paging big Resultset -Java

 ̄綄美尐妖づ 提交于 2019-12-20 01:13:20
问题 i am looking for best aproach from perfomance point of view , to show Resultset on webpage partially , lets say by 10 item per page and if user want to see more result, he pressing "next" btn . i think (probablly wrong) it should be new request to the Server when "Next" button is pressed ?? currentlly i trying to learn Java,GWT thank You! PS: sorry for my English. 回答1: The answer would depend on your users' behavior: how often will the look at page 2, or page 10, or page 100. If they rarely

GWT: Best practice for unit testing / mocking JSNI methods?

时光怂恿深爱的人放手 提交于 2019-12-19 21:52:37
问题 I have a class which uses JSNI to retrieve JSON data stored in the host page: protected native JsArray<JsonModel> getModels() /*-{ return $wnd.jsonData; }-*/; This method is called, and the data is then translated and process in a different method. How should I unit test this class, since I'm not able to instantiate (or seemingly mock?) JsArray? What is the best way to unit test JSNI methods at all? 回答1: The interface approach is the best approach, and not necessarily an overkill. As to the

GWT Logger: No control over debug output?

拈花ヽ惹草 提交于 2019-12-19 18:36:45
问题 I'm having the following in my client.gwt.xml file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd"> <module rename-to='client'> <inherits name="com.mz.client.app" /> <source path="client"/> <inherits name="com.google.gwt.logging.Logging"/> <set-property name="gwt.logging.logLevel" value="FINER"/> <set-property name="gwt.logging.enabled" value="TRUE"/> <set-property name="gwt

Get rid of padding/margin around <canvas> element?

寵の児 提交于 2019-12-19 17:35:02
问题 I have a canvas object in a div. The canvas seems to have a padding around it somehow. I want its edges to touch the edges of the browser screen: // my html file: <body> <div id="canvasholder"></div> </body> // my java gwt code Canvas canvas = Canvas.createIfSupported(); canvas.setWidth("100%"); canvas.setHeight("100%"); RootPanel.get("canvasholder").add(canvas); but yeah the page still has a ~20px margin around the canvas element. There is nothing else on the page beside what's copied above.

How can we count the time of process?

柔情痞子 提交于 2019-12-19 15:33:39
问题 I created a PopupPanel and have shown it. I want to hide it after one minute has passed. During that one minute, the process should not be stopped or paused. How can I achieve this behavior? 回答1: GWT has its own implementation of Timer. Here a really small example: public void onModuleLoad() { final PopupPanel popUp = new PopupPanel(); Label text = new Label("gone in a sec"); popUp.setWidget(text); Timer timer = new Timer() { @Override public void run() { popUp.hide(); } }; popUp.center();

ie6 wast not previously defined error in GWT 2.6.0/GXT2.5.1

对着背影说爱祢 提交于 2019-12-19 11:50:32
问题 I got the following error when compiling the code with GWT 2.6.0 and GXT 2.5.1. Loading inherited module 'com.sencha.gxt.ui.GXT'L Loading inherited module 'com.sencha.gxt.data.Data' Loading inherited module 'com.sencha.gxt.core.Core' [ERROR] The value ie6 was not previously defined. [ERROR] Line 96: Unexpected exception while processing element 'set-property' Even though we don't specify ie6 in gxt.user.agent, we still get the error: "[ERROR] The value ie6 was not previously defined." Why

open/save file in smartGWT

佐手、 提交于 2019-12-19 11:46:17
问题 I have implemented RPCService, RPCServiceAsync & RPCServieImpl. On clicking a button a service in server side will be called and it will fetch data from DB and file is created. Once the file is created, then i need to open that file in client side and need to prompt a dialog box with open/save options. how can i implement this opening a file part. pls suggest a way to implement t.. Reply pls.. thanks in advance.... @Hambend : I still have one more clarification !.. how to call this doGet

How to inherit a required module in to GWT Project?

本小妞迷上赌 提交于 2019-12-19 11:34:05
问题 I want to use the GWT-FXv0.5.0MS_1.jar in my GWT Project, i added the jar file to project path and used the codes up on syntax, now am getting error that not inherited: Error message is: 11:28:48.829 [ERROR] [uibuilder] Line 80: No source code is available for type org.adamtacy.client.ui.effects.core.NMorphStyle; did you forget to inherit a required module? 回答1: You have to add inherit tag in your gwt.xml <inherits name="com.company.gwt-fx"/> 来源: https://stackoverflow.com/questions/14251782

How can I use the same @def in multiple CssResource css files?

一世执手 提交于 2019-12-19 10:49:23
问题 I'd like to say, in a single, centralized location, @def mainColor = #f00; and then, in all of my other css files, refer to mainColor without having to redefine it. Then when I change mainColor in once place, my entire app changes color. The best way I can think of so far is to include two @Source files for every CssResource declaration and always include the global def file. Are there any other ways? 回答1: As far as I know, this is your only option: style.css @def mainColor #f00; *.ui.xml <ui

entity with relationships through GWT RPC problem

删除回忆录丶 提交于 2019-12-19 10:41:01
问题 I am using JPA 2.0. (EclipseLink 2.0.2) If an entity contains relations, for example: @OneToMany(cascade = CascadeType.ALL, mappedBy = "userId") private Collection<Blog> blogCollection; I am getting the following error when I am sending it through RPC: com.google.gwt.user.client.rpc.SerializationException: Type 'org.eclipse.persistence.indirection.IndirectList' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For