Hi
For learning purposes I created a toy project using grails.
In this project I would like to play an mp3 file in one of my views.
I found an html5/flash mp3 player. But when the music is supposed to play, I have a question.
The HTML 5 player is in the project/web-app/js folder. Everything else is in its normal place.
When I try to acc...
have a project set up like the following:
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
@XmlRootEle...
Alright I asked a question before but wasn't quite sure about it. So I went ahead and waited till now to ask again.
Main Question
How do I add a new instance of the domain through the controller? I created a function named gather to read a file with data and then create a new Book with the specific information, however it is not adding...
I am getting the below error when I try to use Xstream to marshal one of my groovy domain classes Employee. Employee hasmany employeDesiredSkills, which belongsTo Skill and Employee
Here is the relevant Xstream code
employeeInstance = new Employee();
XStream xstream = new XStream();
Xstream.alias("employee", Employee.class);
String x...
Below is my code.
Here I am getting an error which is 'No such property: it for class: emp.EmployeeController'.
I think I am doing something wrong here.
Any advice??
def list ={
def id=params.id
def results
String employee="SELECT empName, empDate, empNo from employee where empId='id'"
String referrer="SELECT emp...
Hi, i get a strange behaviour of IE and FF while perfoming an ajax callM; Chrome works as expected for me ;)
In Grails i use the <g:formRemote/> Tag which results in the following code :
<form onsubmit="jQuery.ajax({type:'POST',
data:jQuery(this).serialize(),
url:'/url/morUrl',...
it is very common to use domainClass.properties = params to bind all incoming request params to a domain class object. i do not understand why this assignment automatically updates the domain object. e.g.
def update = {
def book = Book.get(1)
book.properties = params
book.discard()
}
the params assignment updates the domain obje...
For the life of me I cannot seem to get relationships to work on mapped tables with Grails. I have two domains I am trying to join, Resources and Cassettes. A Resource can have many Cassettes.
If i run the code below using scaffolding I get an error "Unknown column 'this_.cassette_id' in 'field list'". If i try to define the cassette_i...
I've asked the exact same question on nabble here
I'm trying to send params or different domains in the controller integration test.
But can't get them to bind to the domain class with the prefix of "book"
//Controller action being tested
def saveBook = {
def book = new Book()
bindData(book, params["book"], [include: ['publicPrivacy'...
Let's say I have a combobox with the options GENERAL, AIR, GROUND, and SEA
<g:select name="group" from="${['GENERAL', 'AIR', 'GROUND', 'SEA']}" valueMessagePrefix="default.category" value="${tipoN}" />
And then another combobox that loads certain information depending whether you select GENERAL, AIR, GROUND, or SEA.
Let's say GROUND ...
Hi,
folllowing scenario to query for list of items from domain:
class A {
SortedSet items
}
Second line is code to be used in GSP
A1) domain and namedQuery
static namedQueries = {
filteredListItems { params ->
...
}
}
A.filteredListItems(params)
A2) domain methode
def filteredListItems = { params ->
...
I have a list with information and I want to export it to Excel.
How do I do it?
Is the "Export Plugin" any good? I think I saw one a while ago to export files to Excel but I can't find it anymore.
...
I am using the Rendering plugin to generate a PDF from within a Web Flow. The problem is that I cannot get my end state to return the PDF response. If I call:
renderPdf(template: "/letter/generate/createpdf", model: [letter: flow.letter], filename: 'doc.pdf')
From within my end state action, it still tries to return an end state view....
Hi,
I am to do validation for my application. I have installed javascript-validation and made chnage sto code as per steps on http://dave-klein.blogspot.com/.
I have followed the exact steps.
However when I submit my page, instead of getting the validations for the ones for which constraints are written, i am getting for some more of t...
Hi all,
I have domain Classes "Project" and "User" and need to implement authentication using Spring Secutity plugin.
The default implementation of this plugin provides us to create ROLES that are User specific. But in my project I need to create Project specific ROLES for the USER and need to authenticate them.
e.g. User-A can be an...
Is there a tab control in Grails that has the following features:
Programmatically open new tabs
Programmatically select tabs
Each open tab has an id to identify it
Each open tab has a flag to indicate if it's closable
Thanks.
...
Is there a way to recover the last generated auto_increment identifier generated by an insert when using Hibernate ?
I know from my php background that you can get this information by way of a function call like mysql_insert_id(). I'm operating in grails and using HQL to get a performance boost on some insert operations, but I need to ...
I just changed all of the classes in my grails project to a new package. This involved adding the package syntax, and creating the folder structure accordingly. Now I am getting the following hibernate.MappingException:
2010-09-23 15:31:16,755 [main] ERROR [localhost].[/SkillsDB] - Exception sending context initialized event to listene...
Hello All.
I have been working on a project which uses Grails with Hibernate...
Now the project is up and running very well now, but the thing that I need to integrate is the most important part of project i.e. Security.
So, for security I have found out some of the plugins that are available with grails like ACEGI (i think it's Sprin...
def createFlow = {
println "1"
def conferenceInstance = new Conference ()
start {
println "2"
action {
println "3"
flow.planAccountExistList = Account.findAllByPlanIsNotNullAndCustomer(session.customer)
println "4"
}
println "5"
on('success').to('accounts')
println "6"
}
accounts {
print...