I have a GWT 2.4 app using MVP, clientFactory, activities, places, and
uiBinder. I have a composite widget that I created as a standalone
object with it's own ui.xml file. I reference that class and insert it
into the main viewImpl.ui.xml file.
The composite widget receives some data from the backend and I need to
get it back to the activity so it can be displayed in a table. I'm
using the presenter that is associated with the view to get to the
activity. Here is the code: In the View interface:
public interface NameView extends IsWidget
{
void setPresenter(Presenter presenter);
...
public interface Presenter{
void goTo(Place place);
void setRowDataList(List<Data> rowData);
}
In my Activity I implement the View.Presenter as in:
Activity extends AbstractActivity implements NameView.Presenter
and in the start method for the activity I use:
NameView nameView = clientFactory.getNameView();//NameView is just an
example.
nameView.setPresenter(this); ...
to setup the presenter and instantiate it. My problem is, in the
widget I need this:
presenter.setRowDataList(rowData);
but I'm not sure how to reference the instantiated Presenter from the
widget?
I know GIN would do it, but I'm not using that in the app as I've
never setup GIN with GWT. Any ideas as to the correct way to do this?