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

          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.
          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.
          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.
          Hide
          Mircea Toma added a comment -

          Use previously registered functions.

          Show
          Mircea Toma added a comment - Use previously registered functions.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: