jQuery in Action, 3rd edition
The moose likes JSF and the fly likes com.sun.faces.facelets.tag.jsf.core.PhaseListenerHandler$LazyPhaseListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "com.sun.faces.facelets.tag.jsf.core.PhaseListenerHandler$LazyPhaseListener" Watch "com.sun.faces.facelets.tag.jsf.core.PhaseListenerHandler$LazyPhaseListener" New topic


Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511


Whereever I put my tag <f:phaseListener type="com.olympics.util.MessagePanelListener" /> I always receive this error in server.log:

The interesting thing that my phase listener com.olympics.util.MessagePanelListener is invoked and it outputs some info untill line :

There parent id is - j_id1 and searched component's id is - j_idt9!

Can anybody tell me how to resolve this?

Thank you!

True person is moral, false is right!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17254

Two things will help.

1. Explicitly assign "id=" attributes to the XML elements of interest. That will make it easier to tell which ones are offending, since the generated IDs are unpredictable.

2. Provide a complete stack trace. All we can tell from your present example is that it failed. Not where or why.

An IDE is no substitute for an Intelligent Developer.
Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511

Thank you for response!!!

I have already left the idea to use <f:phaseListener . By the way error in server.log was only one line which I provided.
Instead I decided to create my own jsf component as it serves better here. My goal is to create message panel which displays all messages queued on FacesContext.
Example: 'You are logged in successfully'. Problem - deferred value expression doesn't work. Code in my tag-class method setProperties(UIComponent component):

This sets value expression 'title' into my component 'UIMyMessage'.
Code that should write evaluated value expression into 'title' attribute

As a result title on my component is - /template.xhtml @87,90 title="#{bundle.Template_messagePanel}. It means that deferred expr. is not evaluated.
After I tried to change line 02 to:

It gave the following stack trace:

'This panel is to notify user about something' is bundle's title which I want to see as title.

Don't you know what it is wrong here?
Volodymyr Lysenko
Ranch Hand

Joined: Mar 29, 2012
Posts: 511

I had custom component that extends UIOutput without custom renderer. Its attribute 'title' had to be evaluated to String from bundle via deferred value expression. In custom component I had property String title with normal getter and setter. Then I simply removed them and put this code:

To write evaluated title into my component:

I agree. Here's the link: http://aspose.com/file-tools
subject: com.sun.faces.facelets.tag.jsf.core.PhaseListenerHandler$LazyPhaseListener
It's not a secret anymore!