2009-03-12から1日間の記事一覧

独自のユーザードメインを使う方法

ドキュメントによると、Config.groovyに authenticationUserClass = 独自のドメインクラスのように独自のドメインクラスを指定できるとなっているが、どうも期待通りの動きをしない様子。調べたところ、authentication-1.0/grails-app/services/Authenticati…

Run Grails TargetをGoogle Desktopが食ってしまう件

RunGrailsTargetはCtrl+Alt+Gに割り当てられているのが、GoogleDesktopとかぶる。http://desktop.google.com/support/bin/answer.py?hl=jp&answer=37219調べたところ、レジストリいじるしかない模様。

PERSISTENCE OF COLLECTIONS OF BASIC TYPESを試す

grails-1.1の新機能を試す。hasManyにStringとか普通のクラスを指定する。 class Person { static constraints = { name() email() } static hasMany = [nickNames:String] String name String email } このドメインクラスで、以下のテーブルが作られる。 my…

g:actionSubmitの使い方

昨晩ごにょごにょいってた件。ドキュメントに思い切り書いてあるな。。 Creates a submit button that maps to a specific action, which allows you to have multiple submit buttons in a single form. Javascript event handlers can be added using the …

grails-1.1リリース

grails-1.1がリリースされてました。Grails 1.1 リリースノート: http://www.grails.org/1.1+Release+Notes Grails 1.1 ドキュメント : http://grails.org/doc/1.1.x/ さらっと見た感じ、GORMがgrailsから独立して使えるようになったり、 hasManyでStringと…

g:actionSubmitで404

<g:form controller="user" action="test" > name: <g:textField name="name"/><br/> desc: <g:textField name="desc"/><br/> <input type="submit" value="submit"/> <g:actionSubmit value="submit"/> </g:form> こんな感じで適当なformを作る。 UserControllerにもtestアクションを定義しておく。 これだけ。 def test = { render params.name +":"+params…

authenticationプラグインをちょっと触る

サインアップ用のformの作り方がオフィシャルなドキュメントに書いてあったので試したのだが、どうもうまくいかない。 <g:if test="${flash.authenticationFailure}"> Login failed: ${message(code:"authentication.failure."+flash.authenticationFailure.result).encodeAsHTML()} </g:if>