Non-default Tiles extension is not applied on the first request ---------------------------------------------------------------
Key: MYFACES-823 URL: http://issues.apache.org/jira/browse/MYFACES-823 Project: MyFaces Type: Bug Components: Tomahawk Versions: 1.1.0 Reporter: Colin Sharples Priority: Minor 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) { tilesId = tilesId.substring(0, idx) + tilesExtension; } else { tilesId = tilesId + tilesExtension; } ... definition = factory.getDefinition(tilesId, request, servletContext); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira