-
Notifications
You must be signed in to change notification settings - Fork 38.5k
EL expression / Resolved does not update value of bean in some condition [SPR-10380] #15013
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
Comments
jorelia commented Faces config and web.xml |
Phil Webb commented Would you be able to create a pull request for spring-framework-issues containing your example? |
jorelia commented We're trying to figure out, to pinpoint the problem. We cannot definitively send you the software, too big and to complex. But we have a very small platform called ITHB (Integration Technologies Bug Hunter) to pinpoint the problem. We're trying to reproduce the problem. We can send you an adapted version of the ITBH with spring 3.0.6 because initially, the platform run with CDI from Glassfish which is Weld. We have first to convert the application from CDI to Spring 3.0.6. (Shipping soon). ITBH is much less complex to the software we're building but enough complex to be able to reproduce the page layout and the page structure/hierarchy with the same mechanism. What we're trying to determine if the bug is involved because we doing some wrong thing at the UI level, something that is permit with Spring 3.0.6 or because there is a real bug in Spring. The question is why this specific part of this dynamic fragment (datable) is not uptodste as the other and as we used to with spring 3.0.6. There are several issues and problematic with JSF and Richfaces related to the dynamic include of XHTML fragment but also when we mix tag handlers like c:if, c:forEach and variable with components because the "building" time is not the same. But for the moment, what we can say, under Spring 3.0.6, it was working, upgrading to Spring 3.2.1 or 3.2.2 is not, without changing any part at all of our code. |
jorelia commented Here is the ITBH application under Spring 3.0.6. Please, read the readme.txt file at the root of NestedWeb folder for additional info. This zip file contains a EAR and a WEB. You can manually create a web dynamic projet (NestedWeb) into your IDE and import the source files and also create a JavaEE application (NestedEar) which contain your web application. The Web application contains all jar files needed except the richfaces jar files 4.3.1 which are to heavy to be uploaded. We're working to adapt ITBH for having the missing Annul button we have at the real application to try to reproduce the behavior of this issue. |
jorelia commented Here is the version with Spring 3.2.2 with the annul button to return back to the search. However, despit of our endeavor we are not able to reproduce the case. So many things is different such as the servlet (2.5 vs 3.0) container, the J2EE container itslef (WAS vs GlassFish) and the application itself. So the conclusion, may be may be not... :( |
Phil Webb commented I wonder if the issue is with the |
jorelia commented Thx for your reply - However, we cannot use the ui:repeat, neither a4j:repeat because building dynamic tabs require c:forEach tag handler or similar. Such tabs have to be constructed during the building phases, before to be rendered. We have to try the ITBH under WAS and it it still working, we do not have the choice to deconstruct the UI, piece by piece until the UI works again with Spring 3.2.2. There is probably a faulty component or tag or whatever that disturb the ui. There is some issue with JSF with dynamic include and partial request and most of JSF developpers waiting for the 2.2....
|
Phil Webb commented Just to be clear, are you saying that your application works with Spring 3.0.6 but when changing to Spring 3.2.2 it breaks. Moreover Spring is the only dependency that you are changing (your Application Server, JSF implementation etc all remain the same)? |
jorelia commented Yes - exact. |
jorelia commented Please, it might interest you: JAVASERVERFACES-2016 |
jorelia commented We have tested ITBH on WAS 8.0.0.1 and it work perfectly. So, it means that there is something specific to the real application that do not allow to work with Spring 3.2.2. (except the "open" button from the list due to 2.1.20). We have to click twice. The "tab.id" variable is correct. |
jorelia commented Just for background knowledge:
Then, I've also tested the case with JSF 2.1.21 which fix some issues. Moreover we got success in reproducing the bug about a click without backing bean action. Unfortunately, we are still not able to reproduce THIS bug on ITHB despite all our effort. But it is still here on the real application and the upgrade to JSF 2.1.21 did not do anything. |
jorelia commented We have also made additional tests by replacing the a4j:xxxx by the standard JSF button and/or link to have plain POST/GET calls with the effect to reconstruct the whole page and the DOM. Unfortunately, we got the same behavior. Then, it should not be related to the page refresh behavior itself, neither by ajax calls, neither by standard calls. Something has changed related to parsing the el expressions ? |
jorelia commented For your information and to be able to compare, here is a version of ITBH without Spring as CDI. This version use the CDI that should come with Glassfish (Weld). It may help you. just in case. This version works well. |
Bulk closing outdated, unresolved issues. Please, reopen if still relevant. |
jorelia opened SPR-10380 and commented
We run WAS 8.0.0.x (x is 3 to 5) and we also test the case with JSF Mojarra 2.1.17, 2.1.19 and 2.1.20 and also RichFaces 4.2.1 and 4.3.1.
The application is running well under SPRING 3.0.6 whith any of above versions of any above framework with a minor problem with JSF Mojarra 2.1.20
What is happening is a little bit difficult to describe due to the conplexity of the application. However, we think that we have pinpoint a problem around the EL expression in particular conditions.
It's about a Web application in Single Page Application. Then the site is made of only one single page and this page is refreshed by ajax calls and dynamic includes of xhtml.
The problem comes when we include dynanically an XHTML fragment and that fragment contain a rich:datatable. Inside the rich:datatable, we have variable that is not updated with the most recent value. It keeps always the same value. The variable comes from the enclose page that creates dynamic tabs.
If you see the screen capture, we should have a value (-01-3 - green) instead of having the value (01-01) from the red. The variable is not update when the value is inside a rich:datatable / a4j:commandLink
Here is the involved code:
NOTE The variable tab.id is not refreshed when it is inside the datatable. But outside the datatable, the value become again correct. The variable is declared at the index.xhtml page.
Usually, its visibility is at any level even if there is a dynamic included page. It is a global variable.
NOTE In this code, the "tab" variable is declared. The variable is seen by all include pages but not at the datatable component. It keep the old same value from the first call. So its means that it works for the first call but when we destroy the dynamic tab and that we create another one with another Id, the tab.id is kept the first value from the first dynamic tab. Then the value is not uptodate. The strange thing is that the value "client.UUID" is working well !!!
It looks like a bug from RichFaces or JSF but it was working with the version 3.0.6 of Spring. By upgrading Spring to 3.2.1 or 3.2.2 to have the benefit of fix JIRA #11536, it broke the software.
Step de reproduce:
5.1) You got a NPE because the tab variable is not update with the latest value from the newly computed ID of the tab.
5.2 In Spring 3.0.6 it works perfectly but not when we upgraded to Spring 3.2.1 or 3.2.2
Affects: 3.2.1, 3.2.2
Attachments:
The text was updated successfully, but these errors were encountered: