How to get adaptive form field value in post.POST.jsp for the field having bind reference ? | Community
Skip to main content
Employee
May 7, 2020
Solved

How to get adaptive form field value in post.POST.jsp for the field having bind reference ?

  • May 7, 2020
  • 3 replies
  • 5866 views

I have created a simple adaptive form and I have created custom submit action(post.POST.jsp) for this form and calling OSGi service inside post.POST.jsp.
Now when I retrieve form field value in post.POST.jsp for field having No bind reference , I get it eazly as below(in classic way)

 
String firstName = request.getParameter("firstName");

but if I do the same for the field having bind reference it gives null.


I tried with below to get form data having bind reference 
Document dataXml = null;
    if(slingRequest.getParameter("jcr:data")!=null) {
        dataXml = new Document(slingRequest.getRequestParameter("jcr:data").get());
     }

and it works fine because I need to get all data in an XML Document and them read all fields value.


My question is -
1. Is there any other way(other than XML document) to get the form data in post.POST.jsp for the field having bind reference ?
2. What is the reason that form data is not retrieved in post.POST.jsp with classic approach for the field having bind reference ?

Thanks in advance !
Talk.

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 GirishBedekar

I have asked the appropriate team to respond 

thanks

3 replies

New Participant
May 11, 2020

Currently that is the only way to get access to bound data elements

 

Mayank_Gandhi
Employee
May 8, 2020

You can check in Charles proxy that are these fields which are bound even going in the request or not. 

GirishBedekarAccepted solution
New Participant
May 7, 2020

I have asked the appropriate team to respond 

thanks