grails-plugin

Placement Of JS Resource Via <r:external />

北慕城南 提交于 2019-12-11 11:19:22
问题 I'm using the Resources plugin in Grails 2.0.1. The issue I'm having is getting a JavaScript resource specified using r:external to be placed after all of the other script previously declared using either r:require or r:external, all in the deferred disposition. Currently the resource specified using r:external it is being output in the location where the r:external tag is placed. I have a layout file that contains an r:require tag to fetch some core resources: <html> <head> ... <r:require

Grails-SpringSec depends on JARs that aren't in Maven Central?

浪子不回头ぞ 提交于 2019-12-11 10:35:48
问题 I am trying to configure a Grails app to use the latest stable SpringSec-CAS plugin and for the life of me cannot find the proper version of both SpringSec and the plugin I should be using. I am on Grails 2.3.6. What should I include in BuildConfig.groovy to get the latest stable versions? I have: plugins { compile ":spring-security-core:2.0-RC2" compile ":spring-security-cas:2.0-RC1" } When I specify SpringSec 2.0-RC2 and SpringSec-CAS 2.0-RC1 I get the following errors when running grails

How to nest plugin URLs?

☆樱花仙子☆ 提交于 2019-12-11 09:36:30
问题 I would like to create a "Shell" of a Grails project that hosts functionality in plugins, with the URLs segregated by plugin name. So the URLs for a Blog plugin used in the Shell project might look like: /shell/blog/viewBlogPost But what I'm actually seeing is all of the plugins' controllers behave as if they are part of the shell project itself: /shell/viewBlogPost Is there any way to declare that the Blog plugin's controllers be accessible only under a /blog path in the URL? 回答1: It seems

Custom CSS and JS in Grails plugins

纵然是瞬间 提交于 2019-12-11 09:29:14
问题 I am building a Grails plugin ( grails-myorg.zip ) that will contain reusable code/artifacts that should be used by every Grails app in our organization. This includes custom CSS/JS files that help give our apps a consistent look-and-feel. I'm wondering what the best course of action here is: Create a grails-myorg-themes.zip plugin, which just includes the reusable CSS and JS files, and then make that a runtime plugin/dependency (using BuildConfig.groovy ) of the main grails-myorg.zip plugin;

Grails: MySQL and mongoDB together

眉间皱痕 提交于 2019-12-11 09:21:43
问题 I am new to GRAILS. I am trying to use MySQL and MongoDB in one web-app. Can someone have a quick look on my BuildConfig.groovy and datasource.groovy and suggest me the correct way ahead. buildconfig.groovy grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0) grails.project.class.dir = "target/classes" grails.project.test.class.dir = "target/test-classes" grails.project.test.reports.dir = "target/test-reports" grails.project.work.dir = "target/work"

Grails Standalone Plugin Not Found

*爱你&永不变心* 提交于 2019-12-11 07:40:13
问题 I'm trying to use the grails standalone plugin with a new grails project but I can't get it to work. I've added it as a plugin dependency in my BuildConfig.groovy file: plugins { compile: ":standalone:1.2.3" } But I get the following error when I attempt to run grails prod build-standalone : Script 'BuildStandalone' not found, did you mean: 1) InstallDependency 2) Stats 3) InstallJQuery 4) CreateMultiProjectBuild_ 5) TestApp I tried running grails clean , grails clean-all , grails refresh

Best grails implementation for tracking number of views (or unique visitors) for a web page?

三世轮回 提交于 2019-12-11 07:05:52
问题 I need to implement a very popular feature : displaying the number of views for a profile page . For instance, my profile page in StackOverflow will display how many persons have viewed my profile (just under my reputation score). I suppose that the algorithm is based on some cookies and/or visitor IP addresses. Is there a simple way (a plugin or some code source) to implement it in Grails running on tomcat/apache? 回答1: Check out the Clickstream plugin: http://grails.org/plugin/clickstream I

Grails quartz->thread

北慕城南 提交于 2019-12-11 06:56:42
问题 This is my Trigger that calls a matchService... class TestJob { def matchService static triggers = { cron name: 'firstThread', cronExpression: "0 0/1 12-13 ? * THU" } def group = "threadGroup" def execute() { matchService.playMatch() println "run thread: " + String.format('%tH:%<tM:%<tS.%<tL',System.currentTimeMillis()) } } ...this is the service that is called class MatchException extends RuntimeException { String message Match match } class MatchService { /* * Rolls back database changes if

ajax request denied in spring security , Grails

最后都变了- 提交于 2019-12-11 05:31:25
问题 hi In my grails application I am using spring security in one of my view page (GSP) i am making an ajax call to an action in one of the controller but the request is denied and i end up in the "ajaxDenied()' action in Login controller here is my ajax call function setTagged(id) { alert(id); $.ajax({ url: "./email/setTagged", type:"post", // data:{ids:JSON.stringify(idList), option:option, id:id} success: function(data) { alert(data); //<-----this logs the data in browser's console }, error:

Grails renderPdf with pssword protection

懵懂的女人 提交于 2019-12-11 05:01:35
问题 Does anyone know how to apply a password on renderPdf (org.grails.plugins:rendering:2.0.3) on Grails 3.0.8? I have tried googled but not result. 回答1: In order to password-protect your PDF-files you have to use the lower level stuff, like: import org.xhtmlrenderer.pdf.* void renderEncPdf( String url, out ){ def enc = new PDFEncryption( 'userPassword'.bytes, 'ownerPassword'.bytes ) ITextRenderer renderer try{ renderer = new ITextRenderer() renderer.setPDFEncryption enc renderer.setDocument url