grails

Groovy GDK equivalent of Apache Commons StringUtils.capitalize(str) or Perl's ucfirst(str)

杀马特。学长 韩版系。学妹 提交于 2020-01-12 16:06:04
问题 Yes/no-question: Is there a Groovy GDK function to capitalize the first character of a string? I'm looking for a Groovy equivalent of Perl's ucfirst(..) or Apache Commons StringUtils.capitalize(str) (the latter capitalizes the first letter of all words in the input string). I'm currently coding this by hand using .. str = str[0].toUpperCase() + str[1 .. str.size() - 1] .. which works, but I assume there is a more Groovy way to do it. I'd imagine ucfirst(..) being a more common operation than

How to use LDAP plugin on Grails?

人盡茶涼 提交于 2020-01-12 09:56:27
问题 I'm starting a new project on Groovy and Grails. I'm now working on the authentication part and as we have an LDAP server I want to work the authentication using LDAP. I began setting my environment, I'm using SpringSource Tool Suite and Grails 1.3.5 . When I started working with the authentication part I installed two plugins: springSecurityCore - 1.0.1 springSecurityLdap - 1.0.1 I also ran the "s2 quickstart" command for the LDAP plugin. Everything looks great, I can use the LoginController

How to use LDAP plugin on Grails?

时光毁灭记忆、已成空白 提交于 2020-01-12 09:56:21
问题 I'm starting a new project on Groovy and Grails. I'm now working on the authentication part and as we have an LDAP server I want to work the authentication using LDAP. I began setting my environment, I'm using SpringSource Tool Suite and Grails 1.3.5 . When I started working with the authentication part I installed two plugins: springSecurityCore - 1.0.1 springSecurityLdap - 1.0.1 I also ran the "s2 quickstart" command for the LDAP plugin. Everything looks great, I can use the LoginController

Change login page for spring security plugin in grails

ぃ、小莉子 提交于 2020-01-12 04:44:10
问题 Is there a way that I can create my own custom login page and send the data to login controller of spring security plugin. I currently see my code redirecting directly to the default login page of spring security plugin. 回答1: The 2.0 plugin comes with its own auth.gsp page, so if you create your own (either modify the plugin's or create your own) and put it in grails-app/views/login/auth.gsp it will be used. In 1.2.x the auth.gsp is in your app source, so edit it there. If you want to further

Failed to resolve dependencies during grails plugins installation

爱⌒轻易说出口 提交于 2020-01-12 01:34:45
问题 I deleted my .grails folder from my PC and when I opened an application in Intellij IDE, the plugins mentioned in buildConfig.groovy start installing. A few plugins were installed but six plugins were unable to install. The following error occurred. "C:\Program Files\Java\jdk1.7.0_75\bin\java" -Dgrails.home=C:\grails-2.1.1 -Dbase.dir=F:\Projects\sms-sender "-Dtools.jar=C:\Program Files\Java\jdk1.7.0_75\lib\tools.jar" -Dgroovy.starter.conf=C:\grails-2.1.1/conf/groovy-starter.conf -Xmx768M

Failed to resolve dependencies during grails plugins installation

柔情痞子 提交于 2020-01-12 01:34:43
问题 I deleted my .grails folder from my PC and when I opened an application in Intellij IDE, the plugins mentioned in buildConfig.groovy start installing. A few plugins were installed but six plugins were unable to install. The following error occurred. "C:\Program Files\Java\jdk1.7.0_75\bin\java" -Dgrails.home=C:\grails-2.1.1 -Dbase.dir=F:\Projects\sms-sender "-Dtools.jar=C:\Program Files\Java\jdk1.7.0_75\lib\tools.jar" -Dgroovy.starter.conf=C:\grails-2.1.1/conf/groovy-starter.conf -Xmx768M

remove & add select box option if other selection changes

徘徊边缘 提交于 2020-01-11 14:24:47
问题 I have 3 select boxes and all are having same value (clones) & created on change of reference table selection. now i want to manage the selection on the three Constraint dropdown so that it 'Does not show the selected one in other two' and user cant select the same from two. how to do it in jquery? Code is - <tr> <td> Reference Table:</td> <td> <select id="tableCombo" onchange="jQuery.ajax({type:'POST',data:'tableCombo=' + this.value, url:'/GryphonMonitor /load/getColumns',success:function

Grails: Prevent cascading association between two domain classes with multiple relationships

人盡茶涼 提交于 2020-01-11 14:05:07
问题 Consider two domain classes; Job and Quote. A Job has many Quotes but a Job also has an accepted quote. The accepted quote is nullable and should only be set once a particular Quote has been accepted by a user. I have the relationships mapped as follows (simplified for the purpose of illustration). class Job { String title Quote acceptedQuote } class Quote { Job job BigDecimal quoteAmount } The resultant tables are exactly what I require (at least aesthetically) but the problem arises when I

Server-side network printing in java / grails

谁都会走 提交于 2020-01-11 12:33:29
问题 I am java / grails developer working on redesigning a software system. One of the requirements is to have a sever-side application send data to various network printers to print text data. I searched the web for info on java network printing, and came up short I looked into Java Print Service API, java.awt.print, javax.print and did not find anything on connecting to network printers. Is what I am trying to do possible or favorable. The lack of findings leads me to believe that sever-side

Jersey Sub-Resource Locators Error

醉酒当歌 提交于 2020-01-11 12:32:19
问题 I'm trying to get the JSR-311 plugin working with Grails 2.3.7. I'm using version 0.10, because I think 0.11 requires Grails 2.4. I've used the generate-resource command to create an end point for my domain class Product . Two resource classes are created, ProductCollectionResource and ProductResource . I've tweaked them a bit, but essentially they look like this: ProductCollectionResource @Path('/api/products') @Consumes(['application/json']) @Produces(['application/json']) class