grails

Update Drop Down Value in Grails using <g:submitToRemote>

Hello All.. I have just entered into the Grails arena. I have a requirement where I want to put one drop down and one button on one page, and by clicking on button only that drop down values should be changed, other controls on the page should remain unchanged. My code is as follows : _connType.gsp <div id="mappedDeviceDiv"> <se...

Grails - using subdomain of localhost on run-app

Is there any way of configuring the embedded tomcat (from run-app) to respond to myapp.localhost:8080 instead of localhost:8080/myapp ? ...

grails: grailsui : cannot access dataTable outside <gui> tag

Hi, I tried to access Datatable outside gui tag, but failed. Could some tell me why? thanks. the code like this: <gui:dataTable id="myDataTable" .../> <script> var data = GRAILSUI.myDataTable; alert("hi, " + data); </script> it ends with "hi, undefined" ...

NoClassDefFound trying to use java class and docx4j from grails controller

I have a groovy file that is trying to call some methods from a Java class that I have set up using docx4j to parse .docx files When I set up a pure java test program in eclipse, I am able to do this fine. However, when I have my .groovy file set up, I get no compilation errors, but at runtime I get this stack trace: org.codehaus.groo...

Is it possible to use a JNDI dataSource read only in Grails?

Hi, I need to add a JNDI datasource from a legacy database to my Grails (1.2.2) application. So far, the resource is added to my Tomcat (5.5) and DataSource.groovy contains: development { dataSource { jndiName = "jdbc/lrc_legacy_db" } } I also created some domain objects mapping the different tables to comfortably load...

How do you test default sort in a grails unit test with mocked domains

Is it possible to test the sort 'propertyName' which is defined in the staticMappingBlock This works during the integration phase but not during the unit phase where my domain has static mapping = { sort 'lastName' } void testDefaultSortOrder(){ def agent1 = new CommissionAgent(firstName: 'fred', lastName: 'b', active:true).s...

Auto-generate Grails domains based on Database Schema?

Is there an app or a script that is available that will allow me to auto generate grails domain classes based on the tables in an existing database? ...

How to retain Form Parameters in Grails

I have a similar problem here. I have a page which accepts 3 parameters. i enter the parameters and the control goes to the list action. The list action has the code to query db and get the data on list.gsp page. Now when i hit "download to excel" on the same page, i want the same list action to get triggered and the same query to be run...

Grails can't resolve plugin

When I try to run a grails app, I'm told that grails can't resolve the following dependencies: :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.grails.plugins#code-coverage;1.1.8: not foun...

Grails custom server page (custom gsp)

I have a controller and a gsp. I go ahead and attempt to build the project but receive issues on my gsp. It is telling me "The current scope already contains a variable of the name it" <html> <head> <title>Book Collector</title> <meta name="layout" content="main" /> </head> <body> <h1>Book Editor</h1> <table> ...

Export Functionality Error

Below is my code in the controller. I have a page that takes empId and empDt as an input. based on that the query is run and results are displayed on the screen. I want these tabular results to be exported to an excel. For that I installed the export plugin. and put However, I m not able to export to excel. I think I am doing somethi...

Grails Mail plugin not working

I am trying to send mails from a Grails application, but without any success. I've used gmail and other smtp server (without ssl!) but the same error occurs: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response; nested exception is: ...

Grails or Gaelyk for medium sized application

I'm planing to start working on a medium sized application (not too complex but not too simple either) that'll run on the google app engine. I had earlier decided to use Gaelyk because of the support it provides for GAE but I have discovered that it has no templating support. Is Grails then better suited for this purpose? Or can Grails t...

Grails conversionPattern change at runtime

Hi everyone, Using a standard log4j configuration for my grails app, with a custom conversion pattern like that : log4j = { appenders { console name:'stdout', layout:pattern(conversionPattern: '[%-7p][%d{dd/MM/yyyy HH:mm:ss,SSS}] %C %m%n') } root { warn 'stdout' additivity = true } error 'org.grails.plugins.springsecu...

Grails Controller Testing - Problems with dynamic methods

Hi, I'm running some old (but valid, i'm told) tests on a legacy application, and notice that many of them arent working. The error message usually is 'No method signature for some dymamic method' After using mockDomain I managed to solve that problem. However, I can't figure out how to test controllers that create objects inside. Fo...

Navigation plugin throws toLower exception rendering subItems

My question is how do i get the grails navigation plugin to show subItems? I did a simple thing and added the following to top of my Controller: class DummyController { static navigation = [group: 'tabs', title: 'dummy', action: 'list', subItems: ['create', 'sa...

Grails - Multiple Drop Down Boxes Values

Hey I am learning Grails. I've been playing with it for a while but nothing too serious. And let's say I have two drop down boxes, one with the type of animal and the second with the breed. How do I give the second box the values?? For example, If I select dog, it should only show me dog breeds, not the cat ones. Thanks in advance. ...

How to handle correctly a URL having twice the same parameters with same values?

Using Grails 1.3.3, when requesting url link: /myapp/mycontroller/myaction?p1=v1&p2=v2&p1=v1 then params injected value into Grails controller will contain : assert params.p1== ['v1','v1'] It would have been logical to me that params.p1 equals to 'v1', no? In any case, is there any way to change this behavior? Thank you. ...

Deploying Grails on a Production Env. (Hibernate tries updating schema)

Hi there, I am deploying to a unix box running Jboss. We are using SQL Server 2008 as our database. Once deployed I push the changes by re-deploying the war to the environment. I see server.log has errors, seems hibernate tries to re-generate/modify tables already created. I am using dbCreate = "update" setting in my datasource.groov...

What is the convention for table and column names in HSQLDB when using grails?

If I have a FooBar entity with a fizzBuzz field, what will the resulting table and column names be in HSQL? Would they be FOO_BAR and FIZZ_BUZZ? Or FooBar and fizzBuzz? Or . . . ...