2012-11-14 42 views

回答

2

爲了新的ORB標籤添加到模板的編譯過程中,你只需要使用org.mvel2.templates.TemplateCompiler.compileTemplate(String template, Map<String, Class> customNodes)

customNodes地圖寶珠標籤名稱節點類。例如。 @encode{}是名稱爲encode的orb標記,將由自定義節點類HtmlEncodingNode處理。

要找到關於這個問題的更多信息,直接轉到代碼(小文檔)。 org.mvel2.templates.TemplateCompiler.compileFrom是Orb標籤被識別的地方。

此致敬禮, Thim。

相關問題