Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The changes made for MYFACES-150 allow a different extension to be used for Tiles definitions (the default is .tiles). However, there is a bug in the implementation of this. The definitions factory is lazily loaded by getDefinitionsFactory(), and a non-default extension will be set at this time. The first time renderView() is called, though, it calculates the tilesId before getDefinitionsFactory() gets called, and will therefore use the default extension. On subsequent calls, the correct extension will be used. To fix this, a call needs to be made to getDefinitionsFactory() before the tilesId is calculated, e.g.:
DefinitionsFactory factory = getDefinitionsFactory();
String tilesId = viewId;
int idx = tilesId.lastIndexOf('.');
if (idx > 0)
else
{ tilesId = tilesId + tilesExtension; }...
definition = factory.getDefinition(tilesId, request, servletContext);