
org.grails.scaffolding.registry.input.FileInputRenderer.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fields Show documentation
Show all versions of fields Show documentation
Fields integration for Grails
The newest version!
package org.grails.scaffolding.registry.input
import org.grails.scaffolding.model.property.DomainProperty
import org.grails.scaffolding.registry.DomainInputRenderer
import java.sql.Blob
/**
* The default renderer for rendering byte[] or Blob properties
*
* @author James Kleeh
*/
class FileInputRenderer implements DomainInputRenderer {
@Override
boolean supports(DomainProperty property) {
property.type in [byte[], Byte[], Blob]
}
@Override
Closure renderInput(Map defaultAttributes, DomainProperty property) {
defaultAttributes.type = "file"
return { ->
input(defaultAttributes)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy