uibinder

add class name to element in uibinder xml file

The following replaces any current css class names. It appears to call setStyleName. <g:DecoratorPanel styleName="{style.myCssClass}"> What I really want to do is add a class name, like calling addStyleName. Is it possible to do what I'm attempting? ...

How to layout widgets using DockLayoutPanel and UiBinder in GWT 2.0?

I'm trying to get a simple layout working under GWT 2.0 using UiBinder. The layout I'm trying to get is one that mimic Java's BorderLayout in where you can specify different panels in the north, south, east, west and center directions; for that I'm using DockLayoutPanel. I would like to get a header and footer, both with fixed width. The...

[GWT2] UiBinder work with ToggleButton

I'm liking the new GWT2 UiBinder, however, it's not clear whether certain things are achievable using the declarative UI style. For instance, ToggleButton only takes the image instances at construction time (no setters for up/down images). As I understand, UiBinder works in a JavaBean-like reflective way, where the assignable attribute...

Can I mix declarative and programmatic layout in GWT 2.0?

I'm trying to redo an existing panel that I made before GWT 2.0 was released. The panel has a few text fields and a scrollable panel below in a VerticalPanel. What I'd like to do is to make the scrollable panel with UIBinder and then add that to a VerticalPanel Below is an example I created to illustrate this: public class ScrollTabl...

Embeding a TabLayoutPanel inside a DockLayoutPanel

I'm trying to embed a TabLayoutPanel inside a DockLayoutPanel but the tabs are not showing up :( <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'> <g:DockLayoutPanel unit='PX'> <g:north size='200'> <g:HTML> <h1> My He...

How do I wrap a StackLayoutPanel in a DecoratorPanel using UiBinder?

Hello Everyone :-) After having successfully built a non-trivial UI programmatically using GWT, I am trying to recreate the same UI using UiBinder. I have never used any kind of declarative UI system before and although I am making progress and can see the benefits of such an approach, I am failing to get a DecoratorPanel to wrap a Stac...

How to declare dependent style names with UiBinder

I have a simple UiBinder widget containing a TextArea: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"&gt; <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <g:TextArea visibleLines="3" /> </ui:UiBinder> I want to control the background color of th...

GWT: Menus in UiBinder

I would like to implement menus (MenuBar, MenuItem) using the declarative approach via UiBinder in GWT 2.0. I have run into two problems: 1) Is there a way to add MenuItemSeparators in the .ui.xml file? So far, I have only managed to put MenuBar- and MenuItem-tags into the file. 2) Using @UiHandler, GWT writes the boilerplate code for...

GWT+UIBinder+Gin+Guice+JDO+GAE example

Hi all! I'm trying to link all this technologies, but there are many isolated examples and I do not have enough experience to link them together so my questions: Whether there is a similar example? Is it possible to use UIBinder with Gin? Any recommendations to implement it? ...

How to include a UI binder widget into another UI binder widget

Hello, I am trying to include a UI binder widget into another one: I am building a form with UI binder and would like to include a fancy button done also with UI binder. Does anyone know how to do this? Thank you! ...

How to catch key-pressed event with UIBinder

Hello, In GWT + UiBinder you can catch clicks like this: @UiHandler("cancelButton") void onCancelButtonClicked(ClickEvent e) { // cancel code goes here; } Is there an equivalent for key pressed? For example if the user presses the ESC key then we cancel an action. Thank you so much. ...

Trying to get UIBinder to give me a span not a div

Hello there, I am building a widget with UiBinder and I need to have it enclosed in a span but UiBinder only gives me divs. E.g. HTMLPanel => div, HorizonPanel, FlowPanel, VerticalPanel all divs... Does any one know a solution? Thanks! Daniel ...

Centre object on-screen using css only in GWT2.0 layout/uibinder world

There are a few ways out there in the internet to centre something on the screen via css (-ve margins, table-cell hack etc). I was quite happy with that until now when I wanted to use native gwt2.0 layout panels/widgets. Imagine you want to do a "loading screen" to show a spinning circle until the app tries to figure out where to send us...

How can I internationalize a GWT UIBinder page with Messages?

Hi, I am trying to internationalize a UIBinder application with property files. Since we have already a lot of translations exposed by the com.google.gwt.i18n.client.Messages interface (GWT 1.7.1), we would like to reuse these messages. I have tried the following: <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"&g...

Talking Among GWT Panels using UIBinder Layout

New to GWT here... I'm using the UIBinder approach to layout an app, somewhat in the style of the GWT Mail sample. The app starts with a DockLayoutPanel added to RootLayoutPanel within the onModuleLoad() method. The DockLayoutPanel has a static North and a static South, using a custom center widget defined like: public class BigLayou...

Using ClientBundle image resources in css urls

I'm building an application in GWT and have a skin from my graphic designer which I've plugged into the app using UIBinder and it works beautifully. Now I want to bundle all the images using ClientBundle. Mayne of these images are used in the css file e.g. .nav{background:url(nav_bg.jpg) left top repeat-x; height:27px; clear:both;} B...

UiBinder FlexTable style

Hi, I want to add different styles to different rows, Which is the best way? I'm trying this (it doesnt works, no error but no changes): TWO INTERFACES: public interface StatiscticsTableResources extends ClientBundle { public static final StatiscticsTableResources INSTANCE = GWT.create(StatiscticsTableResources.class); @Source("S...

GWT UiBinder doesn't load the stylesheet

I wanted to make a GWT widget using UiBinder. So I made: UserPanel.ui.xml like this: <?xml version="1.0" encoding="UTF-8"?> <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'> <ui:with field="res" type="com.example.resources.UserPanelResources" /> <g:VerticalPanel st...

GWT - How to define a Widget outside layout hierarchy in uibinder xml file

Hello, this is my first post. I hope someone could help me. I'm looking for a way to define a widget in UiBinder XML layout file separately, without being part of the layout hierachy. Here's a small example: <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"> <g:Label ui:field="tes...

Get UiBinder widget to display inline instead of block

I'm trying to get my UiBinder-defined widget to display inline, but I can't. My current code is: <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'> <ui:style> .section { border: 1px solid #000000; width: 330px; padding: 5px; display: run-in; } </...