Page 1 of 1

Simple Admin Module

Posted: Fri Feb 01, 2013 4:17 pm
by crob
Hi,

i'm trying to make a very simple admin-module, where i can invoke some remote task. I don't need a DataSource or any Persistence-related stuff in this module.
My problem is that i dont know where to start.
I created a module which extends AbstractModule, i think there i should call setSection and pass there my view and my presenter. What interfaces should be implemented by view and presenter?
I tried to "extends HLayout implements Display" for the view, but when i load this module in browser it stops loading after a time, without any error.
Is there something like a really simple "Hello World" module?

crob

Re: Simple Admin Module

Posted: Fri Mar 08, 2013 1:51 pm
by jefffischer
Look at CustomerCareModule.gwt.xml. You'll need to create your own and specify it in your analog for mycompanyAdmin.gwt.xml. Once you've done that, you'll need a class similar to CustomerCareModule. Ignore the addConstants stuff for now, make sure you set the module title and key, use some existing permissions just to get you started, then call setSection(..), setOrder(..) and registerModule. In setSection, your view should extend some layout and should implement Instantiable. Your presenter should extend AbstractEntityPresenter. It should also implement Instantiable. There's probably some lifecycle methods in the presenter that you can ignore. However, you'll at least need to call getDisplay().build(null); in the presenter setup method to get your view built. Make sure you store the display variable in your implementation of setDisplay(..) in your presenter so that you have access to it in the presenter.

Re: Simple Admin Module

Posted: Tue Mar 12, 2013 2:16 pm
by RapidTransit
I'm having trouble also, it's just redirecting to CMS -> Pages and if I add my own module to the admin GWT nothing loads.

I've literally jumped from never even attempting Java to this :?
Is it possible to review my code? I'm willing to pay for help.