Yes you can use gxt with mvp4g.
Compared to the available examples, the main difference will be that
your view will be built
using GXT panels and widgets instead of GWT ones.
You may have other impacts depending on the way you decide to go.
The first solution will be to also modify your view interface in order
them not to use basic GWT interfaces (like HasClickHandler,
HasValue..).
So instead of having view interface like:
GWTViewInterface{
public HasClickHandler getButton();
public HasValue<String> getField();
}
you will have:
GXTViewInterface{
public Button getButton();
public Field<String> getField();
}
In this case you will have an impact of your presenter (which should
be mininum). Only the call to presenter's view's method will be
different.
For example instead of having:
GWTPresenter extends Presenter<GWTViewInterface>{
...
public void bind(){
view.getButton().addClickHandler(new ClickHandler(){
...
});
}
...
}
you will have:
GXTPresenter extends Presenter<GXTViewInterface>{
...
public void bind(){
view.getButton().addSelectionHandler(new SelectionHandler(){
...
});
}
...
}
The logic of your presenter should stay the same whatever library
you're using.
You could also decide not to impact the view interface (and keep
defining them using basic GWT interface) and
create widgets that extends GXT and implements GWT interface.
For example, you can have
MyTextInput extends TextField implements HasValue<String>{
}
The second way is probably the best way to go. You may have some extra
classes to create but if you want to switch Widget library, only your
view will be impacted (not your presenter) so that you can easily
switch.
When I have time (it might not be before the end of the month), I will
try to implement the simple example with GXT in order how to give you
an idea on how to do it.
On Aug 14, 12:09 pm, Suresh Reddy Guntaka <
sureshredd...@gmail.com>
wrote: