[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1733) A limitation in the expression language enhancements is not documented

Wise Guy (JIRA) jira-events at lists.jboss.org
Fri Jul 27 05:53:47 EDT 2007


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: Documentation, EL, JSF
            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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list