MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-49

@ViewAccessScoped in combination with h:link and back-buttons

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.2
    • Component/s: JEE-JSF20-Module
    • Labels:
      None

      Description

      I added the following small listsample extension to our JSF-2 sample to demonstrate the problem

      1.) a sampleList.xhtml which shows 3 entries in a h:dataTable using a SampleList.java bean
      2.) a sampleListEntry.xhtml which shows the id given as f:viewParam to the SampleListEntry bean along with a free String value

      Both beans log a INFO message in a @PostConstruct method if they get initialised.

      To reproduce the bug:

      • Select the entry "1" and enter "ping" into the "value" field
      • Click the "back" button
      • Now select the entry "2". You will still see the 'old' value "ping" in the "value" field and if you look at the log, then it will miss the INFO message for creating the ViewAccessScoped bean.

      Imo a new instance of the SampleListEntry bean should get created each time I freshly re-enter the sampleListEntry.xhtml page again (since it doesn't get touched on the sampleList.xhtml list page!)

        Activity

        Hide
        Gerhard Petracek added a comment -

        we should introduce an optional (2nd) mechanism which checks all access-view-scoped beans after the rendering process.

        Show
        Gerhard Petracek added a comment - we should introduce an optional (2nd) mechanism which checks all access-view-scoped beans after the rendering process.
        Hide
        Gerhard Petracek added a comment -

        the window-id is propagated all the time.

        Show
        Gerhard Petracek added a comment - the window-id is propagated all the time.
        Hide
        Gerhard Petracek added a comment -

        workaround:
        use:
        @Inject Conversation conversation;

        and

        conversation.end();

        in the back-button (!= browser back-button)

        Show
        Gerhard Petracek added a comment - workaround: use: @Inject Conversation conversation; and conversation.end(); in the back-button (!= browser back-button)
        Hide
        Mark Struberg added a comment -

        I think it happens in all cases where the windowId gets propagated!

        Show
        Mark Struberg added a comment - I think it happens in all cases where the windowId gets propagated!
        Hide
        Gerhard Petracek added a comment -

        it just happens in case of h:link

        Show
        Gerhard Petracek added a comment - it just happens in case of h:link

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Struberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development