您的位置:首页 > Web前端 > JavaScript

jsonplugin includeProperties 正则表达式,工作不正常。

2009-09-14 04:11 387 查看
配置
<param name="includeProperties">
/[/d+/]/.[^.]*$,
/[/d+/]/.children/[/d+/]/.catName
</param>
属性 [0].children[1].catName应该能匹配,结果却没有。

修改JSONResult代码如下:

// Add a pattern that does not have the indexed property matching (ie. list/[/d+/] becomes list).

if (patternPiece.endsWith("//]")) {
this.includeProperties.add(Pattern.compile(patternExpr.substring(0, patternExpr.lastIndexOf("//["))));

if (log.isDebugEnabled())
log.debug("Adding include property expression:  " + patternExpr.substring(0, patternExpr.lastIndexOf("//[")));
}
[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: