User enter search parameter on the web page. I want to pass on that request parameter to back end java class.
How can I do that?
Example:
test-sightly.html?q=market&maxrows=25
Java class SearchHelper
Can someone give example?
Thanks
Venkat
Solved! Go to Solution.
Views
Replies
Total Likes
For those reading this thread and wanting to know more about Sightly - there are 2 good community articles on Sighty - here is one that shows how to use Sightly with Java in back end:
https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html
See this new AEM Community article that uses Java, Slighty and Sling Models to build a component that is able to parse a DOM.
https://helpx.adobe.com/experience-manager/using/domparser.html
In this example - values that an author enters into a component dialog are passed to the Java back end - such as the URL of the web page to parse.
In addition to these articles - we have this really good web presentation by Feike:
https://www.youtube.com/watch?v=QfvFWSQQ_0M
If you want to pass values from a web page (as opposed to a component dialog that an author enters during design time on the Author instance) - I would look at using AJAX to post values to a servlet. Most Sightly components - the values passed to Java are entered into a component dialog.
Views
Replies
Total Likes
I believe your java class extends WCMUse class and you can call getRequest() method to get the request object - https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/com/adobe/cq/sightly/WCMUse.html#getReque...()
Views
Replies
Total Likes
For those reading this thread and wanting to know more about Sightly - there are 2 good community articles on Sighty - here is one that shows how to use Sightly with Java in back end:
https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html
See this new AEM Community article that uses Java, Slighty and Sling Models to build a component that is able to parse a DOM.
https://helpx.adobe.com/experience-manager/using/domparser.html
In this example - values that an author enters into a component dialog are passed to the Java back end - such as the URL of the web page to parse.
In addition to these articles - we have this really good web presentation by Feike:
https://www.youtube.com/watch?v=QfvFWSQQ_0M
If you want to pass values from a web page (as opposed to a component dialog that an author enters during design time on the Author instance) - I would look at using AJAX to post values to a servlet. Most Sightly components - the values passed to Java are entered into a component dialog.
Views
Replies
Total Likes