grails

how to add multiple g:select

点点圈 提交于 2020-01-04 18:16:12
问题 http://www.4shared.com/download/8Q8J5E2Z/122.PNG?tsid=20130924-025921-5796ea2b when a click button "ADD", below combobox User will append a combobox again...with javascript.. i don't know how to do it..when i tried with jQuery last night..but it cannot be append... <g:select name="user.id" from="${userdetailsList?.firstName}" noSelection="['':'User']"/> <html> <head> <g:set var="entityName" value="${message(code: 'CurrencyList.label', default: 'CurrencyList')}" /> <title><g:message code=

How to call Service in Grails with groovy

时光怂恿深爱的人放手 提交于 2020-01-04 18:16:05
问题 I have one service in that i have a method to call and how can i acces this service. I have seen sms plugin and installed it and How can i send sms from my application to the different mobiles.I followed the grails sms plugin but i didn't get any results ecxept ecxeptions class SipgateService { static transactional = true def serviceMethod() { def sipgateService //def phoneNumber = 'XXXXXXXXXX' //phoneNumber according to E.164 specification //working alternative: println "service" def

Grails/GGTS 2.4.2 not putting plugins on classpath?

落花浮王杯 提交于 2020-01-04 14:17:25
问题 I am trying to update an older 1.3 Grails project to the latest Grails/Groovy/etc. So I downloaded Grails 2.4.2, Groovy 2.3, and Java 1.7.0_65. Then I imported the project via Import->Grails. I found out that plugins are now configured via the BuildConfig.groovy file, so I edited that with the plugins section and ran Grails Tools -> Update Dependencies. None of my plugins appear on the classpath? However, if I startup the plugin manager (which I'm not fully clear on why it is in the product

Grails select not returning the object but a string

我是研究僧i 提交于 2020-01-04 10:59:09
问题 How can I get a select tag to return the object itself and not a string? Whenever I go to create a new BusinessArea I get an error that says: "Failed to convert property value of type java.lang.String to required type bassscheduler.BusinessType for property businessType; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [bassscheduler.BusinessType] for property businessType: no matching editors or conversion strategy found"

Why does grails-2.0.1 fail to create User, Role and UserRole domain objects in the BootStrap class init method?

懵懂的女人 提交于 2020-01-04 09:30:18
问题 Hi, I am new to the Grails platform... I could create the User, Role and UserRole domain objects in the BootStrap class init method in the grails-1.3.7 version with the Spring Security Core Plugin ... But can not do the same in the grails-2.0.1 version.. Following is the code that I'm trying to execute ... import com.beshto.Role import com.beshto.User import com.beshto.UserRole import grails.util.Environment class BootStrap { def init = { servletContext -> switch (Environment.current) { case

Should I use composite primary keys in Grails?

纵然是瞬间 提交于 2020-01-04 09:18:18
问题 The Grails docs discourage the use of composite primary keys, but in this video (26:00 - 29:00) @BurtBeckwith uses composite primary keys as he speaks about the performance benefits of mapping of join tables to domain classes as opposed to using collections. This raises several questions: Why do the Grails docs discourage the use of composite primary keys? Why is Burt even using a composite key? I tried without one and everything seems to work fine. I also didn't override hashcode or equals .

Writing a proxy in grails

你。 提交于 2020-01-04 09:15:32
问题 I am using Gralis 1.3.7. I am writing a controller that needs to get a PDF file from another server and return it to the client. I would like to do this in some reasonably efficient manner, such as the following: class DocController { def view = { URL source = new URL("http://server.com?docid=${params.docid}"); response.contentType = 'application/pdf'; // Something like this to set the content length response.setHeader("Content-Length", source.contentLength.toString()); response << source

How to use injected dataSource in Grails to perform operations?

只谈情不闲聊 提交于 2020-01-04 07:21:37
问题 Is there a way to use an injected datasource in grails for specific operations such as .createCriteria() , .list(), and .find()? I have tried the following: def dataSource_test //Injected dataSource DomainClass.dataSource_test.createCriteria() //returns no property for domain class DomainClass.createCriteria(dataSource_test) //returns no matching method for argument I know it is possible to do the following way: DomainClass.test.createCriteria() This way however gives me more issues, linked

How to use injected dataSource in Grails to perform operations?

喜欢而已 提交于 2020-01-04 07:21:34
问题 Is there a way to use an injected datasource in grails for specific operations such as .createCriteria() , .list(), and .find()? I have tried the following: def dataSource_test //Injected dataSource DomainClass.dataSource_test.createCriteria() //returns no property for domain class DomainClass.createCriteria(dataSource_test) //returns no matching method for argument I know it is possible to do the following way: DomainClass.test.createCriteria() This way however gives me more issues, linked

Grails internationalization with Ember.js and Handlebars.js

匆匆过客 提交于 2020-01-04 05:57:44
问题 I'm developing a web application and I'd need some advice on how to solve the following 'problem' of internationalization. I use Grails 2.2.0 along with Ember.js and Handlebars.js whereas the frontend (which is realised through JavaScript with the before mentioned frameworks) is residing in it's on project with the Sass files for styling Grunt.js for compiling the whole thing. Within this 'frontend project' I create the handlebars templates which I want to deliver via Grails on demand, with