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

        Ted Goddard created issue -
        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.
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Ted Goddard [ ted.goddard ]
        Deryk Sinotte made changes -
        Salesforce Case []
        Component/s Bridge [ 10011 ]
        Fix Version/s 2.0-Beta2 [ 10242 ]
        Assignee Ted Goddard [ ted.goddard ] Mircea Toma [ mircea.toma ]
        Deryk Sinotte made changes -
        Salesforce Case []
        Assignee Priority P2
        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.
        Ken Fyten made changes -
        Assignee Priority P2 P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #22445 Tue Sep 28 09:18:22 MDT 2010 mircea.toma ICE-5935 Send dispose window request by submitting the view associated form. Mark the dispose window request with 'ice.submit.type='ice.dispose.view' parameter. Introduce ice.setupBridge function to reduce rendered code verbosity and allow additional setup per view.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/application.js
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/WindowScopeManager.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #22481 Thu Sep 30 15:26:51 MDT 2010 mircea.toma ICE-5935 Use AJAX synchronous post for sending the dipose window resquest to make sure the dispose window request arrives to the server before the page load request.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/application.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #22482 Thu Sep 30 15:30:58 MDT 2010 mircea.toma ICE-5935 Use AJAX synchronous post for sending the dipose window resquest to make sure the dispose window request arrives to the server before the page load request.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/javascript/application.js
        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.
        Deryk Sinotte made changes -
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10230 ]
        Fix Version/s 2.0-Beta2 [ 10242 ]
        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
        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
        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.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

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

            Dates

            • Created:
              Updated:
              Resolved: