gwt

localStorage vs SQLite?

冷暖自知 提交于 2019-12-23 12:27:46
问题 I'm building a Packaged App for Chrome. Looking into my database options, I'm curious if I understand the proper way of using these. With SQLite, I'd create table books with the following rows _id , title , category , date , price , qty_sold . With localStorage, I'd create table _id with key/pair such as 1 , x499faj4 . Then I'd create table title with key/pair x499faj4 , book title . Table category , with x499faj4 , fiction . I'm not sure if that makes sense. localStorage seems easier to

Super Dev Mode doesn't detect changes after recompiling

匆匆过客 提交于 2019-12-23 12:27:30
问题 I set up new eclipse workspace and downloaded project from SVN. I launched Super Dev Mode (gwt-2.7.0, chrome browser) and when trying to recompile it says "skipped compile because no input files have changed". It works well in old workspace but it doesn't in new one. I used the same glassfish domain (I undeployed old application, restarted glassfish, used maven clean, maven install options on project in new workspace and deployed ear file to glassfish). It works when it's started for the

Is there any way to create something similar to Javascript's alert in GWT?

爱⌒轻易说出口 提交于 2019-12-23 11:54:48
问题 Hi is there any way to create something similar to Window.alert() in GWT? Basically I wanted to customize the Window.alert() 's "Ok" button to say something else but as I researched there is no way to customize the alert boxes. Thanks. 回答1: Window.alert() is already available in GWT. It opens a native dialog box which contais OK button localized by the browser's locale. This alert box can not be changed. Use PopupPanel or DecoratedPopupPanel. 回答2: You could use the PopupPanel. 回答3: I usually

How to inject Session/User object after bootstrapping?

拟墨画扇 提交于 2019-12-23 11:54:07
问题 There are examples where different kinds of objects are getting injected into a presenter, but I can't find an explanation how this can be done. In the Bootstrap-Code example they are injecting e.g. a SecurityDelegate object. Also in the Gatekeeper example I see things being injected, e.g. MyGatekeeper , but how is this done? What I want is to first check if the user is logged in and then create a CurrentSession object or something like this. But how can I pass/inject this object around? At

Using GWT's NumberFormat class in the shared package

只愿长相守 提交于 2019-12-23 11:45:14
问题 In my GWT project my service returns an object of type Shield that I have defined. As the Shield type is being used by both the client and server, I have put the class definition in the shared package. The Shield class uses the com.google.gwt.i18n.client.NumberFormat class (a replacement for, amongst others, java.text.DecimalFormat ). The issue is that NumberFormat can't be put in the shared package as it creates an instance of LocaleInfo using GWT.create(). Is there any way I can use com

GWT - celltable with simple pager issue

帅比萌擦擦* 提交于 2019-12-23 10:25:14
问题 The cell table pagination is behaving weirdly. check the example from GWT http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable The page size here is defined as 15. This is the problem- click on last page button. Results for 241 to 250 are shown. Now click on previous button - results from 226-240 are shown. Now click on next button ( this is where the problem is). It showns results from 236 to 250. Whereas it should have displyed 241-250. I am having same issue in my project. Is

Programatic CellTable sort in GWT not working

Deadly 提交于 2019-12-23 10:17:18
问题 I'm using the ListDataProvider example here as a guide. The columns are sorting fine as expectd based on the provided comparators. I'm trying to programatically apply a sort as alluded to on this line from the example: // We know that the data is sorted alphabetically by default. table.getColumnSortList().push(nameColumn); What this does, is it makes the cell column appear to be sorted with the carrot sort indicator. However, the underlying data isn't sorted. Is there a way to get the table

Re-fire event after a preventDefault

≯℡__Kan透↙ 提交于 2019-12-23 10:16:23
问题 I have stopped an event with preventDefault. Now I want to rethrow it. I tried the fireEvent but that did not work. Is there a way to achieve this? UPDATE Instead of fire event I created a new instance of the event and used elem.dispatchEvent(clickEvent); Event.addNativePreviewHandler(new Event.NativePreviewHandler() { public void onPreviewNativeEvent(NativePreviewEvent event) { if (event.getTypeInt() == Event.ONMOUSEDOWN) { Element elem = JSHelper.elementFromPoint(event.getNativeEvent()

Is it possible to separate totally the HTML/CSS layout from the GWT logic?

好久不见. 提交于 2019-12-23 10:08:36
问题 I'd like to allow our web developers to continue to work in pure HTML and to let developers to write GWT Java-only code to write the rest of the business logic. Is it even possible? Have anyone tried to work with the web developers in the GWT environment? How do you incorporate the web developers into the GWT development process? 回答1: Essentially what I'm looking for is something like either DeclarativeUI (http://code.google.com/p/google-web-toolkit/wiki/DeclarativeUi) or UIBinder (http:/

GWT : how to get regex(Pattern and Matcher) working in client side

孤街醉人 提交于 2019-12-23 10:08:15
问题 We're using GWT 2.03 along with SmartGWT 2.2. I'm trying to match a regex like below in client side code. Pattern pattern = Pattern.compile("\\\"(/\d+){4}\\\""); String testString1 = "[ \"/2/4/5/6/8\", \"/2/4/5/6\"]"; String testString2 = "[ ]"; Matcher matcher = pattern.matcher(testString1); boolean result = false; while (matcher.find()) { System.out.println(matcher.group()); } It appears that Pattern and Matcher classes are NOT compiled to Javascript by the GWTC compiler and hence this