开发者

Need to resolve datatable var reference in JSF 1.1

I am creating a dynamic datatable in JSF 1.1.

HTMLDataTable table = new HTMLDataTabl();
table.setVar("rowObj");
table.setValue(.....);

I'm trying to evaluate the value of var, but it returns null.

FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getApplication.getVariableResolver().resolveVariable("#{rowObj}"开发者_开发百科); // null.

How to get value of variable reference of datatable using JSF 1.1?


You can't get the evaluated value of the var attribute. It's not available in the component tree. It's only available in the rendered output, while the datatable is iterating over its value.

If you elaborate what exactly you need it for, then we may be able to suggest the right approaches. Probably you just need the value instead of var or maybe you don't need it at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜