ICEfaces
  1. ICEfaces
  2. ICE-5935

Portal support for dispose-window

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: 2.0.0
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      ICEfaces, portletfaces

      Description

      The dispose-window command does not resolve to a full Portal resource URL. For instance, the following request is issued:

      POST /web/john/dispose-window.icefaces.jsf

      when Ajax requests are sent to

      POST /web/john/test?p_p_id=1_WAR_icefaces2xcompatportlet_INSTANCE_Wlm3&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-1&p_p_col_count=1

        Activity

        Hide
        Ted Goddard added a comment -

        It may be possible to implement the dispose-window command as a form submission, similar to ajax push update retrieval. This would provide an automatically configured URL for the command.

        Show
        Ted Goddard added a comment - It may be possible to implement the dispose-window command as a form submission, similar to ajax push update retrieval. This would provide an automatically configured URL for the command.
        Hide
        Ted Goddard added a comment -

        As Deryk mentioned: disposing views in the portlet case is complex since there may be multiple portlets on the same page from different .wars. Closing some of those portlets should not terminate the entire window scope.

        Show
        Ted Goddard added a comment - As Deryk mentioned: disposing views in the portlet case is complex since there may be multiple portlets on the same page from different .wars. Closing some of those portlets should not terminate the entire window scope.
        Hide
        Mircea Toma added a comment - - edited

        The form used for update retrieval cannot be used in the case of 'dispose-window' request. Each view has its own form renderer, so each portlet will have a form pointing to a URL that is relevant only to the current portlet. 'dispose-window' request handling code is responsible with disposing all the views included in the unloaded window thus the request should invoke code that has access to all the views created within the portal.

        Maybe we can use ExternalContext.encodePartialActionURL (new since 2.0) to encode the 'dispose-window' URL?
        When ICEpush is used 'dispose-window' is handled by ICEpush servlet.

        Show
        Mircea Toma added a comment - - edited The form used for update retrieval cannot be used in the case of 'dispose-window' request. Each view has its own form renderer, so each portlet will have a form pointing to a URL that is relevant only to the current portlet. 'dispose-window' request handling code is responsible with disposing all the views included in the unloaded window thus the request should invoke code that has access to all the views created within the portal. Maybe we can use ExternalContext.encodePartialActionURL (new since 2.0) to encode the 'dispose-window' URL? When ICEpush is used 'dispose-window' is handled by ICEpush servlet.
        Hide
        Ted Goddard added a comment -

        It should be possible to add parameters to an update retrieval form that specify all of the portlets on the page. Since we have only one request to the server anyway, it will be necessary to fan-out any disposal message at the server (potentially across multiple .war files).

        Show
        Ted Goddard added a comment - It should be possible to add parameters to an update retrieval form that specify all of the portlets on the page. Since we have only one request to the server anyway, it will be necessary to fan-out any disposal message at the server (potentially across multiple .war files).
        Hide
        Ted Goddard added a comment -

        It may be useful to allow the same PUSHID to be used in multiple browser windows to allow notification of session-wide push rendering and session-expired notification.

        Show
        Ted Goddard added a comment - It may be useful to allow the same PUSHID to be used in multiple browser windows to allow notification of session-wide push rendering and session-expired notification.
        Hide
        Mircea Toma added a comment -

        The dispose window request is now sent by submitting the view associated form. The request is marked with 'ice.submit.type='ice.dispose.view' parameter instead of having a special URL. This way the URL should be properly encoded in portal environment. Also, ice.setupBridge function was introduced to reduce the verbosity of the rendered code and allow additional setup code to be executed during bridge setup (such as wiring the callback responsible for submitting the dispose window request with onBeforeUnload function).

        Show
        Mircea Toma added a comment - The dispose window request is now sent by submitting the view associated form. The request is marked with 'ice.submit.type='ice.dispose.view' parameter instead of having a special URL. This way the URL should be properly encoded in portal environment. Also, ice.setupBridge function was introduced to reduce the verbosity of the rendered code and allow additional setup code to be executed during bridge setup (such as wiring the callback responsible for submitting the dispose window request with onBeforeUnload function).
        Hide
        Mircea Toma added a comment - - edited

        Next step in solving the disposal of windows in portal environment is to make sure that all the participating applications within a window are using the same windowID. This way the application receiving the dispose window notification will use the same windowID to notify the rest of participating applications about the window disposal.

        Show
        Mircea Toma added a comment - - edited Next step in solving the disposal of windows in portal environment is to make sure that all the participating applications within a window are using the same windowID. This way the application receiving the dispose window notification will use the same windowID to notify the rest of participating applications about the window disposal.
        Hide
        Mircea Toma added a comment -

        Changed code to use AJAX synchronous post for sending the dipose window request to make sure the dispose window request arrives to the server before the page load request. The request made uses the URL found in the view associated form 'action' attribute. jsf.ajax.request makes only AJAX asynchronous posts which is not good enough for dispose window request.

        Show
        Mircea Toma added a comment - Changed code to use AJAX synchronous post for sending the dipose window request to make sure the dispose window request arrives to the server before the page load request. The request made uses the URL found in the view associated form 'action' attribute. jsf.ajax.request makes only AJAX asynchronous posts which is not good enough for dispose window request.
        Hide
        Deryk Sinotte added a comment -

        The fix for this (a synchronous Ajax request) has been applied for Beta 2 but we are leaving this case open so that we can re-examine the design before the final 2.0 release.

        Show
        Deryk Sinotte added a comment - The fix for this (a synchronous Ajax request) has been applied for Beta 2 but we are leaving this case open so that we can re-examine the design before the final 2.0 release.
        Hide
        Mircea Toma added a comment - - edited

        The dispose-window request is now portal friendly, so I'm marking this as fixed. ICE-6088 was open for the synchronous Ajax request problem.

        Show
        Mircea Toma added a comment - - edited The dispose-window request is now portal friendly, so I'm marking this as fixed. ICE-6088 was open for the synchronous Ajax request problem.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: