This content has been marked as final.
Show 1 reply
-
1. Re: Evaluating .ecss resource programatically
lfryc Mar 11, 2013 4:28 AM (in response to amitev)Hey Adrian,
the ECSS resource can be evaluated using createCompiledCSSResource method
but you need to call createResource method because of visibility issue.
However you need to obtain the instance of ResourceFactoryImpl first - it's not available from the context, so you can access it via ResourceHandlerImpl#createResource method which delegates to ResourceFactoryImpl instance.
RichFaces' resource handler can be obtained using FacesContext.getApplication().getResourceHandler();
At the end, you can use Resource#getInputStream() on created Resource object in order to evaluate ECSS resource.