Page 1 of 1

Adding another button tutorial?

PostPosted:Wed Feb 25, 2015 4:32 am
by One
Hi

I have looked around the internet for tutorials but haven't managed to locate any. I would like to add a button for generating a report on the files in the system. Can someone point me to the source.

I have tried adding
in tab workspace
Code: Select all
public void showReport() {
	tabBar.addTab(Main.i18n("tab.workspace.administration"));
	tabAdministrationPos = tabBar.getTabCount()-1;
	adminitrationVisible = true;
}
in Workspace properties
Code: Select all
Main.get().mainPanel.topPanel.tabWorkspace.showReport();
and

in MainMenu.Java
Code: Select all
reports = new MenuItem(Util.menuHTML("img/icon/menu/about.gif", Main.i18n("general.menu.tools.reports")), true, showReport);
reports.addStyleName("okm-MainMenuItem");
administration.setVisible(false);

subMenuTools.addItem(reports);

Command showReport = new Command() {
	public void execute() {
		Main.get().aboutPopup.show();
	}
};
Ok So the button still does not show up.. I am also not sure if I am compiling correctly so any advise is muchly appreciative. First time working with java on a web app.

Re: Adding another button tutorial?

PostPosted:Fri Feb 27, 2015 4:33 pm
by jllort
You want a contextual menu ? right click from document ? and then do some action, is that ?

Re: Adding another button tutorial?

PostPosted:Fri Mar 06, 2015 5:08 am
by One
Hi thanks for the reply... Ok so I have a button that works. now I need to have it make a report on the files in the system. I have built a servlet class to right the files into a txt file. Maven doesn't seem to like ioexceptions in the frontend of the application so I made a server applet. now maven is giving mea INFO] com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode error for just accessing a class outside the front end package of the application.

Re: Adding another button tutorial?

PostPosted:Sat Mar 07, 2015 5:23 pm
by jllort
What are you doing with gwt is quite strange, please do some mockup to take the idea you got in mind. Because what kind of report do you want to doing ... jasper report ? or what ?

See our servlet like DocumentServlet and how when proceed anything with GWT always we trow OKMException and how then is procesed in Main.java with method public void showError(String callback, Throwable caught)