我有一个简单的场景,这个例子来自 PrimeFaces,但我想它适用于我将以类似方式使用的每个标签:
<p:autoComplete value="#{address.country}" id="#{layoutId}_country"
completeMethod="#{addressBean.completeCountry}" var="country"
itemLabel="#{country.name}" itemValue="#{country}"
converter="#{countryConverter}">
</p:autoComplete>
在 bean 的方法中(例如 addressBean.completeCounty),我可以访问 AutoComplete 对象。我想得到的是它的值(#{address.country})的引用,而不是值本身。
那是什么地方?