Execute CQ form actions with ajax

Avatar

Avatar

Krisgum

Avatar

Krisgum

Krisgum

15-10-2015

Hi All , 

 I have a custom form action nodes which has a forward.jsp via which the control is forwarded to my custom servlet . All this happens when the form start component is configured to execute the custom action . 

Now I want to achieve this behaviour  in ajax way  . In normal cases where I am not using cq form actions , I can add my js to a html and on submit execute a url to a servlet . With cq form actions how i can make a call to action's forward.jsp in ajax way ?

 

Thanks in advance

View Entire Topic

Avatar

Avatar

Krisgum

Avatar

Krisgum

Krisgum

15-10-2015

Hi ,

   Thanks for your replies . I can see how acs bundle ajaxes the components but i'm not sure how I can  make it fit to my requirement . As i had mentioned before and aas also mentioned in smacdonald post , i can directly call my servlet in ajax script and make it work  , but if i choose to use CQ form actions this approach wouldn't work . 

When using CQ form actions in formstart component , slingpostservlet is executed which redirects to formaction node and executes either forward.jsp or post.Post.jsp . I'm not able to figure out how acs commons base ajax component approach can be made fit here ? Any pointers ? 

 

Thanks in advance