• 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

JSF Lifecycle misses RESTORE_VIEW

 
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello dear readers,

i imlemented the following (please see below for details)
a) EinzelseitePhasenListener implements PhaseListener with beforePhase, afterPhase and getPhaseId
b) ManagedBeanPhasenJSFRequest which is a simple Named-Bean
c) a xhtml-File for starting the lifecycle and containing f:phaseListener type="utils.EinzelseitePhasenListener"
d) EinfachHelferklasse is class for formated output, not complex and not worth to mention.

I wonder when RESTORE_VIEW will occour. I mean when "Beginn des Lebenszyklus" will be printed use it this way? Using it via faces-config
<lifecycle>
<phase-listener>utils.EinzelseitePhasenListener"</phase-listener>
</lifecycle>
is running fine.






Thanks in advance,

Uwe
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://docs.oracle.com/javaee/1.4/tutorial/doc/JSFIntro10.html#wp122219
 
Uwe Lindenberg
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

thank you very much for your reply and the link. My problem is not the phase RESTORE_VIEW or the lifecycle, but when it occurs:

1. Declaring a phase listener in faces-config.xml works fine and "Beginn des Lebenszyklus" is printed.
2. Using f:phaseListener in the xhtml doesn't work. "Beginn des Lebenszyklus" is not printed.

In both cases all other phases are active at their expected point of time.

Why is their a difference concerning 1. and 2. ?

I tried Wildfly and Tomcat.

Thanks in advance,

Uwe
 
Uwe Lindenberg
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any idea?

Thanks in advance,

Use
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you define a phase listener in the View Template (xhtml), obviously it cannot be invoked until that particular View Template has been selected and digested so that JSF can tell that it should hook in that particular listener.

So it wouldn't be possible to capture lifecycle events from before that time.
 
Uwe Lindenberg
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

thanks you very much for your advice.

Best regards,

Uwe
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic