How to pass hash value from URL to java via sightly? | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gaurav-Behl

I believe when you adapt the Model from SlingHttpServletRequest, it should be available from your request. If not, then you may retrieve it in js/jquery/any other framework/lib and then pass it to server via ajax/form post/hidden param etc. based on your use case.

4 replies

smacdonald2008
New Participant
March 4, 2019

See this article - where we use a custom color picker as an example - Adobe Experience Manager Help | Creating a custom Experience Manager 6.4 sling:resourceType for Touch UI

smacdonald2008
New Participant
March 4, 2019

Or a possible solution here is to build a custom sling resource type - which is based on JavaScript anyhow. THen you can get this value via the custom type and pass as part of the component dialog.

smacdonald2008
New Participant
March 4, 2019

As Gaurav suggests - try to pass to a Java AEM service using AJAX. TYpically values are passed to HTL Java via component dialogs. However - this value cannot be passed in this manner.

Gaurav-Behl
Gaurav-BehlAccepted solution
New Participant
March 4, 2019

I believe when you adapt the Model from SlingHttpServletRequest, it should be available from your request. If not, then you may retrieve it in js/jquery/any other framework/lib and then pass it to server via ajax/form post/hidden param etc. based on your use case.