ICEfaces
  1. ICEfaces
  2. ICE-2765

ice:gmap & ice:inputRichText problems with standard request scope=true

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Seam-2.x, jsf 1.2, facelets

      Description

      When invoking the link for google maps from seam-comp-showcase and the tree is in Conversation-scope, either Page or Conversation scope should be fine. However, once the link is clicked, the jsf life-cycle is automatically completed and another begun (meaning the start of an entire new conversation so the dataModel for the tree gets re-initialized, etc and the component jspx pages are not shown).

      For googlemaps this only happens the first time the application tries to load one of it's jspx pages.

      For inputRichText, this happens each time.

      Note that these pages are within panelTabSet (as per 1.7.0.Beta1 samples/component-showcase --jspx pages are same).

      If the TreeNavigationBean is in Session-scope then the pages load properly, but curiously the backing bean for inputRichText is loaded twice.

      Looks like some circumventing of the jsf lifecycle and is very noticeable when using standard request scope.

       I am trying to create seam-comp-showcase with only the style bean as session-scoped, (and to use to test concurrentDomView=true)...this means that each session can have multiple conversations of seam-comp-showcase. For now, with TreeNavigation in session-scope, each window has to view the same state of the tree (no point to use concurrentDomView=true). Nice also to show that all our components can be used outside of Session scope.

        Activity

        Hide
        Judy Guglielmin added a comment -

        I have to put the navigation in session scope (or the context gets cleared since I get 2 jsf lifecycles). Curiously, when I put some debugging into phaselistener it shows the following:-
        12:40:40,675 INFO [SeamPhaseListener] before phase: RESTORE_VIEW 1
        12:40:40,675 INFO [SeamPhaseListener] after phase: RESTORE_VIEW 1
        12:40:40,675 INFO [SeamPhaseListener] before phase: APPLY_REQUEST_VALUES 2
        12:40:40,738 INFO [SeamPhaseListener] after phase: APPLY_REQUEST_VALUES 2
        12:40:40,738 INFO [SeamPhaseListener] before phase: PROCESS_VALIDATIONS 3
        12:40:40,816 INFO [SeamPhaseListener] after phase: PROCESS_VALIDATIONS 3
        12:40:40,816 INFO [SeamPhaseListener] before phase: UPDATE_MODEL_VALUES 4
        12:40:40,863 INFO [SeamPhaseListener] after phase: UPDATE_MODEL_VALUES 4
        12:40:40,863 INFO [SeamPhaseListener] before phase: INVOKE_APPLICATION 5
        12:40:40,878 INFO [SeamPhaseListener] after phase: INVOKE_APPLICATION 5
        12:40:40,878 INFO [SeamPhaseListener] before phase: RENDER_RESPONSE 6
        12:40:41,300 INFO [STDOUT] creating inputRichTextBean version=com.icesoft.icefaces.samples.showcase.components.inputrichtext.InputRichTextBean@5bf9cf
        12:40:41,316 INFO [SeamPhaseListener] after phase: RENDER_RESPONSE 6
        12:40:41,363 INFO [SeamPhaseListener] before phase: RESTORE_VIEW 1
        12:40:41,363 INFO [SeamPhaseListener] after phase: RESTORE_VIEW 1
        12:40:41,363 INFO [SeamPhaseListener] before phase: RENDER_RESPONSE 6
        12:40:41,628 INFO [STDOUT] creating inputRichTextBean version=com.icesoft.icefaces.samples.showcase.components.inputrichtext.InputRichTextBean@1145e2e
        12:40:41,644 INFO [SeamPhaseListener] after phase: RENDER_RESPONSE 6

        Suggestion:- do same with regular component-showcase first with standard request scope = false and then with standard request scope=true (use jsf1.2 and facelets to make as similar as possible).

        Show
        Judy Guglielmin added a comment - I have to put the navigation in session scope (or the context gets cleared since I get 2 jsf lifecycles). Curiously, when I put some debugging into phaselistener it shows the following:- 12:40:40,675 INFO [SeamPhaseListener] before phase: RESTORE_VIEW 1 12:40:40,675 INFO [SeamPhaseListener] after phase: RESTORE_VIEW 1 12:40:40,675 INFO [SeamPhaseListener] before phase: APPLY_REQUEST_VALUES 2 12:40:40,738 INFO [SeamPhaseListener] after phase: APPLY_REQUEST_VALUES 2 12:40:40,738 INFO [SeamPhaseListener] before phase: PROCESS_VALIDATIONS 3 12:40:40,816 INFO [SeamPhaseListener] after phase: PROCESS_VALIDATIONS 3 12:40:40,816 INFO [SeamPhaseListener] before phase: UPDATE_MODEL_VALUES 4 12:40:40,863 INFO [SeamPhaseListener] after phase: UPDATE_MODEL_VALUES 4 12:40:40,863 INFO [SeamPhaseListener] before phase: INVOKE_APPLICATION 5 12:40:40,878 INFO [SeamPhaseListener] after phase: INVOKE_APPLICATION 5 12:40:40,878 INFO [SeamPhaseListener] before phase: RENDER_RESPONSE 6 12:40:41,300 INFO [STDOUT] creating inputRichTextBean version=com.icesoft.icefaces.samples.showcase.components.inputrichtext.InputRichTextBean@5bf9cf 12:40:41,316 INFO [SeamPhaseListener] after phase: RENDER_RESPONSE 6 12:40:41,363 INFO [SeamPhaseListener] before phase: RESTORE_VIEW 1 12:40:41,363 INFO [SeamPhaseListener] after phase: RESTORE_VIEW 1 12:40:41,363 INFO [SeamPhaseListener] before phase: RENDER_RESPONSE 6 12:40:41,628 INFO [STDOUT] creating inputRichTextBean version=com.icesoft.icefaces.samples.showcase.components.inputrichtext.InputRichTextBean@1145e2e 12:40:41,644 INFO [SeamPhaseListener] after phase: RENDER_RESPONSE 6 Suggestion:- do same with regular component-showcase first with standard request scope = false and then with standard request scope=true (use jsf1.2 and facelets to make as similar as possible).
        Hide
        Mircea Toma added a comment -

        The apparent abnormal behavior is due to the way InputRichText and GoogleMaps components inject their resources (javascript code) into the page. Because the resource references are inserted into the 'head' element of the page ICEfaces will send a 'reload' command to the browser (see ICE-2189 for a that). The references are inserted lazily, only when the component is instantiated the first time.
        The first instantiation of InputRichTextBean is done by Seam, but because there's a page load triggered and the bean is page scoped a second instance will be created. The lifecycle is not shortcut, is just that a page load/reload doesn't contain any values that need to be applied so the related lifecycle steps are skipped.

        The mentioned components could be refactored to inject their resources when the application starts if we need to avoid this additional page reload.

        Show
        Mircea Toma added a comment - The apparent abnormal behavior is due to the way InputRichText and GoogleMaps components inject their resources (javascript code) into the page. Because the resource references are inserted into the 'head' element of the page ICEfaces will send a 'reload' command to the browser (see ICE-2189 for a that). The references are inserted lazily, only when the component is instantiated the first time. The first instantiation of InputRichTextBean is done by Seam, but because there's a page load triggered and the bean is page scoped a second instance will be created. The lifecycle is not shortcut, is just that a page load/reload doesn't contain any values that need to be applied so the related lifecycle steps are skipped. The mentioned components could be refactored to inject their resources when the application starts if we need to avoid this additional page reload.

          People

          • Assignee:
            Unassigned
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: