Grails 1.1RC1 problem with PermGem: How to?

C:\grails-1.1-RC1\bin\startGrails.bat if “%JAVA_OPTS%” == “” set JAVA_OPTS=”-Xmx512m” set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=512m

IntelliJ C:\Program Files\JetBrains\IntelliJ IDEA 8.1\bin\idea.exe.vmoptions -Xms512m -Xmx512m -XX:MaxPermSize=512m -ea

Mini guide to rendering JSON with Grails

Grails has built-in support for a JSON building DSL, which, together with the render controller dynamic method, makes rendering JSON responses an enjoyable job. But there seems to be a lack of consolidated information in the official documentation to clarify all the bits about getting anything you want in JSON. So here’s my little mini guide to share with you.
Ground Rules
As the JSON spec reads,

JSON is built on two structures:

A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

So there are only two rules for rendering JSON with Grails.
Continue reading “Mini guide to rendering JSON with Grails” »

Integrating a simple Flex search application with Grails (Bill Bejeck)

This articles comes from Adobe’s Developer connection. Bill Bejeck, a software engineer for Near Infinity in northern Virginia, demonstrates how a Flex client can communicate with a Grails applications. He lays out pretty well everything you need to follow the steps (tools and code).

The Grails framework greatly simplifies the task of building [...]

Open .GSP file with Dreamweaver CS3

ไฟล์ GSP (Groovy Server Page) เป็นไฟล์สำหรับแสดงผลของ Grails ทำงานเหมือน JSP (Java Server Page) แต่เนื่องจาก Dreamweaver CS3 ไม่รองรับไฟล์สกุล GSP จึงไม่สามารถเปิดได้

ดังนั้น เราต้องทำการบอกให้ Dream รู้จักไฟล์สกุล GSP ดังนี้

1. ไปที่เก็บ Config ต่างๆ ของ Dream Win XP: C:\Document and Setting\…\Adobe\Dreamweaver 9\Configuration Win Vista: C:\Users\<USER NAME>\AppData\Roaming\Adobe\Dreamweaver 9\Configuration

เปิดไฟล์ Extensions.txt ใส่ GSP:Groovy Server Page ในบรรทัดใหม่

2. ไปที่โฟลเดอร์ CodeColoring เปิดไฟล์ CodeColoring.xml ใส่ [...]

พื้นฐานที่ควรรู้ของ Grails โปรเจ็ค

การสร้าง Grail project

grails create-app

โดยจะได้โครงสร้างของไฟล์ดังนี้

%PROJECT_HOME% + grails-app + conf —> ตำแหน่งสำหรับเก็บ artifacts เพื่อการปรับแต่ง เช่น data sources + controllers —> ตำแหน่งสำหรับเก็บ controller artifacts + domain —> ตำแหน่งสำหรับเก็บ domain classes + i18n —> ตำแหน่งสำหรับเก็บไฟล์ข้อความเพื่อการทำ i18n + services —> ตำแหน่งสำหรับเก็บ services + taglib —> ตำแหน่งสำหรับเก็บ tag libraries + views —> ตำแหน่งสำหรับเก็บ views + layouts —> [...]