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.
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 4, 2019 12:02 PM UTC

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
Level 10
Mar 4, 2019 2:05 PM UTC

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

Translate
smacdonald2008
Level 10
Mar 4, 2019 2:04 PM UTC

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.

Translate
smacdonald2008
Level 10
Mar 4, 2019 2:01 PM UTC

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.

Translate
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 4, 2019 12:02 PM UTC

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.

Translate