gwt

Guice-style service locator

Has anybody ever seen/attempted to write a service locator pattern which uses a Guice style configuration system? Currently I have a GWT project (which happens to use GWT-RPC) that uses a command pattern wherein my RPC servlet that looks like this... public interface TransactionService extends RemoteService { <T extends Response> ...

is it possible to parse text like XML in GWT ?

I know that browsers do support XML with DOM approach I have an application that uses GWT and it uploads file at the server, when the uploading completes, i need the server to respond back to the client with a Bean since this is a file upload, the response is handled by a servlet. I am able to read a string at the client by reading the...

GWT 1.7 - Configuring a DataSource in Jetty (Hosted Mode)

Hello, I'm new to GWT (1.7) and tried to establish a connection to my MySQL database from the servlet. Because I got some errors, I googled them and found out, that I have to configure a DataSource in Jetty to get it working in Hosted Mode. I followed this tutorial: Tutorial I created my own JettyLauncher class as described and added th...

RIght-Click in GWT?

I am building an AJAX web app with GWT, and I want to use right-click for various things, just like in a desktop app. However, right-click produces the standard Web context menu and void onClick(ClickEvent event) never gets called. Has anyone figured out how to get this to work? thanks! ...

GWT - ListBox - pre-selecting an item

Hey there Stackoverflow, I got a doubt regarding pre-selecting(setSelectedIndex(index)) an item in a ListBox, Im using Spring + GWT. I got a dialog that contains a painel, this panel has a flexpanel, in which I've put a couple ListBox, this are filled up with data from my database. But this painel is for updates of an entity in my dat...

GWT Mockito integration

I'm trying to set up and use Mockito into a GWT project, and I'm having trouble using it on the client side (in javascript). I tried to add a module and include Mockito, but it seems not to work (lots of errors). I also tried to do a full checkout from svn and integrate GWT in it that way, the same errors. How should this be done? Thanks...

Server-Side Configuration for GWT

Trying to avoid re-inventing the wheel here. I have a Google Web Toolkit page that I'm preparing to deploy, but the webservice that I'm communicating with will have a different relative address on the deployed server than my local test machine. As such, I'm looking for a simple way to deploy with some sort of easily editable configurat...

Canvas and Click Handlers (GWT)

Hi everybody. I'm trying to build a Mind Mapping application within GWT by using RDF to store the Mind Map (I'm using Jena as the RDF Library). But I'm having to problems: When I load the map, In java swt theres is a way a canvas draw an string as an image. But with the GWT canvas I can't do that. So, how can I convert an string to a...

Dealing with special characters in a URL using Java.

I've written a Java program to generate an m3u file based on a CD ripped from k3b which pretty much preserves special character encodings in artist, album and track names. I then place these m3u files on a server and generate a GWT web application where the m3u file name is the target of an HTML anchor tag. For 99+% of cases, this all ...

How do I test some JavaScript was called with the correct arguments in GWT?

Hi, I've built a thin GWT Wrapper around an existing JavaScript API. The JavaScript API is independently tested, so all I want to do is test that the GWT Wrapper calls the correct JavaScript functions with the correct arguments. Any ideas on how to go about doing this? Currently, the GWT API has a bunch of public methods which after ...

Image in GWT Button

How do I add image to GWT Button or how do I use Mosaic's Buttons to add image. I can't figure out how to use THIS example in my code. What library do I need to add. I have Mosaic Library in my project and I can use it but the example that they have there does not work for me. Thanks ...

How can I pass an anonymous JavaScript object from Java to JavaScript in GWT?

Hi, I'm creating a GWT wrapper round a JavaScript library. One of the JavaScript functions takes an anonymous object as its argument e.g.: obj.buildTabs({ hide: true, placeholder: 'placeholder' }); On the Java side how do I create this type of JavaScript object and pass it to my native implementation? At the moment, on the Java sid...

GWT MVP with a table

When working with MVP in GWT how would you work with a table? For example if you had a table of users does your view look like this? public interface MyDisplay{ HasValue<User> users(); } or would it be more like this? public interface MyDisplay{ HasValue<TableRow> rows(); } MVP makes a ton of sense until you start dealing with...

Is there a tool to convert my GWT RemoteServiceServlet into the correct Service and ServiceAsync interfaces?

I'm working on a GWT project and I find it very tedious to have to add a function to my servlet, then copy and paste the function signature into my Service interface, then copy and paste it into my ServiceAsync interface and change the return parameter to be a callback. Is there a tool or a setting where I can just add public methods to ...

How to assign unique DOM element ID

My GWT application creates text areas, each of which must have an ID in order to be useful to a third-party JavaScript library. I know how to assign an ID to a GWT widget; I'm after a good way of generating those unique ID's. ...

Server side SQLite database with Google Web Toolkit or JQuery

Hi all, I have a large array of vehicle make and model data that I want to dynamically display on a web page. For example, when you select a vehicle make from a drop down menu the vehicle model dropdown is dynamically populated with an asynchronous call. I would normally execute this with an AJAX call to a PHP script that would return ...

How does one autohide a GWT MenuBar submenu?

We have recently attached a GWT MenuBar to a part of our application for, well, menu purposes. Basically I want the sub menus to open when you mouse over the top level menu, which is easy enough to do: menubar.setAutoOpen(true); I would also like to have the sub menu automatically hide when the user's mouse leaves the sub menu. Ideal...

GWT Change URL after processing request parameters

I want to support linking with url request parameters in my GWT app. Example http://host/app?action=A&amp;p1=v1&amp;p2=v2 I am able to process the action=A & other params, but once I am done with that, I want to change the URL to remove them. The problem is that once the user comes to the webpage, for completing the "action" with para...

GWT and jQuery: how to use jQuery to remove Events generated by GWT code.

How can I use jQuery to remove a click event on an Anchor generated by GWT? For example, I have some GWT code like this: Anchor a = new Anchor("name") a.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { //do something } }); So it generates HTML code like this: <a tabindex="0" class="gwt-Ancho...

How to remove an element from a JsArray in Google Web Tools?

I'm using Google Web Tools, and have a JsArray, which I'm populating with data from JSON. I'm able to modify items within the array and add items to it, but I can't figure out how to remove an item from it. I'm looking for something similar to the pop() method in JavaScript. I can add an item to the array by using the set(index,value)...