]
Wise Guy commented on JBSEAM-1733:
----------------------------------
I'm OK with what you said and have no more comments on the issue.
What I said in this issue is not that JBoss EL is limited. I wanted to propose a way so
that others don't start to think the wrong way: the one I did...
A limitation in the expression language enhancements is not
documented
----------------------------------------------------------------------
Key: JBSEAM-1733
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1733
Project: JBoss Seam
Issue Type: Task
Components: JSF, Documentation, EL
Reporter: Wise Guy
Priority: Minor
There is a limitation in the expression language enhancements that is not documented. It
would look like this:
---
http://docs.jboss.com/seam/2.0.0.B1/reference/en/html/elenhancements.html
Chapter 29. Expression language enhancements
29.1.2. Limitations
29.1.2.3. Cannot pass a variable to a MethodBinding
You may not pass a variable to a MethodBinding, hence the following syntax is not valid:
<ui:repeat var="curLocale"
value="#{localeSelector.supportedLocales}">
<s:link value="#{curLocale.label}"
action="#{localeSelector.selectLanguage(curLocale.value)}"/>
</ui:repeat>
Seam cannot evaluate "curLocale.value" in the rendering phase because it is a
part of a MethodBinding. If you need to do implement the same functionality then use the
f:param tag:
<s:link value="#{curLocale.label}"
action="#{localeProvider.updateLocale()}">
<f:param name="l" value="#{curLocale.value}"/>
</s:link>
Then, having the field variable "l" injected as a @RequestParameter, you would
do this:
public void updateLocale() {
if (l != null && l.length() > 0) {
localeSelector.selectLanguage(l);
}
}
--
May I also point out that you should merge "29.1. Parameterized Method
Bindings" and "29.2. Parameterized Value Bindings". (2.0.0.B1/reference)
Thank you for the attention
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: