This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package b; | |
import java.awt.event.ActionEvent; | |
import org.codehaus.griffon.runtime.core.AbstractGriffonController; | |
public class BController extends AbstractGriffonController { | |
private BModel model; | |
public void setModel(BModel model) { | |
this.model = model; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package a | |
import org.codehaus.griffon.runtime.core.AbstractGriffonModel | |
class AModel extends AbstractGriffonModel { | |
var input: String = "" | |
var output: String = "" | |
// must make getters/setters explicit so that the Griffon runtime | |
// can call the appropriate method. Scala follows a non-JavaBeans |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package a | |
import java.awt.event.ActionEvent | |
import org.codehaus.griffon.runtime.core.AbstractGriffonController | |
class AController extends AbstractGriffonController { | |
var model:AModel = _ | |
// must define an explicit setter for the model property or else | |
// the value wont be set by the Griffon runtime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'groovy' | |
configurations { | |
easyb | |
} | |
repositories { | |
mavenCentral() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task(github) << { | |
println version | |
println "Hola mundo desde github!" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import groovy.beans.Bindable | |
@Singleton | |
class Xml2Groovy { | |
String parseText(String text) { | |
def root = new XmlSlurper().parseText(text) | |
ByteArrayOutputStream baos = new ByteArrayOutputStream() | |
IndentPrinter printer = createIndentPrinter(baos) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SampleController { | |
def action1 = { ... } | |
def action2 = { | |
action1() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@griffon.transform.Domain | |
class Sample { | |
String name | |
String lastName | |
int num | |
String toString() {"<$id> $name $lastName [$num]"} | |
} | |
------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After pulling from codehaus/GRIFFON_1_8_x | |
[javac] /Users/aalmiray/dev/github/groovy-core/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java:3627: incompatible types | |
[javac] found : java.lang.Object | |
[javac] required: T | |
[javac] return inject( drop( list, 1 ), head( list ), closure ); | |
[javac] ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in Application.groovy | |
mvcGroups { | |
// MVC Group for "bar" | |
'bar' { | |
view = 'foo.BarView' | |
controller = 'foo.BarController' | |
} | |
// MVC Group for "foo" | |
'foo' { |