Skip to content

Instantly share code, notes, and snippets.

package com.example
class Person {
String firstName
String lastName
String website
String email
static constraints = {
package com.example
import org.zkoss.zk.grails.*
class PersonFacade {
def all(){
def persons = []
for(_person in Person.list()){
package zk.mvvm
import static org.junit.Assert.*
import grails.test.mixin.*
import grails.test.mixin.support.*
import org.junit.*
import com.example.*
package com.example
import org.zkoss.zk.grails.*
import org.zkoss.bind.annotation.Command
import org.zkoss.bind.annotation.NotifyChange
import org.zkoss.bind.annotation.Init
import org.zkoss.zk.ui.select.annotation.Wire
import org.zkoss.zk.ui.select.annotation.WireVariable
import org.zkoss.zul.*
<?xml version="1.0" encoding="UTF-8"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<window
<?xml version="1.0" encoding="UTF-8"?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<window apply="grailsBindComposer"
viewModel="@id('vm') @init('listViewModel')">
package com.example
import org.zkoss.zk.grails.*
import org.zkoss.bind.annotation.Command
import org.zkoss.bind.annotation.NotifyChange
import org.zkoss.bind.annotation.Init
import org.zkoss.zk.ui.select.annotation.Wire
import org.zkoss.zk.ui.select.annotation.WireVariable
Feature: new store entry
I want to add stores in my location
so that I can track what items they sell
Scenario: new store
Given I open new store form
When I add "Test Store"
Then I see "Test Store" details
import cucumber.runtime.PendingException
import static org.junit.Assert.*
import org.wherecaniget.*
this.metaClass.mixin(cucumber.runtime.groovy.EN)
StoreVM vm
Given(~"^I open new store form\$") {->
}
package org.wherecaniget
import static org.junit.Assert.*
import org.junit.*
import grails.test.mixin.*
import grails.test.mixin.support.*
@TestMixin(GrailsUnitTestMixin)
@Mock([Store])
@TestFor(StoreService)