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

Avatar

Avatar
Boost 1
Level 1
talk0501
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
talk0501
Level 1

Likes

2 likes

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
talk0501
Level 1

06-05-2020

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

07-05-2020

I have asked the appropriate team to respond 

thanks

Answers (2)

Answers (2)

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

11-05-2020

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

 

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,153 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,153 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

08-05-2020

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