JSF el表达式如何工作,以及在评估任何JSF扩展时何时涉及JSF变量解析器? [英] How JSF el expression works and when a JSF variable resolver will be involved while evaluating any JSF exprestion?

查看:146
本文介绍了JSF el表达式如何工作,以及在评估任何JSF扩展时何时涉及JSF变量解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点困惑.

这就是JSF EL的工作方式,以及在评估类似表达式时如何使用变量解析器.

That's how a JSF EL will work and how variable resolver involved while evaluating expressions like.

<h:outputlabel value="#{text.value}"/>

<h:outputlabel value="#{text['value']}"/>

文本是指束var arg,值是属性文件中的键.

Text refers to bundle var arg and value is the key in properties file.

从消息属性读取属性值时,帮助我理解上述表达式的计算.

Help me in understanding the evaluation of above expression when reading a property value from message properties.

谢谢.

关于, Ganesh karanam

Regards, Ganesh karanam

推荐答案

JSF使用统一的EL 用于评估表达式.该规范使用 ELResolvers 确定所引用变量的值在表达式中.

JSF uses Unified EL for evaluating expressions. The specification uses ELResolvers to determine the value of variables referenced in the expression.

文本"变量可能存储在标准范围(页面,请求,会话或应用程序)中. ScopedAttributeELResolver 可以从中查找对象这些范围.然后,由ELResolver返回的'text'变量的对象用作解析'value'属性的基础.

The 'text' variable is likely getting stored in a standard scope (page, request, session, or application). The ScopedAttributeELResolver handles looking up objects from these scopes. The object returned by the ELResolver for 'text' variable is then used as the base for resolving the 'value' property.

有一个 ResourceBundleELResolver 知道如何访问 ResourceBundle 中包含的对象. ResourceBundleELResolver将处理查找测试"变量的值"属性.

There is a ResourceBundleELResolver that knows how to access objects contained within a ResourceBundle. The ResourceBundleELResolver will handle the looking up the 'value' property of the 'test' variable.

这篇关于JSF el表达式如何工作,以及在评估任何JSF扩展时何时涉及JSF变量解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆