Leitura errada de data
12/08/2013 13:48
class Matriz {
String nome
Date vigencia
String observacao
Boolean ativa
Usermodule usuario
static belongsTo = [produto:Produto]
static hasMany = [componentes:Componente]
static constraints = {
nome(nullable: false, blank: false, unique: true)
vigencia(nullable: false, blank: false, min: new Date().clearTime())
observacao(nullable: true, blank: true, maxSize: 1000)
ativa(nullable: false, blank: false)
usuario(nullable: false, blank: false)
produto(nullable: false, blank: false)
}
public String toString() {
return this.nome
}
}
def list(Integer max) {
params.max = Math.max(max ?: Matriz.count(), 1) //disable pagination - Math.min(max ?: 10, 100)
[matrizInstanceList: Matriz.list(params), matrizInstanceTotal: Matriz.count()]
}
<td><g:formatDate format="dd/MM/yyyy" date="${matrizInstance.vigencia}" /></td>
Para se registrar, clique aqui.