Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Alpha1
-
Fix Version/s: 2.0-Alpha1, 2.0.0
-
Component/s: Sample Apps
-
Labels:None
-
Environment:ICEfaces 2.0
Description
Navigation required two clicks to succeed in compat/samples/component-showcase.
This is due to the fact that the detail panels are displayed via <ui:include> which must be evaluated to create the component tree prior to input values being decoded. This caused the selected detail view to lag behind by one step.
The solution is to use the <f:param> directly from the request map in the NavigationBean getter:
public String getSelectedIncludePath() {
//check for a currently selected path to be ready for ui:include
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
String requestedPath = (String) map.get("includePath");
if (null != requestedPath) {
selectedIncludePath = requestedPath;
}
return selectedIncludePath;
}
This is due to the fact that the detail panels are displayed via <ui:include> which must be evaluated to create the component tree prior to input values being decoded. This caused the selected detail view to lag behind by one step.
The solution is to use the <f:param> directly from the request map in the NavigationBean getter:
public String getSelectedIncludePath() {
//check for a currently selected path to be ready for ui:include
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
String requestedPath = (String) map.get("includePath");
if (null != requestedPath) {
selectedIncludePath = requestedPath;
}
return selectedIncludePath;
}
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Occasionally the parameter would be "" and not null – perhaps it was created as a hidden field in the browser and is now being serialized with no value. The following change to NavigationBean addresses this:
+ if ((null != requestedPath) && (requestedPath.length() > 0)) {