ICEfaces
  1. ICEfaces
  2. ICE-1305

Intercept form submits and replace with iceSubmits

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#2
    • Fix Version/s: 1.6DR#3, 1.6
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      All

      Description

      Some third party components use there own java script to submit to the server. (Calling form.submit() directly)

      Intercept these calls, and perform an iceSubmit instead.

      Example Code.

              window.onLoad(function() {
          $enumerate(document.forms).each(function(form) {
              form.submit = function() {
                  iceSubmit(form, null, new Object());
              };
              form.onsubmit = function() {
                  iceSubmit(form, null, new Object());
              };
          });
      });

        Issue Links

          Activity

          Rob Mayhew created issue -
          Rob Mayhew made changes -
          Field Original Value New Value
          Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #13376 Fri Mar 09 11:30:47 MST 2007 mircea.toma Capture form submits and send them as XMLHttpRequests. Issue ICE-1305.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Ken Fyten made changes -
          Fix Version/s 1.6DR#3 [ 10050 ]
          Assignee Priority P1
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #13430 Tue Mar 27 16:58:17 MDT 2007 mircea.toma Force MyFaces to inject the needed Javascript on each submit. Rewrite 'submit' and 'onsubmit' when the browser document is updated -- ICE-1305.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/event.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Ken Fyten made changes -
          Link This issue blocks ICE-1090 [ ICE-1090 ]
          Hide
          Mircea Toma added a comment -

          Forced MyFaces to inject the needed Javascript on each submit (removing custom attribute from the requestMap). Also, rewrite 'submit' and 'onsubmit' when the browser document is updated.

          Show
          Mircea Toma added a comment - Forced MyFaces to inject the needed Javascript on each submit (removing custom attribute from the requestMap). Also, rewrite 'submit' and 'onsubmit' when the browser document is updated.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mircea Toma made changes -
          Link This issue is duplicated by ICE-1356 [ ICE-1356 ]
          Hide
          Mircea Toma added a comment -

          Rewrite 'submit' and 'onsubmit' when the browser document is updated.

          Show
          Mircea Toma added a comment - Rewrite 'submit' and 'onsubmit' when the browser document is updated.
          Mircea Toma made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Adnan Durrani added a comment -

          During working on the following JIRA case http://jira.icefaces.org/browse/ICE-1439 It came across that some component's javascript wants to override the onsubmit method, we should be first invoking their onsubmit and then ours.

          Show
          Adnan Durrani added a comment - During working on the following JIRA case http://jira.icefaces.org/browse/ICE-1439 It came across that some component's javascript wants to override the onsubmit method, we should be first invoking their onsubmit and then ours.
          Adnan Durrani made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #13628 Fri Apr 20 17:23:48 MDT 2007 mircea.toma Use previously registered function -- ICE-1305.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Hide
          Mircea Toma added a comment -

          Use previously registered functions.

          Show
          Mircea Toma added a comment - Use previously registered functions.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #13765 Thu May 03 11:53:56 MDT 2007 mircea.toma Refactor how and when form submits are redirected to avoid memory leaks -- ICE-1305.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/application.js
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/submit.js
          Ken Fyten made changes -
          Fix Version/s 1.6 [ 10031 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Assignee Mircea Toma [ mircea.toma ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Rob Mayhew
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: