• Adding another button tutorial?

  • He we will discuss about how to make customization and improvement to the OpenKM source code.
He we will discuss about how to make customization and improvement to the OpenKM source code.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #31414  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.
 #31443  by jllort
 
You want a contextual menu ? right click from document ? and then do some action, is that ?
 #31507  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.
 #31538  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)

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.