-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MYFACES-4695: Allow searching for ids with separator character [5.0] #806
Conversation
We need a unittest for this case before applying here something |
I'll add it next. Just making sure the change looks okay and the existing tests pass. |
70343fc
to
1737396
Compare
Added a test -- without my fix it fails with
|
i dont think the case is valid, it needs to be |
I see this as more of a convenience. The spec describes the search algorithm here: https://jakarta.ee/specifications/faces/4.1/apidocs/jakarta.faces/jakarta/faces/component/search/searchexpressionhandler However, it also states "The search algorithm must operate as follows, though alternate algorithms may be used as long as the end result is the same:" If the component can't be found, then it will throw an exception (due to your change), but, in my opinion, it should keep searching, if possible, to find the component. As for the code, we do a bottom - up search (see this line) if we can't find the component, should we use try from the root instead? Let me know what you think. Thanks |
its clearly described in the specs: |
and its like this for ages, in both JSF impls and also in the past in the native PF expressions |
One more data point -- this previously worked in 2.2, but then changed in 2.3 due to addition of the SearchExpressionHandler API. |
i think it was a hack around it, it matches your example: |
im really happy that both myfaces and mojarra uses almost the exact same impl for this very old topic and that we could even remove the native PF expressions if add such a hack again, we should make it disabled per default, just to allow users to migrate their old app |
Can you Test it in mojarra? |
Mojarra 4.1.2 works without needing the prepended |
Then let me check it |
impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionHandlerImpl.java
Outdated
Show resolved
Hide resolved
Update per Thomas' comment
1737396
to
3455c23
Compare
+1 |
No description provided.