KickstartWithBootstrap
KickstartWithBootstrap copied to clipboard
grails-2.3.0 and bootstrap 3.0.
When the upgrade to grails 2.3.0 and bootstrap 3.0? Thank you.
Hi, I just updated to Bootstrap 3.0.2 but the upgrade to Grails 2.3 will take a while.
Best regards, Joerg
2013/10/4 Mauro [email protected]
When the upgrade to grails 2.3.0 and bootstrap 3.0? Thank you.
— Reply to this email directly or view it on GitHubhttps://github.com/joergrech/KickstartWithBootstrap/issues/50 .
Dr. Jörg Rech Freelancer Web | Mobile | Cloud | Agile Kriegsstr. 164 76133 Karlsruhe, Germany
I'm a software engineer from Germany working as a freelancer in the IT sector and interested in the startup scene, building lean startups, developing new interesting software, and conducting empirical research. My expertise focusses on the topics Web, Mobile, Cloud, and Agile. More information can be found at:
Web: http://www.joerg-rech.com Twitter: http://twitter.com/joergrech Xing: http://www.xing.com/profile/Joerg_Rech/ LinkedIn: http://www.linkedin.com/in/joergrech
Joerg,
Please use the inlined _form.gsp, after I update this file views are generated normally.
<%=packageName%> <% import grails.persistence.Event %>
<% excludedProps = Event.allEvents.toList() << 'version' << 'dateCreated' << 'lastUpdated' persistentPropNames = domainClass.persistentProperties_.name boolean hasHibernate = pluginManager?.hasGrailsPlugin('hibernate') || pluginManager?.hasGrailsPlugin('hibernate4') if (hasHibernate) { def GrailsDomainBinder = getClass().classLoader.loadClass('org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder') if (GrailsDomainBinder.newInstance().getMapping(domainClass)?.identity?.generator == 'assigned') { persistentPropNames << domainClass.identifier.name } } props = domainClass.properties.findAll { persistentPropNames.contains(it.name) && !excludedProps.contains(it.name) } Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[])) for (p in props) { if (p.embedded) { def embeddedPropNames = p.component.persistentProperties_.name def embeddedProps = p.component.properties.findAll { embeddedPropNames.contains(it.name) && !excludedProps.contains(it.name) } Collections.sort(embeddedProps, comparator.constructors[0].newInstance([p.component] as Object[])) %>
<% } else { renderFieldForProperty(p, domainClass) } }private renderFieldForProperty(p, owningClass, prefix = "") { boolean hasHibernate = pluginManager?.hasGrailsPlugin('hibernate') boolean display = true boolean required = false if (hasHibernate) { cp = owningClass.constrainedProperties[p.name] display = (cp ? cp.display : true) required = (cp ? !(cp.propertyType in [boolean, Boolean]) && !cp.nullable && (cp.propertyType != String || !cp.blank) : false) } if (display) { %>
Sorry if the previous post is not very clear, this is the diff for _form.gsp
- boolean hasHibernate = pluginManager?.hasGrailsPlugin('hibernate')
- if (hasHibernate && org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping(domainClass)?.identity?.generator == 'assigned') {
-
persistentPropNames << domainClass.identifier.name
- }
- boolean hasHibernate = pluginManager?.hasGrailsPlugin('hibernate') || pluginManager?.hasGrailsPlugin('hibernate4')
-
if (hasHibernate) {
-
def GrailsDomainBinder = getClass().classLoader.loadClass('org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder')
-
if (GrailsDomainBinder.newInstance().getMapping(domainClass)?.identity?.generator == 'assigned') {
-
persistentPropNames << domainClass.identifier.name
-
}
-
}
I just released version 1.1.0 with the scaffolding temples in the plugin's zip file. Scaffolding does work now. I'm not sure about hibernate changes - might these not conflict with project not using hibernate (e.g., using mongodb)? Please test and tell if you still have a problem that requires your fix.