[
https://issues.apache.org/jira/browse/TREQ-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210499#comment-13210499
]
Mck SembWever commented on TREQ-11:
-----------------------------------
bq. why a new interface to locate Mustache templates? If
ApplicationContext.getResource(...) doesn't deliver, perhaps we should improve
on that instead of creating a new interface.
yes ofc. request.getApplicationContext().getResource().openStream()
(thanks my fault - sorry morten!)
bq. relying on java.io.File / FileFilter seems dangerous to me, it has
cross-platform issues. If the intent is to locate a file on the classpath (as
expressed in the test case), then the file separator should always be "/".
Using File would accept "\" as a separator on Windows, which would be incorrect.
Nice catch Nick! The intent is just to apply a regexp pattern, eg which file
extensions to accept as mustache templates (since mustache can operate on
anything).
bq. Do we need MustacheRequest at all? I don't see it instantiated anywhere.
No not really. Mustache partials don't have a plugin interface so it's not
actually possible. Of course we could fork the java Mustache implementation to
embed tiles functionality, but this wouldn't make sense unless we pushed for
similar functionality in the javascript mustache implementation. And this would
indeed be very cool because the composition tiles provides because a common
abstraction over both the server and client side. (Something i've been thinking
a lot about recently).
I suggest for now we leave it as proof of concept and first just pull in
MustacheRenderer.
> Support for Mustache
> --------------------
>
> Key: TREQ-11
> URL: https://issues.apache.org/jira/browse/TREQ-11
> Project: Tiles Request
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Nicolas Le Bas
> Labels: patch
>
> Morten Lied Johansen has filed a pull request on github:
> https://github.com/apache/tiles/pull/1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira