Hi ,
I need to update my data that have html tag inside so wrote this on liquibase
<sql> update table_something set table_content = " something <br/> in the next line " </sql>
it apparently doesn't work on liquibase ( i got loooong errors .. and meaningless). I tried to remove <br/> and it works.
my question is, is it possible to in...
Hi,
I need to write a script for a Grails application that modifies persistent data, send e-mails to users, etc.
While there's nothing Grails-specific about this - I could accomplish these tasks using JDBC, JavaMail - I'm hoping there's a better way. Specifically, if I could write a Groovy script which has access to the Spring beans, a...
I'm relatively new to Groovy and Grails and am trying them out in my spare time. I've got a small test Grails application that I'm able to run fine using grails run-app, but grails run-war results in an error.
In the grails-app/conf/BootStrip.init method, I'm adding some property getters onto the DefaultGrailsControllerClass and Defaul...
I've recently upgraded from Grails 1.1 to Grails 1.1.1. I've updated my projects accordingly using "grails upgrade".
However, IntelliJ does not seem to have picked up the upgrade so when opening my Grails project I get the following dialog:
Application has Grails version 1.1.1, but current Grails version is 1.1. Upgrade application?...
Hi!
I am creating a web app in Grails and I would like to continuously (every 5 minutes or so) poll a REST service using GET, which retrieves a series of messages (or possibly none, it depends) and once it is donde, my application should save the retrieved data as an object and store it in my database. The problem is that I have no idea...
ItemTag objects contain an Item object and a Tag object. (These are Java domain objects.)
This simple query works as expected. I get back a list ItemTags and can do all the wonderful things that ItemTags are supposed to do:
def theTags1 = ItemTag.findAll("from ItemTag b")
For example:
println(theTags1[0].tag.tag)
gives me this as...
I have been using Grails for the past few months and I really like it, specially GORM. However, I am getting interested into Scala's Lift. Therefore, I would like to know your opinion about which kind of web apps are better suited for which of those two frameworks or it is just a matter of taste, which framework to use?
Finally, which o...
Hi,
In my Grails app, I have defined the following (simplified) web flow
def registerFlow = {
start {
action {RegistrationCommand cmd ->
try {
memberService.validateRegistrationCommandDTO(cmd)
} catch (MemberException ex) {
flow.regErrorCode = ex.err...
I'm looking to add the ability to create a gantt chart to my web application. Currently my application is Grails based running on Tomcat.
Research around SO seems to indicate that JFreeChart (http://www.jfree.org/jfreechart/) and Google Charts both might provide me with the ability to create charts that I could mold into what I need.
B...
Given the following example from Hibernate Make Easy, how can I call the named query, user.findByLoginName in Grails?
package com.examscam.model;
import javax.persistence.*;
import org.hibernate.Session;
import com.examscam.HibernateUtil;
@Entity
@Table(name = "user", schema = "examscam")
@NamedQuery(name="user.findByLoginName",
quer...
I am doing a mashup using Google Maps under Grails where users can create geofences by selecting a point on the map and a radius. This get stored on my database and the application receives constantly a set of coordinates from a GPS device.
I would like to compare the received coordinates with the area stored in the circles. If the poin...
I am new to unit testing and mocking. I am trying to unit test an abstract domain class in Grails. How should I mock an implementation so I can unit test the constraints of the domain class? Is there a way to use the mock libraries that come with groovy or grails? Should I just implement a class that simply extends the abstract class?
...
Unit testing Abstract classes in Groovy
I asked a question previous about unit testing and mocking a domain class, but I do not think I was specific enough. I have a domain class:
package toplevel.domain
abstract class Party {
static hasMany = [roles:PartyRole]
static constraints = {
roles(nullable:true)
dateCr...
Hi!
How would you model a friend - friendship relationship in Grails? Until now my User class had many followers
class User {
//Searchable plugin
static searchable = true
String userId
String password
boolean enabled = true
// For Spring Security plugin's user registration.
String email
String userRealName
boolean emailShow
Date dat...
Hi everyone!
Has anyone implemented the Yahoo Fire Eagle API in a Java / Grails application? How did you do it?
I want to poll their REST web service with my Grails application. Yahoo offers some API Kits for various programming languages such as PHP, Ruby, etc. Unfortunately, there is nothing similar available for Java / Groovy (there...
Hi,
I have 2 domains .. master and details.
Master{
String masterName;
static hasMany=[details:Detail]
}
Detail
{
String detailName ;
static belongsTo =[master:Master];
}
I have form that handle the save
def save = {
.....
def master = new Master(params);
params.detailsName.eachWithIndex(dtName, index ->
def detail =...
Hello,
i have a grails application with a webflow. I store my inner flow objects of interest in the converstaion scope. After entering and leaving the flow a few times, i see that the single user connected to the DB (MySql) generates a lot of threads on the MySql Server which are not released. The processlist in mysql show me the thread...
Looking for a way to include a conditional reference attached to a relation between two objects, for example
class Person {
String firstName
String lastName
static hasMany = [ readyNow: Role, readyLater : Role, emergencyReplacement: Role]
static belongsTo = Role
static constraints = {
}
String toString() {
return firstName + " " + l...
I have a domain object in Grails that needs to store a set of key/value pairs for each instance. There should never be more then about 10 pairs. The users of the application have to be able to edit these key/value pairs. Right now I'm looking at storing the data in a HashMap for each instance of the domain class. While I think this will ...
I really like plone as a CMS, but its base is in Python. I would like to know if there is a CMS that has Grails as a base.
...