我使用腳手架兩個域類幾個控制器的:1扇區到N項:Grails的腳手架鏈路參考問題
class Item {
String name
static belongsTo = [sector:Sector]
....
}
class Sector {
String name
static hasMany = [items:Item]
....
}
當我產生的相應腳手架控制器我使用的模式(類) mgr:Sectormgr.groovy和Itemmgr.groovy。
問題是某些鏈接在某些生成的視圖中無效,因爲它假定我遵循控制器的默認名稱。例如:
- 如果我去/ sectormgr /顯示/ 20,與它相關聯的項目列表中有鏈接/項目/顯示/ 22,而不是/ itemmgr /顯示/ 22
這有一個簡單的解決辦法嗎?我在創建控制器時錯過了什麼嗎?
在此先感謝
我很想知道這是否適合你。請告訴我! – 2010-03-02 13:06:47