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

Support of passing parameters to Sling Model methods #86

Open
mkovacek opened this issue May 30, 2020 · 2 comments
Open

Support of passing parameters to Sling Model methods #86

mkovacek opened this issue May 30, 2020 · 2 comments

Comments

@mkovacek
Copy link

mkovacek commented May 30, 2020

Would be nice if there is possible to call Sling model method which takes parameters.

Example:

Sling model:
public String getMethod(String param1, String param2){ return param1 + param2; }

Htl:

${model.method(value1, value2)} or ${model.method @ value1, value2 } or ${model.method @ param1=value1, param2=value2 }

@rob-heaney-itg
Copy link

I would also like to see this feature 👍

@adobe: Has there been any discussion about the potential to add support for this? (or has anything been added since May 2020 that can provide an equivalent to this?)

@vladbailescu
Copy link
Member

@mkovacek , @rob-heaney-itg , not being able to call methods with parameters is actually intended, not something that was overlooked. The reason behind being that the spec designers wanted to ensure business logic is decoupled from the presentation layer.

CC: @gabrielwalt , @raducotescu

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

No branches or pull requests

3 participants