This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Calling ActionBean of Stripes using Ajax - Prototype.

 
Greenhorn
Posts: 14
Firefox Browser Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on stripes and currently I am having requirement of submitting a form using AJAX - with Prototype . But while doing this I am getting below Exception.



In my form I've save and cancel events on the "onClick" event. But the The reason behind using Ajax is that I want to check that whether my form is dirty or not whenever user click outside the page. At that time I need to check my form and if it is dirty then need to give
confirmationBox and if user clicks YES then need to submit the form and unsaved changes. But I am failing to pass the particular event with AJAX.

My code is :

Another attempt is :

Now if I remove line and just pass the argument manually like

then the defaultHandler of my ActionBean is being called successfully. But I want to pass a form to a specific method. Here that method is callFromAjax().

Please guide me if you are getting my problem.
 
Ravi Delogico
Greenhorn
Posts: 14
Firefox Browser Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for getting late to reply...

Actually I found the solution and I am posting this so that any one else who is facing this problem, can get the idea.

The thing was very simple, you must have one submit button to prevent this situation and in my I was using only images for performing actions. So I just put Submit buttons and set images for that to get the same look and feel as per my old JSP. After that I could able to distinguish between each action.

Thanks for viewing this.
 
pie. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!