Posts

Showing posts with the label javascript

GWT SuggestBoxReloaded

This article will present how to implement a GWT 1.6 (RC2) SuggestBox with backing hidden fields, RPC calls and not query the server on every character event. While integrating GWT on work, I needed to implement a SuggestBox with a backend RPC service but I had some requirements that the default SuggestBox didn't fulfill. Namely, I needed that the suggestion sets hidden fields (ex. displaying a human readable name for the user and setting a hidden id field). The solution presented in GWT SuggestBox backed by DTO Model and the Using the GWT SuggestBox with RPC were very helpful in creating this example project. I advise you to read/implement them before reading further in order to understand the issues. The first article hit the sweet point on how to pass hidden values using the DTO pattern, you can either wrap your hidden fields (Hidden.wrap) or as in this example we'll instantiate them using GWT and add them to the panel. The next issues were following, 1. You need to be abl...

JQuery Interface resizable div

A couple of months ago I've discovered JQuery's Interface widgets and I must say it's a very nice set of extensions even though it does have issues with certain browsers (the homepage crashes IE7 for example). That said, I've quickly tried to do stuff I needed for my project. For instance, I had a div on one page that I dynamically refill with some data periodically. As it needed to be in a limited space what I did at the time is something like this: < div style = "overflow:auto;height:200px;" > This of course had the disadvantage to be completely fixed in height, but still provided the possibility to scroll around the data in the layer. So, I decided to use Interface in order to give the div the ability to resize. As the main Interface page offered only two examples of a resizable textbox and a selection over an image I've decided to publish this example where I show how to do the same thing but with a div (layer). You'll notice the expander w...