• Post Reply Bookmark Topic Watch Topic
  • New Topic

phase listeners  RSS feed

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

i want to create a phase listener to implement something like an oncomplete event on a <h:commandButton />

i know i can use a4j and rich faces but there are restrictions where i can't use them!

is there a way to implement such a functionality?

thanks in advance,
 
Hany Shafik
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vassili,

oncomplete event and phase listener are two different things. The oncomplete event is fired in the client side (the browser) and is used to execute JavaScript however phase listener is fired in the server side an executes java code.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i know that but can i implement something like oncomplete on the server side?
 
Hany Shafik
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oncomplete event means when the ajax response from the server side is returned successfully to the browser, so it doesn't have a meaning to execute java code at this point. However a4j:ajaxListener may help you.
It adds an action listener to the parent component that is fired during the Render Response phase.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know i can use the a4j library, but, it is causing a problem while using IE8! some components are getting shifted from their actual places! what could be the problem?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!