• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

phase listeners

 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
reply
    Bookmark Topic Watch Topic
  • New Topic