-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added request attribute annotation. #119
base: master
Are you sure you want to change the base?
Added request attribute annotation. #119
Conversation
…y-use=${'com.cognifide.slice.TestModel' @ myAttribute='aValue'} to read out the attribute
…ys available, in contrast of sling servlet request)
Have to see to add some tests maybe |
Did this change make it into the codebase via another means, or is it still waiting merge? I tried to use this approach today (albeit with the Sling RequestAttibute annotation) on a project using Slice 4.3.2 but without joy. If it's in a newer version I can try updating to use it. |
Never found the time to fix the remarks to be honest, so it isnt in the main branch no. You are welcome to fix the remarks and get it merged, its as good as finished |
Hey @royteeuwen thanks for the speedy reply. This is tempting, I might give it a go. But... Logo update aside, this looks dead. It's not seen an update for three years now. @mmajchrzak is this project still alive, or is it now hosted and updated elsewhere? |
Hey @antonyh, we definitly still use this project and even updated to aem 6.5 with java 11. There is a slice 4.5 release that supports this, but the docs havent been updated. I also find Slice pretty feature-complete, we dont need an entire new Spring, thats what the other bundles from AEM are for. But on the other hand is Sling Models probably the way to go if you would start from scratch for a new project, because it is OOTB included |
Quite agree, Sling Models is superior, but legacy code needs to be maintained and enhanced. As an aside, I found a way to achieve my objective without needing to use |
Hi @antonyh. This project has been put into "maintenance mode". We support it (and as @royteeuwen said there was even a release to make it java 11 compatible) but we've stopped actively add new things. The top reason for this is that it's hard to compete with SlingModels as it comes OOTB and does most of what Slice can do. Imo SlingModels still lacks decent dependency injection but its custom one is good enough for simple models and simple business logic. And to be fair, a need for robust DI in AEM is diminished every year as things are moved outside of AEM into middle layers or front. |
Hey guys!
I saw following request on the slice-users list, and decided to implement it: http://slice-users.2340343.n4.nabble.com/Pass-Parameters-from-Sightly-to-Slice-td66.html
I have added a new annotation, @RequestAttribute, where you can inject a request attribute into a slice resource. This can then be used in the following way:
data-sly-use=${'com.cognifide.slice.TestModel' @ myAttribute='aValue'}
What do you guys think?