grails

Combining table, web service data in Grails

I'm trying to figure out the best approach to display combined tables based on matching logic and input search criteria. Here is the situation: We have a table of customers stored locally. The fields of interest are ssn, first name, last name and date of birth. We also have a web service which provides the same information. Some of ...

Grails UI Menu flakey behavior in IE

I'm using a GRAILS UI (1.2-SNAPSHOT) an it's implementation of the YUI menubar (YUI 2.7.0.1). I am seeing flakey mouseover behavior in IE (Firefox is ok). When I mouse over the menu item with a submenu, it will show. As I try to mouse over the sub-menu, the submenu disappears before I can click. This happends in a pattern I haven't fully...

Grails + Tomcat + Ubuntu problem: CLOSE_WAIT connections

I have encountered a really bizarre stability problem in production when running a trivial Grails application using standard components. After some time of normal operation the number of Tomcat (jsvc) TCP connections in state CLOSE_WAIT increases until Tomcat hits its thread ceiling (Maximum number of threads (N) created for connector),...

Grails App not working as WAR in Tomcat - Problem with URL mappings?

I have a grails 1.2 app that I am trying to deploy in Tomcat. If works fine standalone or in jetbrains. I have on controller that is working fine and it is showing pages that use all main facets of the app (database connections, sitemesh integration, etc). I have another controller where there is one action method that works fine, but...

What is the difference between Ruby on Rails and Grails?

Someone asked me to learn Grails and then they said Ruby on Rails. They almost used it interchangeably. What is the difference between the two? ...

DDD with Grails

I cannot find any info about doing Domain Driven Design (DDD) with Grails. I'm looking for any best practices, experience notes or even open source projects that are good examples of DDD with Grails. ...

How to use the package name to differentiate between classes in grails?

Can you use the package name to differentiate between classes in grails? e.g. com.business.appName.DomainClass and com.business.appName.foo.DomainClass? I think that this causes problems as grails needs unique class names. If you try this out it tries to overwrite the view gsps for the com.business.appName.DomainClass when you try t...

Reading content of a URL in Grails/Groovy

Is there are easy way of parsing the whole HTML page and extract a specific section from the code of that page? i.e. i got this URL from the RSS feed of this site: http://www.groundreport.com/Sports/Bret-Hart-says-Farewell-to-WWE_4/2918823 What i want to do is parse that link and retrieve related images, tags, and other info from that p...

Intercepting or renaming a method call in Grails / Groovy

I'm trying to intercept a method call (afterInsert() of a domain class) in a Grails application. In doWithDynamicMethods closure of my plugin I have: for (dc in application.domainClasses) { // What I'm basically doing is renaming method A to B // and creating a new method A with its own business logic // and a call to B() at...

Mapping multiple domain objects to the same table using GORM DSL

Hi, I'm creating a grails app over a legacy database. There is a table out of which I would like to create several different domain objects (Type1, Type2 and Type3 in my example below). The table is like this : ID TYPE DESCRIPTION 1 type1 description of a type1 object 2 type1 description of another type1 object 3 t...

How to login system with http post connection grails?

Hi i am new to grails , i want to create connection to host like(http://ed.yeditepe.edu.tr) with some parameters taken from user(username and password) and then send this parameters with post connection to that host(ed.yeditepe.edu.tr) and make user login to system , any code sample or document for that (by the way user browser must be i...

"java -version" not working in command prompt

I downloaded this: Java platform JDK http://java.sun.com/javase/downloads/index.jsp and installed it. But when i go to the command prompt to check the version, it says it's not recognized anyone else experiencing this issue with the latest Java? i might not have installed the right thing. i need the java that works with grails: ht...

can someone recommend beginners grails tutorials

hi ! i just downloaded grails i dont know java can someone please recommend some basic grails tutorials?? ...

Modifying object in AfterInsert / AfterUpdate

I have a domain object that holds results of a calculation based on parameters that are properties of the same domain object. I'd like to make sure that any time parameters get changed by the user, it recalculates and gets saved properly into the database. I am trying to do that with afterInsert (to make sure calculation is correct i...

Acegi, Grails, JBoss, SSL going back and forth from http<>https

I have installed SSL on my server. My question is how can i forcehttps only on selected controllers/pages via the acegi plugin. Acegi plugin supports a property forcehttps, which when set to true makes all the pages secured once the user logs in. I want to change this behaviour where once the users log off, they should be redirected to ...

Groovy MetaClass - Add category methods to appropriate metaClasses

I have several categories that I use in my Grails plugin. e.g., class Foo { static foo(ClassA a,Object someArg) { ... } static bar(ClassB b,Object... someArgs) { ... } } I'm looking for the best way to add these methods to the meta-classes so that I don't have to use the category classes and can just invoke them as instance me...

Groovy/Grails validations and hasFieldErrors issue

I have created a custom tag that looks like this: def textField = { attrs -> def field = attrs.name.split('\\.')[-1] log.error("--------- Field is ${field}") if (attrs.bean && attrs.bean.errors.hasFieldErrors(field)) { def className = attrs.remove('class') def classStr = 'errors ' if (className) { ...

Grails multiple databases

Hi, how can we write queries on 2 databases . I installed datasources plugin and domain classes are : class Organization { long id long company_id String name static mapping = { version false table 'organization_' id column : 'organizationId' company_id column : 'companyId' name column : 'name' } } ...

Grails and Flex build process integration

I plan to use Grails and Flex in my next project. I would like to use grails command line to construct my project. This should include the flex part as well, compiling swf, executing FlexUnits etc. I would like to compile and add swf file to war when I do “grails war”. How can I accomplish this? ...

[Grails] HibernateException: No session currently bound to execution context

I'm trying to create a very basic REST-ish web service with Grails and Postgres. I have the read() & delete() methods working, but I can't get create() to work. Hibernate just gripes, "HibernateException: No session currently bound to execution context." Here's my create method: def create = { def member = new Member(params) member....