ViewAccessScoped (apache codi) loosing its state

Splash Forums PrettyFaces Users ViewAccessScoped (apache codi) loosing its state

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26013

    brunoskrebs
    Participant

    I have seen a few posts like this, but my issue is a little bit more specific. I have a @ViewAccessScoped bean (apache codi) which is loosing its conversation after a prettyfaces navigation. What is weird is that it only looses the conversation if my URLMapping pattern is configured to show a bean’s property. If I remove the property from the pattern then my bean does not looses it’s tracking (conversation).

    Let me give an small example to clarify:

    If I have a mapping like this:

    
    @URLMapping(id = "entityMappingId", pattern = "/entity/visualize/#{entityBean.someProperty}", viewId = "/entity/visualize.xhtml"),
    

    Things does not work and a new entityBean is generated. But if I remove the property like this:

    
    @URLMapping(id = "entityMappingId", pattern = "/entity/visualize/", viewId = "/entity/visualize.xhtml"),
    

    No new bean is generated and things work smoothly.

    By the way, I’m navigating to this view from a commandLink which calls a method on my bean, and this method retur “pretty:entityMappingId”;

    Thanks in advance!

    #26015

    Which version of PrettyFaces are you using. Do you use the old PrettyFaces 3.3.3.Final release or did you already update to the new PrettyFaces compatibility module which is now part of Rewrite?

    See:

    http://ocpsoft.org/prettyfaces/

    and:

    http://ocpsoft.org/rewrite/docs/migration/prettyfaces3

    #26037

    brunoskrebs
    Participant

    Hi there Christian,

    I’m using Prettyfaces 3.3.3.Final. I’m considering migrating, but let me ask something first. Is this a known issue, or is it just a possibility that this new compatibility module would not have this issue?

    Thanks!

    #26042

    It’s not a known issue as far as I am aware. It’s just a chance that the new architecture might not have this same problem. It’s possible that this has something to do with the way that parameters are passed in JSF, but I can’t really be certain. We’d probably need to reproduce this in a test case or see a sample application… reproducing in a test would be the best option:

    Something like one of these existing tests:

    https://github.com/ocpsoft/rewrite/tree/master/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/interaction

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

You must be logged in to reply to this topic.

Comments are closed.