1

To load a grid after submitting a form successfully, we used below submit tag.

<sj:submit id="submitForm"  onSuccessTopics="gridLoader" ...

and

$.subscribe("gridLoader", function(event, data) {       
    var recviedRequest =  event.originalEvent.request.responseJSON;

However in struts 2.5 and struts jquery 4.0.1, I get the

TypeError: event.originalEvent.request is undefined

Well I try to invest the event object to find if a new object is defined, but I could not find any thing. As struts jquery plugin uses jquery 2 I wonder if this is some thing with jquery 2.

Any comments!

Roman C
  • 49,761
  • 33
  • 66
  • 176
Alireza Fattahi
  • 42,517
  • 14
  • 123
  • 173

1 Answers1

1

There should be onCompleteTopics which is fired when Ajax request is completed.

There should be event.originalEvent.request.responseText.

The docs are updated to reflect versions you have mentioned. See Form Submit with Events.

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • Thanks! I used your recommendation. Also may be a bug which will be fixed. https://github.com/struts-community-plugins/struts2-jquery/issues/45 – Alireza Fattahi Jun 08 '16 at 13:58