FaceletViewDeclarationLanguage.getRenderedViewId is not necessary anymore since
JSF 2.0
---------------------------------------------------------------------------------------
Key: MYFACES-3102
URL: https://issues.apache.org/jira/browse/MYFACES-3102
Project: MyFaces Core
Issue Type: Bug
Components: JSR-314
Affects Versions: 2.0.4
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
Checking some stuff, I notice FaceletViewDeclarationLanguage.getRenderedViewId
has this code:
protected String getRenderedViewId(FacesContext context, String actionId)
{
ExternalContext eContext = context.getExternalContext();
String viewId = actionId;
if (eContext.getRequestPathInfo() == null)
{
String viewSuffix = getDefaultSuffix(context);
StringBuilder builder = new StringBuilder(viewId);
viewId = builder.replace(viewId.lastIndexOf('.'), viewId.length(),
viewSuffix).toString();
}
if (log.isLoggable(Level.FINEST))
{
log.finest("ActionId -> ViewId: " + actionId + " -> " + viewId);
}
return viewId;
}
This code replace the suffix with the default suffix used by facelets. In
facelets 1.1.x (FaceletViewHandler), this could have sense, but with jsf 2.0 it
does not, because a new ViewDeclarationLanguage was added, so in theory it is
possible to have multiple extensions to handle facelets files.
This is more relevant in JSF 2.1, because in that part, facelets-processing
feature was added, allowing new extensions like .view.xml and .jspx
The solution is just return the value passed unchanged.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira