javaee / mojarra

PLEASE NOTE: This project has moved to Eclipse Foundation and will be archived under the JavaEE GitHub Organization. After Feb. 1, 2021, the new location will be github.com/javaee/mojarra. Mojarra - Oracle's implementation of the JavaServer Faces specification
https://github.com/eclipse-ee4j/mojarra
Other
164 stars 58 forks source link

UIData#invokeOnComponent shouldn't proceed if the clientId doesn't start with the UIData clientId #4262

Open tandraschko opened 7 years ago

tandraschko commented 7 years ago

The new Search Expressions uses findComponent or invokeOnComponent (as fallback) to get a component by id.

I have a case, where the "value" attribute of the dataTable is not yet completely resolveable and it not yet rendered.

If i use invokeOnComponent to search a component, which is placed outside of the datatable, and it hits the datatable, the dataTable will throw a exception because of the unresolvable EL. The best way to fix this would be if UIData#invokeOnComponent would check if the clientIdToSearch starts with the UIData clientId. If it doesn't match, invokeOnComponent in the UIData can be completely skipped.

It's already implemented that way in MyFaces: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.myfaces.core/myfaces-api/2.1.9/javax/faces/component/UIData.java#359

This is likely also a great performance improvement for some cases.

edburns commented 6 years ago

Please see this important message regarding community contributions to Mojarra.

https://javaee.groups.io/g/jsf-spec/message/30

Also, please consider joining that group, as that group has taken the place of the old dev@javaserverfaces.java.net mailing list.

Thanks,

Ed Burns