2
Grails(1.3.7)數據綁定行爲因語言環境而異。這是好的,但不適用於我的情況。不同語言環境下的Grails命令對象數據綁定行爲
class XCommand{
Double value
//this value comes from an external service which has no idea about locale so default as en_
//also it is a hidden value, end user is unaware of it
}
如果用戶有不同的Locale
比en
,這個數值涉及到控制器的不同錯誤的雙重價值
什麼解決的辦法?自定義轉換器?或在方法調用周圍更改/恢復語言環境?
其實我需要修復用於特定請求的語言環境,其中存在commandObject綁定 – hgoz 2012-02-22 14:09:41