Simpler validation framework for SWT/JFace than JFace DataBinding - swt

Is there a simpler-to-use validation framework for SWT and JFace than JFace DataBinding? I would like to simply attach validators to controls, and say on which events they should be invoked.

Related

Using gwt widgets in errai ui

I would like to know if it is possible to use complex gwt widgets like MenuBar or TabLayoutPanel in errai ui.
For example, how can I port the following uibinder to errai's ui template?
<g:MenuBar ui:field="menuBar">
<g:MenuItem ui:field="helpMenuItem">Help</g:MenuItem>
<g:MenuItem ui:field="aboutMenuItem">About</g:MenuItem>
<g:MenuItem ui:field="siteMapMenuItem">Site Map</g:MenuItem>
</g:MenuBar>
I think I could use a <div> in the template, and bind it to a MenuBar, but I would have to construct the menu items programmatically in the view, which I want to avoid.
Thanks!
You have to construct the menu and its items programmatically if you want to stick only with Errai UI.
However you could put the menu in a separate widget which could be built with UI-Binder.
GWT's UI-Binder can represent Widgets as well as DOM elements whereas Errai UI only works with a DOM.

Complex form in GWT

I am about to develop a pretty big form in GWT and I have the traditional: "which layout should i start with"?
When I say "complex" form, it is roughly 25 fields, with some lookup, explanations...
I use uibinder.
GWT translates Java into JavaScript. Nothing more. When you think about layouts, think HTML and CSS first. You can create a very complex layout using Ui:Binder without a single line of Java code. You will need GWT for handlers and such.
GWT does offer some widgets - like a LayoutPanel - for convenience. So you can use it as a container for your form, possibly split into a couple of layers (left and right column), with each layer containing an HTMLPanel (or ScrollPanel and then an HTMLPanel inside of a ScrollPanel). Then you add all your fields into each of these HTMLPanels.

GWT combobox with custom items

I am trying to define a combobox that shows as items, custom controls instead of standard text only items. The control used is com.google.gwt.user.client.ui.ListBox (standard GWT control) as combobox.
Looking at the Showcase http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellList for example, there is a custom list with custom items. To do this, the example uses the CellList class. Is it possible to use the same technique for a combobox?
More in general, is it possible to use a combobox with custom, complex items (e.g. multi column items, custom complex items of any sort, in general a widget of my own or similar)?
I ask this using standard gwt ui controls, no Ext-GWT, no Smart GWT or others.
Thanks.
You cannot style GWT ListBox as it translates to HTML <select> element. If you still insist on feature rich combo-box like GXT then you can go with
GwtChosen - http://dev.arcbees.com/gwtchosen/
CellList with reduced height, selection mode - single and CustomCell.
GWT SuggestBox - http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSuggestBox

Migrating from "native GWT" to GXT

I am thinking of migrating my GWT app from "native GWT" to GXT, however I want to know whether there is a theme in GXT that looks just like the native theme of GWT, com.google.gwt.user.theme.standard.Standard
Also in my "native GWT" application I apply my own css to some widgets. Does the CSS-format for widgets the same with GXT as it is with the native GWT widgets? Like for Button, MenuBar, Panels etc.
Basically GXT 2 has just two themes (blue and gray). There is no such a theme that looks like native GWT, but thats why you should choose GXT, becuose it has rich components and you don't have to take care of your css and other stuffs. Also is not easy to change you style.
Ext GWT 2.0, widgets are responsible for creating their DOM structure
directly. This is done either by manually creating the elements or by
using an HTML fragment. The HTML for the widget is created from
strings, from an XTemplate, or by assembling DOM elements. The CSS
class names are then applied to the elements by the widgets. With this
approach, a widget’s view is tightly bound to the widget itself and
CSS class names are generally hardcoded into the widget.
Because the way how was build is really difficult to change the style of your component. But the new version 3.0 has a new approach that make easier to change your style and you can also combine with native gwt widget.
You can check the website

Editors framework and MVP

Is there a conflict in development or architecture that prevents me from using Editors inside the View in a GWT MVP application?
I am developing a business application and I am thinking of making Editor widgets for my beans and use RequestFactory. I will place editors inside the views when I need to display or edit single object but I will use CellWidgets when I need to display multiple objects.
Will this make a mess of my application or am i heading to the right direction?
What do you recommend according to your experience?
There's no conflict between Editors and MVP. Editors are for easy binding between view and backing beans. Using them together you can fill model via Editor framework.