Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Set to each block #7

Open
thsaravana opened this issue Oct 18, 2018 · 2 comments
Open

Add Set to each block #7

thsaravana opened this issue Oct 18, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@thsaravana
Copy link
Member

Each block resolves to only List and Map. I guess we should show Set and may be other collections. Go through Handlebars docs and see what's all are allowed.

@thsaravana thsaravana added the enhancement New feature or request label Oct 18, 2018
@thsaravana thsaravana self-assigned this Oct 18, 2018
@thsaravana
Copy link
Member Author

I checked the code for Each in Handlebars Java: https://github.com/jknack/handlebars.java/blob/master/handlebars/src/main/java/com/github/jknack/handlebars/helper/EachHelper.java

It seems the entire Iterable is supported. So we need to handle this in a different way, rather than handling it for List and Set.
Also, during this we can add support for @key, @Index, etc...

@thsaravana
Copy link
Member Author

So it appears that each allows Iterables and any JavaBean. You can just put an object in each, and it will iterate over all the properties in the object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant