Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Invalid
-
Affects Version/s: 1.7.2
-
Component/s: Framework
-
Labels:None
-
Environment:Windows, x86, webflow 1.0.5
-
ICEsoft Forum Reference:
Description
I define a component on my page with a valueChangeListener:
<ice:inputText value="test" valueChangeListener="#{myAction.valueChange}"/>
In my action I retrieve the component from the actionEvent and I change the value of an attribute. For example, I set the 'rendered' attribute to 'false'.
Now, for some reason this attribute gets replaced with the original value (which was true). This happens in the render response phase. The same problem is also seen when doing actual component binding. The result is that I cannot control the components state from my actions anymore.
Note: this seems to be a problem when IN a flow (webflow 1.0.x). When testing the page OUTSIDE a flow it works fine.
This is a problem since 1.7.2 (it worked in 1.7.1)
<ice:inputText value="test" valueChangeListener="#{myAction.valueChange}"/>
In my action I retrieve the component from the actionEvent and I change the value of an attribute. For example, I set the 'rendered' attribute to 'false'.
Now, for some reason this attribute gets replaced with the original value (which was true). This happens in the render response phase. The same problem is also seen when doing actual component binding. The result is that I cannot control the components state from my actions anymore.
Note: this seems to be a problem when IN a flow (webflow 1.0.x). When testing the page OUTSIDE a flow it works fine.
This is a problem since 1.7.2 (it worked in 1.7.1)
This seems to be broken by the the fix for issue:
ICE-3664BridgesFacesContext sets the ViewRoot back to NULL at line 235 (switchToNormalMode).
This method seems to be called upon a GET following a POST.
I understand that
ICE-3664is a fix to ensure that the viewroot is properly rendered on consequent GET requests.However, just setting the viewroot to null will break regression with webflow and cause problems.
Example scenario:
1. A form is being posted, a webflow transition is triggered
2. Webflow executes the action: the action invoked changes an attribute of a certain component on the pages (sets a 'rendered' attribute from false to true for example)
3. Webflow issues a redirect to the browser
4. Broswer follows redirect
5. Server receives a GET request: icefaces sets viewroot to NULL
6. New UIViewRoot is created [b]<------------- at this moment the components are initialized to their default value! The attribute change at step "2" is lost![/b]
7. View gets rendered
If a clean viewroot is created, at least the state of the existing one should be transfered to the new viewstate somehow...