User interface is the only part with which masses interact that is why It should always be built immaculately. UI has to be amicable and eye catching as well as easy to manage for a naïve and expert. Interaction part is not just the graphic layout or visible items for almost all type of web [...]
Archive for the ‘Programming Languages’ Category
What GUICE (juice) do..
What Guice do. while working in layers their are several ways to connect presentation classes to service and data classes. one ways is direct Constructor calls. for example in our scenario. if we have serverside class PurchaseHandler.java which performs different functions for on purchasing an item, like delete, add, etc. we need it to access [...]
Image Upload using GWT/GUICE/GIN/Servlets
In previous blog entry We learnt about upload simple file to google blob store using Guice and GIN with GWT. Now in this I shall describe a technique for uploading image to blob store and displaying it back on the gwt page. Example Code can be downloaded from http://code.google.com/p/gwt-image-file-upload/. While uploading file into blobstore use [...]
GWT blob upload Exception
Uncaught exception from servlet java.lang.IllegalStateException: Must be called from a blob upload callback request. This is because Upload Url should be generated from Server on run time and form submitted on that action. for example, you need to get file upload through blobstoreService.createUploadUrl(“/data/upload”). what ever it returns submit file on that URL.
GWT/GAE File Upload Using Guice and Gin
Client Side: 1- create Upload form in new dialog box public class UploadDialog extends DialogBox { private void createForm(){ VerticalPanel panel = new VerticalPanel(); form = new FormPanel(); [...]
Assert in GWT
Asserts are removed when compiled to javascript. Use asserts for things that are so wrong that it’s a programming error that ought to be caught in development mode, and you don’t want to pay any overhead in production for it.
Coding Basics – Compatibility with the Java Language and Libraries – Google Web Toolkit – Google Code
Language support GWT supports most of the core Java language syntax and semantics, but there are a few differences you will want to be aware of. Note: As of GWT 1.5, GWT compiles the Java language syntax that is compatible with J2SE 1.5 or earlier. Versions of GWT prior to GWT 1.5 are limited to [...]
GAE – upload file blobstore exception
When I run the GAE local server, the BlobStorage service works fine. When I run the GWT/GAE project in GWT development mode, however, the blob store service doesn’t work: Problem accessing /_ah/upload/aglhbHRhaXN0YXRyGwsSFV9fQmxvYlVwbG9hZFNlc3Npb25fXxgBDA. Reason: Must call one of set*BlobStorage() first. Caused by: java.lang.IllegalStateException: Must call one of set*BlobStorage() first. at Solution I’ve been able to resolve [...]
Object to Bytes and Bytes to Object Transformer
public static class Transformer { public static byte[] toBytes(Object obj) { byte[] data = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(obj); oos.flush(); oos.close(); bos.close(); data = bos.toByteArray(); } catch (IOException ex) { throw new IllegalStateException(“Object is [...]
How do I speed up the gwt compiler?
Let’s start with the uncomfortable truth: GWT compiler performance is really lousy. You can use some hacks here and there, but you’re not going to get significantly better performance. A nice performance hack you can do is to compile for only specific browsers, by inserting the following line in your gwt.xml: <define-property name=”user.agent” values=”ie6,gecko,gecko1_8″></define-property> or in [...]
Posted in
Tags:
