Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Creating addins

mlist edited this page Apr 12, 2013 · 10 revisions

Add-ins are located on the right-hand side of the layout. Which add-ins are displayed can be defined by each user together with their order of appearance under Customization.

OLF Layout

AddinModules are considerably simpler than operations or tabs since they are in first instance independent of domain classes. Like all content modules they have to be placed under grails-app/modules. They need to provide a class implementing the interface AddinModule, as well as a view template to render. The view template should begin with an underscore and be located under grails-app/views/addins. Let's look at an example:

package org.openlab.module.addin

import org.openlab.module.*;

class GeneLegendAddinModule implements AddinModule{
 
 //the name of the add-in will be displayed for selection in the user settings
 def getName()
 {
	"gene legend"
 }
	
 //the name of the template
 def getTemplate()
 {
	"geneLegendAddin"
 }
	
 //the name of the grails-plug-in corresponding to the OLF module
 //used for locating the template
 def getPluginName()
 {
	"gene-tracker"
 }
}

Clone this wiki locally