
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Windows XP Pro, Tomcat 5.5, JDK 1.5.0_04, MyFaces
|
|
|
Not sure if this is a bug but it looks like it.
When navigating to a view (JSF) not implementing the ViewHandler framework from a ViewController t(JSF/bean) that does, currently the prerender() method gets executed on the viewcontroller that you are leaving (that won't get rendered).
My guess is that currently the old FacesConstants.VIEW_NAME_RENDERED entry remains in the request map even though you are not rendering that viewconroller, and that triggers the execution of prerender().
Here is a suggested fix that appears to correct the problem described but I woudn't know if it may brake other stuff.. :
In the setupViewController() method of the ViewViewHandler class:
vc = vr.resolveVariable(context, viewName);
if (vc == null) {
if (log.isDebugEnabled()) {
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId, viewName }));
}
// ---- START OF PROPOSED FIX
context.getExternalContext().getRequestMap() .remove(FacesConstants.VIEW_NAME_RENDERED);
//------END OF FIX-------
return;
}
Hope all makes sense and was helpful.
Cheers!
|
|
Description
|
Not sure if this is a bug but it looks like it.
When navigating to a view (JSF) not implementing the ViewHandler framework from a ViewController t(JSF/bean) that does, currently the prerender() method gets executed on the viewcontroller that you are leaving (that won't get rendered).
My guess is that currently the old FacesConstants.VIEW_NAME_RENDERED entry remains in the request map even though you are not rendering that viewconroller, and that triggers the execution of prerender().
Here is a suggested fix that appears to correct the problem described but I woudn't know if it may brake other stuff.. :
In the setupViewController() method of the ViewViewHandler class:
vc = vr.resolveVariable(context, viewName);
if (vc == null) {
if (log.isDebugEnabled()) {
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId, viewName }));
}
// ---- START OF PROPOSED FIX
context.getExternalContext().getRequestMap() .remove(FacesConstants.VIEW_NAME_RENDERED);
//------END OF FIX-------
return;
}
Hope all makes sense and was helpful.
Cheers!
|
Show » |
made changes - 22/Dec/06 12:22 AM
| Field |
Original Value |
New Value |
|
Description
|
Not sure if this is a bug but it looks like it.
When navigating to a view (JSF) not implementing the ViewHandler framework from a ViewController t(JSF/bean) that does, currently the prerender() method gets executed on the viewcontroller that you are leaving (that won't get rendered).
My guess is that currently the old FacesConstants.VIEW_NAME_RENDERED entry remains in the request map even though you are not rendering that viewconroller, and that triggers the execution of prerender().
Here is a suggested fix (that I have NOT tested) and I woudn't know if it may brake other stuff..
In the setupViewController() method of the ViewViewHandler class:
vc = vr.resolveVariable(context, viewName);
if (vc == null) {
if (log.isDebugEnabled()) {
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId, viewName }));
// ----PROPOSED FIX (not tested) ----
context.getExternalContext().getRequestMap() .remove(FacesConstants.VIEW_NAME_RENDERED);
//------END OF FIX-------
}
return;
}
Hope all makes sense and was helpful.
Cheers!
|
Not sure if this is a bug but it looks like it.
When navigating to a view (JSF) not implementing the ViewHandler framework from a ViewController t(JSF/bean) that does, currently the prerender() method gets executed on the viewcontroller that you are leaving (that won't get rendered).
My guess is that currently the old FacesConstants.VIEW_NAME_RENDERED entry remains in the request map even though you are not rendering that viewconroller, and that triggers the execution of prerender().
Here is a suggested fix (that I have NOT tested) and I woudn't know if it may brake other stuff..
In the setupViewController() method of the ViewViewHandler class:
vc = vr.resolveVariable(context, viewName);
if (vc == null) {
if (log.isDebugEnabled()) {
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId, viewName }));
}
// ----PROPOSED FIX (not tested) ----
context.getExternalContext().getRequestMap() .remove(FacesConstants.VIEW_NAME_RENDERED);
//------END OF FIX-------
return;
}
Hope all makes sense and was helpful.
Cheers!
|
made changes - 22/Dec/06 12:34 AM
|
Description
|
Not sure if this is a bug but it looks like it.
When navigating to a view (JSF) not implementing the ViewHandler framework from a ViewController t(JSF/bean) that does, currently the prerender() method gets executed on the viewcontroller that you are leaving (that won't get rendered).
My guess is that currently the old FacesConstants.VIEW_NAME_RENDERED entry remains in the request map even though you are not rendering that viewconroller, and that triggers the execution of prerender().
Here is a suggested fix (that I have NOT tested) and I woudn't know if it may brake other stuff..
In the setupViewController() method of the ViewViewHandler class:
vc = vr.resolveVariable(context, viewName);
if (vc == null) {
if (log.isDebugEnabled()) {
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId, viewName }));
}
// ----PROPOSED FIX (not tested) ----
context.getExternalContext().getRequestMap() .remove(FacesConstants.VIEW_NAME_RENDERED);
//------END OF FIX-------
return;
}
Hope all makes sense and was helpful.
Cheers!
|
Not sure if this is a bug but it looks like it.
When navigating to a view (JSF) not implementing the ViewHandler framework from a ViewController t(JSF/bean) that does, currently the prerender() method gets executed on the viewcontroller that you are leaving (that won't get rendered).
My guess is that currently the old FacesConstants.VIEW_NAME_RENDERED entry remains in the request map even though you are not rendering that viewconroller, and that triggers the execution of prerender().
Here is a suggested fix that appears to correct the problem described but I woudn't know if it may brake other stuff.. :
In the setupViewController() method of the ViewViewHandler class:
vc = vr.resolveVariable(context, viewName);
if (vc == null) {
if (log.isDebugEnabled()) {
log.debug(messages.getMessage("view.noViewController",
new Object[] { viewId, viewName }));
}
// ---- START OF PROPOSED FIX
context.getExternalContext().getRequestMap() .remove(FacesConstants.VIEW_NAME_RENDERED);
//------END OF FIX-------
return;
}
Hope all makes sense and was helpful.
Cheers!
|
made changes - 22/Dec/06 02:39 AM
|
Assignee
|
|
Craig McClanahan
[ craigmcc
]
|
made changes - 22/Dec/06 02:40 AM
|
Fix Version/s
|
|
1.0.4-SNAPSHOT
[ 21740
]
|
| Repository |
Revision |
Date |
User |
Message |
| ASF |
#489926 |
Sat Dec 23 20:56:29 UTC 2006 |
craigmcc |
Fix the case reported in SHALE-371 (after further discussion) such that, when
you navigate from a ViewController view to a view that does not have a managed
bean name matching the rules in ViewControllerMapper, the prerender() method
on the originating view was mistakenly getting called. Thanks to Stan
Zapryanov for the patch, and the diligent evaluation to provide a reproducible
test case.
|
| Files Changed |
MODIFY
/shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java
|
made changes - 23/Dec/06 08:58 PM
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
made changes - 23/Jan/07 04:40 PM
|
Fix Version/s
|
|
1.0.4
[ 21790
]
|
|
Fix Version/s
|
1.0.4-SNAPSHOT
[ 21740
]
|
|
made changes - 09/Aug/07 07:17 AM
|
Workflow
|
Struts
[ 39068
]
|
Struts - editable closed status
[ 42418
]
|
made changes - 08/Jan/09 08:57 AM
|
Workflow
|
Struts - editable closed status
[ 42418
]
|
Struts - editable closed status (temporary)
[ 46311
]
|
made changes - 08/Jan/09 09:08 AM
|
Workflow
|
Struts - editable closed status (temporary)
[ 46311
]
|
Struts - editable closed status
[ 52944
]
|
|