• Post Reply Bookmark Topic Watch Topic
  • New Topic

help required on a4j commandButton

 
Kumar Gaurav
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a a4j commandButton. i have two attributes forthis button one is onclick, which is resulting in javascript method call and other attribute is action which refers to a backing bean method call.

My question which will be executed first, javascript function or backing bean method?

Any help will ne duly appreciable.
 
Frederic Filiatrault
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just make a quick test with some javaScript (i.e. alert) to see the result, you should have to answer rapidly!
 
Frederic Filiatrault
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oncall first, action after.

See doc :
http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/a4j_commandButton.html#d0e7437
 
Max Katz
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any onXXXX is a client event thus done in the browser and will be invoked first. action is a server side method invocation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!