jakartaee / expression-language

Jakarta Expression Language
https://eclipse.org/ee4j/el
Other
68 stars 49 forks source link

Method parameters only work on 'top-level' managed beans #27

Closed glassfishrobot closed 12 years ago

glassfishrobot commented 12 years ago

When using JSF 2's 'method parameters' feature:

#

{fooBean.add(42)}

The evaluation fails when trying on a child object:

#

{fooBean.foo.add(42)}

As a workaround you can use:

<ui:param name="_foo" value="#

{fooBean.foo}

"/>

{_foo.add(42)}

But this seems like it should work without needing ui:param?

See attached test case.

Copied from <http://java.net/jira/browse/JAVASERVERFACES-2254>.

glassfishrobot commented 6 years ago
glassfishrobot commented 12 years ago

@glassfishrobot Commented Reported by @edburns

glassfishrobot commented 12 years ago

@glassfishrobot Commented kchung said: Which version of glassfish ( and EL ) was the test ran? I built the war and deployed it in V312 and V3 trunk, and couldn't get it to render correctly in both cases. I didn't see any buttons and only get this from the response:

#

{facesContext.externalContext.request.session.servletContext.servletContextName}

Try clicking each of the buttons below. The first will fail. The second will succeed.

Last Eval:

Looks like EL expressions were not evaluated.

glassfishrobot commented 12 years ago

@glassfishrobot Commented kchung said: Ah, I realized that I need to use http://localhost:8080/elparam-1.0/index.jsf to run it!

On V312, and v3 trunk, both seems to run OK. That is, both buttons worked. I don't have the latest glassfish source, but EL should be current.

glassfishrobot commented 12 years ago

@glassfishrobot Commented kennardconsulting said: Confirmed. This does indeed appear to have been fixed somewhere along the line. It is broken in Tomcat 7.0.21, but fixed in Tomcat 7.0.25.

Would it be worth figuring out how this happened? It's not JSF (I used 2.1.3 both times) or el-api.jar (both Tomcats use 2.2.FR), so I guess it must be in the EL implementation somewhere?

Could you help get some regression tests around this?

glassfishrobot commented 12 years ago

@glassfishrobot Commented File: UEL-27-reproducer-ELParamsTest.zip Attached By: @edburns

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA UEL-27

glassfishrobot commented 12 years ago

@glassfishrobot Commented Marked as cannot reproduce on Tuesday, January 24th 2012, 12:17:34 pm