Commit b7e467df authored by janosch's avatar janosch

version 0.2

parent 83bccbd7
class JmesaGrailsPlugin {
def version = "0.1"
def version = "0.2"
def grailsVersion = "1.2.1 > *"
def dependsOn = [:]
def pluginExcludes = [
......
package de.mpicbg.sweng.grails.jmesa
import org.jmesa.view.editor.CellEditor
/**
* Created by IntelliJ IDEA.
* User: janosch
* Date: Oct 26, 2010
* Time: 2:15:38 PM
* To change this template use File | Settings | File Templates.
*/
class BooleanYesNoCellEditor implements CellEditor {
private String attribute
public BooleanYesNoCellEditor(String attribute){
this.attribute = attribute
}
Object getValue(def item, String property, int rowcount) {
if (item[this.attribute]) {
return "Yes"
}
else {
return "No"
}
}
}
package de.mpicbg.sweng.grails.jmesa
import org.jmesa.view.editor.CellEditor
/**
* Created by IntelliJ IDEA.
* User: janosch
* Date: Oct 26, 2010
* Time: 2:17:59 PM
* To change this template use File | Settings | File Templates.
*/
class CustomAttributeCellEditor implements CellEditor {
String appName
String controller
String action
String attribute
CustomAttributeCellEditor(String appName,String controller,String action,String attribute){
this.appName = appName
this.controller = controller
this.action = action
this.attribute = attribute
}
def getValue(def item, String property, int rowcount) {
return '<a href="/'+this.appName+'/'+this.controller+'/'+this.action+'/'+item.id+'">'+item[this.attribute]+'</a>'
}
}
\ No newline at end of file
package de.mpicbg.sweng.grails.jmesa
import org.jmesa.view.editor.CellEditor
/**
* Created by IntelliJ IDEA.
* User: janosch
* Date: Oct 26, 2010
* Time: 2:16:09 PM
* To change this template use File | Settings | File Templates.
*/
class CustomSubObjectCellEditor implements CellEditor {
String appName
String controller
String action
String attribute
CustomSubObjectCellEditor(String appName,String controller,String action, String attribute){
this.appName = appName
this.controller = controller
this.action = action
this.attribute = attribute
}
def getValue(def item, String property, int rowcount) {
if (item[attribute])
return '<a href="/'+this.appName+'/'+this.controller+'/'+this.action+'/'+item[attribute].id+'">'+item[attribute]+'</a>'
return null
}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment