내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to send the values from end user dialog to servlet?

Avatar

이전 커뮤니티 멤버

Hi

How i can send the value to servlet or java class from dialog (not editorial dialog) its just like end user dialog getting information from user and process it in JCR.

When end user clicks the link the dialog needs to opened and collects the details from user and process in JCR via Java Class ?

How it can be achieved ?

"For end user perceptive developer needs to show some dialog and data table etc. In this case which one is recommended in CQ to build the end user elements whether JQUERY or EXT JS??"

Thanks in advance

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

A end user typically fills in data into a CQ web form and submits the data to CQ servlet. Once you get that data at the servlet - you can process it the way you want. You can persist it into the JCR, etc. 

See this community article that teaches you how to get data from an end user using a Sling Servlet and a CQ web page:

http://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

If you want to collect the data using a dialog (instead of a web page), then you can do so. What you do is collect the values from the dialog, and then perform the submit using an AJAX call to the Sling Servlet. 

Hope this helps

원본 게시물의 솔루션 보기

4 답변 개

Avatar

정확한 답변 작성자:
Level 10

A end user typically fills in data into a CQ web form and submits the data to CQ servlet. Once you get that data at the servlet - you can process it the way you want. You can persist it into the JCR, etc. 

See this community article that teaches you how to get data from an end user using a Sling Servlet and a CQ web page:

http://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

If you want to collect the data using a dialog (instead of a web page), then you can do so. What you do is collect the values from the dialog, and then perform the submit using an AJAX call to the Sling Servlet. 

Hope this helps

Avatar

Level 8

Avatar

이전 커뮤니티 멤버

What u said is all exactly right.

It has option for selecting the action when i create a form via drag and drop from sidekick (form components) in this case my request will hit to JSP only not JAVA class.

So in jsp itself the persistence logic needs to perform not in java.

In second case when i create the form by coding in a jsp then i can hit my custom servlet java class as u mentioned in above link right ?

Which one is best way for creating the form ?

Thanks

Avatar

이전 커뮤니티 멤버

I saw this but whether this way is recommended if yes means i which scenario it will suits.

By using this way i mentioned below

<form method="POST" action="/content/page/first" enctype="multipart/form-data"><input type="text" name="width" /><input type="hidden" name="width@TypeHint" value="Long" /><input type="checkbox" name="checked" /><input type="hidden" name="checked@TypeHint" value="Boolean" /><input type="text" name="hobbys"/><input type="text" name="hobbys"/><input type="text" name="hobbys"/><input type="hidden" name="hobbys@TypeHint" value="String[]" /><input type="Submit" /></form>

 

Thanks