safe. If you cache the results of backend calls per request you can
On May 12, 1:26 pm, S Ahmed <
sahmed1...@gmail.com> wrote:
> Good points and I was thinking of those casts already.
>
> I was thinking of creating safe wrappers of my objects that would map
> whatever fields I want to expose, so before putting them in the HashMap
> that I was to mustache, I would wrap them in these safe-to-expose
> properties that would map the fields I want to expose.
>
> OR
>
> I could maybe add annotations on the properties that I want to expose
> (whitelist), so something like:
>
> public class User {
> @MustacheWhitelist
> private String username;
> private String password;
>
> }
>
> Also, if I have to push to many things to the view, I could always run a
> regex on the template and build list of items that user has asked for, and
> only push those things down to the view.
>