Hi,
I am using grails 1.3.4 on windows xp and centos. Tomcat 5 on centos.
I do a 'grails dev war' and 'grails prod war' on an app (as well as a test app I've put together). I take the war file on xp and expand it in another dir. On the centos I can put the war file in tomcat and also in it's own dir. But when I go to run-war or run-ap...
I have a few domain classes, and I want to be able to populate a new Domain class and persist it to the database via one of my controllers. Here are my classes
class Employee implements Comparable
{
static hasMany = [education:Education]
static mapping = {
education cascade:"all,delete-orphan", lazy:false
}
List<...
New clone from git repo, fresh install of groovy and grails. Seems to work for everyone else on my team? New to groovy and grails. Any help or general troubleshooting is appreciated.
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.g...
I have two g:textfields
in the first one I should write a number lets say 12 and in the g:textfield next to it it should load the predetermined name for number 12.
The first one is named 'shipper' and the other 'shipperName'
Whenever I write the code 12 in the 'shipper' txtfield, it should return the name of the shipper in the 'shipperN...
I have different g:textfields throughout my code, and I want to make some of the to only accept numbers or letters, but I don't want to validate for them, I want them to be immediate, like if the textfield does not accept numbers when I try to write one nothing should happen.
Thanks in advance!
FG
...
I have a command object in another package from my controller. I import it in the controller. I create and return an instance of this command from the create action:
def create = {
def reportCreateCommand = new ReportCreateCommand()
reportCreateCommand.name = params.name
reportCreateCommand.jrxmlFile = params.jrxmlFile
r...
To get around this I have to move such classes to src/groovy. It would be nice to have all of my domain model classes in the domains directory rather than split them up.
Update 1:
This is a popular (look for GRAILS-2515) requested feature on the Grails Jira page. If anyone is interested in this feature you can vote and track it here.
U...
Hi there,
I've been wondering if there's a way to configure Spring Security LDAP plugin to perform the authentication not in the standard way but as follows:
If one is able to connect and login to the LDAP server then
the user is authenticated.
Read the authorization from this user's account on LDAP
(this is probably the default be...
When I add submitToRemote to my gsp I Firebug gives me an "Ajax not found" error. I have the jquery library loaded. How do I use submitToRemote with JQuery?
<g:javascript library="jquery-1.4.2.min"/>
<g:javascript library="jquery-ui-1.8.4.custom.min"/>
.
.
.
<g:submitToRemote controller="DefaultSearchController" action="search...
I'm trying to display a jQuery FullCalendar (http://arshaw.com/fullcalendar) inside a Grails GSP and to populate it from a controller. Here is the Javascript code to initialize my calendar:
$('#container').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
ed...
Hi,
For a simple class like,
class Person {
String Name
Double incomeFromWork = new Double(0.0)
static constraints = {
incomeFromWork(min:0d)
}
}
However on the GSP page I get an "HTTP ERROR: 404" error when I enter alphabets for incomeFromWork value. What constraints should I use to accept a valid Double v...
Hey there,
I was trying to display a picture using regular HTML
I have this,
<img src="../../web-app/images/cargo.png" align="left"/>
Maybe I'm doing something wrong there backing up directories with the "../../"
But last time I checked that's how it was done
If there is a simpler and better way to do it via Groovy, or maybe CSS, I'...
Using the Grails Searchable plugin, I've got these classes:
class Person {
static searchable = {
address component: true
}
}
and:
class Address {
static searchable = {
root false
}
String country
}
I want to do a specific search for persons from a specific country. "country:NL" doesn't work. "address:country:NL" doesn't...
Hi
Thanks for reading,
I'm trying to use grails build-in mechanism for loading external configuration files (*.groovy and *.properties) outside the deployed WAR file. The documentation implies this is just a case of setting grails.config.locations with the appropriate classpath: or file: paths.
I've configured Config.groovy with:
Str...
I am working on creating some grails domain objects dynamically and then adding them a SortedSet declared in another grails domain object. I have created a Project class, filled in its values, and checked to make sure it is valid. It is valid, so I want to add this Project to an Employee.
My code essentially goes like this
Employee emp...
Hello All..
I have been working on the project where application is using grails 1.2.2....
Now I want to add the Shiro Security with the current project (using Netbeans), and I am very much new to the grails arena.
So, I wanted to know that how can add shiro plugin to my current project (in netbeans) ? May be I also need to upgrade my...
I'm using a GSP for sending out emails based on the MailService plug-in. The sendMail closure passes (amongst others) body(view:..., model:myModel)
I know that I can access every item of the myModel Map just using ${itemName} in the GSP. However as I sometimes want to build the item name dynamically like 'item'+i, I need to have some su...
Hi all,I'm a novice Grails Programmer.I have 2 use case :
render image file show on GSP Page.
render PDF file and show on PDF Viewer integrate with GSP Page.
Can anyone provide examples of how to do this?
...
I have something like this:
Class person {
string name
string status
boolean working
boolean vacation
}
static constraints = {
name()
status(inList: ["Active","Inactive"])
}
What I need is to show the working and vacation fields in the create and edit views, only if Active is selected in status.
I searched and r...
Hi,
I have a timer class scheduled to execute every 5 mins. I want to start this timer class when tomcat starts up the first time. What would be the best approach to do this in Grails?
Thank You.
Jay Chandran
...