icefaces, prettyfaces and order of url-mapping injections

Splash Forums PrettyFaces Users icefaces, prettyfaces and order of url-mapping injections

This topic contains 4 replies, has 2 voices, and was last updated by  Lincoln Baxter III 7 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17744

    0swald
    Participant

    Hi!

    I’m trying to use ice:panelPopup within ice:form with prettyfaces.

    icefaces perform ajax request to show modal panel. Form’s action URL (actually – current page) is a part of prettyfaces url-mapping with value injections into request scoped bean (outbound rewriting set to true).

    When I click commandLink to show that panel, icefaces calls backing bean method BEFORE prettyfaces injects neccessary values according to url-mapping.

    Debug shows that request bean is created, then method related to panelPopup is called and only after that prettyfaces’s injections being performed.

    Are there any ways forcing injection to happen first?

    Server – GF 3.0.1, prettyfaces 2.0.4, web.xml contains no filter configuration, neither for prettyfaces nor for icefaces.

    Setting dispatchers for prettyfilter does not solve the problem.

    icefaces are alpha 3, but I guess the problem is caused rather by my misunderstanding than by bugs in icefaces.

    Thanks in advance,

    Andrew.

    #19957

    Hi Andrew,

    You need to specify an absolute ordering in your faces-config.xml, telling it that you want PrettyFaces phase-listeners to trigger first.

    This blog entry describes how to control faces-config ordering:

    http://blogs.sun.com/rlubke/entry/jsf_configuration_resource_ordering

    You may need to play around with it in order to get the order right (PrettyFaces first, PrettyFaces last, etc.)

    Hope this helps; Ice-faces is a tricky framework.

    –Lincoln

    #19958

    When you figure it out – please post here and tell us what the order was :) This will help future pretty-users ;)

    Thanks!

    #19959

    0swald
    Participant

    Lincoln, thanks for advice.

    I had not much time to play with ordering. What I have done is just changed META-INF/faces-config.xml both in ocpsoft-pretty-faces-2.0.4.jar and icefaces.jar directly by adding ‘ordering’ tags saying GF to load pretty before others and icefaces in the end. That didnt solve the issue. Then I’ve renamed ocpsoft-pretty-faces-2.0.4.jar to start with “a” (Mojarra solution) with no result either.

    But I’ve noticed that my modal panel contains element <h:graphicImage binding="#{backingBean.schemeImage}"/>. Replacing it with <h:graphicImage value="#{backingBean.schemeImageURL}"/> and rewriting backing bean accordingly solved the issue. Don’t know why :-(

    I will get back to this topic later as I have more time to play with it.

    And, using an opportune moment, thank you for prettyfaces, hope to see it as a part of JSF 2.x core :)

    #19960

    Could you paste your before/after so I can take a look?

    Thanks! (PS. You’re welcome. It’s a fun project.)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Comments are closed.