ICEfaces
  1. ICEfaces
  2. ICE-10518

ace:submitMonitor - Issue with blockUIOnSubmit param

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, 4.0
    • Fix Version/s: EE-3.3.0.GA_P03, 4.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When using an ace:submitMontor with blockUI="@none" and also using the org.icefaces.blockUIOnSubmit=true context parameter, the model layer for the blockUIOnSubmit does not get displayed allowing double submits to occur.

      Removing the ace:submitMonitor from the page allows the ui blocker to work correctly.

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows this issue. Note, the icefaces, ace, and compat jars need to be added into the war for it to run.

        Steps:

        • Load welcomeICEfaces.jsf
        • Attempt a double click on the Submit button, two submits will be fired. Removing the submitMonitor, the same double click is blocked.
        Show
        Arran Mccullough added a comment - Attached test case that shows this issue. Note, the icefaces, ace, and compat jars need to be added into the war for it to run. Steps: Load welcomeICEfaces.jsf Attempt a double click on the Submit button, two submits will be fired. Removing the submitMonitor, the same double click is blocked.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case13319Example2.zip [ 18485 ]
        Attachment Case13319Example2.war [ 18486 ]
        Ken Fyten made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s 4.1 [ 11375 ]
        Fix Version/s EE-3.3.0.GA_P03 [ 11572 ]
        Assignee Priority P3 [ 10012 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44466 Thu Apr 09 14:54:50 MDT 2015 mircea.toma ICE-10518 Modified submitMonitor component to stop disabling the blockUI feature setup by the core.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/submitmonitor/SubmitMonitor.java
        Hide
        Mircea Toma added a comment -

        Modified ace:submitMonitor component to stop disabling the blockUI feature setup by the core.

        Show
        Mircea Toma added a comment - Modified ace:submitMonitor component to stop disabling the blockUI feature setup by the core.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Verified with ICEfaces 4 trunk r44469. Tomcat 7. When testing with EE-3.3.0 branch the Submit is only registered once (fixed) but the submit monitor is not activated and stays in an idle state.

        Show
        Liana Munroe added a comment - Verified with ICEfaces 4 trunk r44469. Tomcat 7. When testing with EE-3.3.0 branch the Submit is only registered once (fixed) but the submit monitor is not activated and stays in an idle state.
        Liana Munroe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44483 Mon Apr 13 12:11:21 MDT 2015 mircea.toma ICE-10518 Removed disabling of Element.on***** callbacks since the blocking of the submit function is enough (and any interference between these two strategies is avoided).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/submitmonitor/submitmonitor.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44484 Mon Apr 13 12:18:26 MDT 2015 mircea.toma ICE-10518 Removed unused functions.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/submitmonitor/submitmonitor.js
        Hide
        Mircea Toma added a comment -

        Removed the disabling of Element.on***** callbacks since the blocking of the submit function is enough (and any interference between these two strategies is avoided).

        Show
        Mircea Toma added a comment - Removed the disabling of Element.on***** callbacks since the blocking of the submit function is enough (and any interference between these two strategies is avoided).
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces 4 trunk, ee-3.3.0 maintenance branch r44481. Tomcat 7, IE 11, FF 34, Chrome 41.

        Show
        Liana Munroe added a comment - Verified ICEfaces 4 trunk, ee-3.3.0 maintenance branch r44481. Tomcat 7, IE 11, FF 34, Chrome 41.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Oscar Stigzelius added a comment -

        Is there a way how you can NOT trigger blockUIOnSubmit for a specific form if the parameter 'org.icefaces.blockUIOnSubmit' is set to 'true'?

        If there is, please share it with me, hasn't been able to find a solution.

        If not, then this fix made the only way to make a specific form NOT to trigger the blocking UI, if the parameter 'org.icefaces.blockUIOnSubmit' is set to 'true'.

        Shouldn't it be better to make the <ace:submitMonitor with blockUI="ANY_VALUE"> to overwrite the parameter org.icefaces.blockUIOnSubmit, because of <ace:submitMonitor> can be specified for every form, and blockUIOnSubmit can only be specified for every page (NOT for every form). Meaning <ace:submitMonitor> is more specific then blockUIOnSubmit.

        A better solution to this problem would be not to use <ace:submitMonitor blockUI="@none" /> if you want the UI-Block to appear.
        Why would you want to put 'blockUI="@none"' if you still want to have a blocking UI?

        Show
        Oscar Stigzelius added a comment - Is there a way how you can NOT trigger blockUIOnSubmit for a specific form if the parameter 'org.icefaces.blockUIOnSubmit' is set to 'true'? If there is, please share it with me, hasn't been able to find a solution. If not, then this fix made the only way to make a specific form NOT to trigger the blocking UI, if the parameter 'org.icefaces.blockUIOnSubmit' is set to 'true'. Shouldn't it be better to make the <ace:submitMonitor with blockUI="ANY_VALUE"> to overwrite the parameter org.icefaces.blockUIOnSubmit, because of <ace:submitMonitor> can be specified for every form, and blockUIOnSubmit can only be specified for every page (NOT for every form). Meaning <ace:submitMonitor> is more specific then blockUIOnSubmit. A better solution to this problem would be not to use <ace:submitMonitor blockUI="@none" /> if you want the UI-Block to appear. Why would you want to put 'blockUI="@none"' if you still want to have a blocking UI?
        Hide
        Ken Fyten added a comment -

        Oscar,

        The blockUIOnSubmit configuration is a global (or per page) configuration and is not meant to be mixed with the ace:submitMonitor component. The ace:submitMonitor provides a much more flexible capability and if you require per-form configuration you should adopt it exclusively and avoid blockUIOnSubmit.

        Note that you CAN enable/disable the blockUIOnSubmit feature on a per-page basis as well.
        e.g.
        <h:body>
        <icecore:config blockUIOnSubmit="true|false"/>
        ...

        See the <icecore:config> Wiki topic for details: http://www.icesoft.org/wiki/display/ICE/config

        Show
        Ken Fyten added a comment - Oscar, The blockUIOnSubmit configuration is a global (or per page) configuration and is not meant to be mixed with the ace:submitMonitor component. The ace:submitMonitor provides a much more flexible capability and if you require per-form configuration you should adopt it exclusively and avoid blockUIOnSubmit. Note that you CAN enable/disable the blockUIOnSubmit feature on a per-page basis as well. e.g. <h:body> <icecore:config blockUIOnSubmit="true|false"/> ... See the <icecore:config> Wiki topic for details: http://www.icesoft.org/wiki/display/ICE/config
        Hide
        Oscar Stigzelius added a comment -

        Hello Ken,

        The blockUIOnSubmit configuration is a global (or per page) configuration and is not meant to be mixed with the ace:submitMonitor component.

        Why?

        I still don't understand why this is done, as it has been a feature. Now it is only possible to do blockUIOnSubmit for the whole application OR specify it to every component or page (a lot of redundant work!). But what you cannot do, is to set a blockUIOnSubmit for the whole application and then specify for a specific use case something else.

        This is your own comment: "There should be an order of precedence such that a more specific monitor will override a more general one, in cases where more than one monitor might be in effect for the same submit." [Comment on ICE-7740]

        Isn't the component ace:submitMonitor more specific than the global setting blockUIOnSubmit?

        In my scenario, I have over 500 forms on over 300 pages. I want all of the forms to be such that you should block the UI when you do submit something. That is why the setting org.icefaces.blockUIOnSubmit is really good here. But now I have one form that I shouldn't block the UI when submitted. So the only way for me to make it possible is to refactor the whole application?

        If there isn't a specific reason why the components ace:submitMonitor attribute blockUI shouldn't override the global setting, then it would be a good idea to fix this.

        P.S. What did you want to say with the icecore:config link?

        See the <icecore:config> Wiki topic for details: http://www.icesoft.org/wiki/display/ICE/config

        Show
        Oscar Stigzelius added a comment - Hello Ken, The blockUIOnSubmit configuration is a global (or per page) configuration and is not meant to be mixed with the ace:submitMonitor component. Why? I still don't understand why this is done, as it has been a feature. Now it is only possible to do blockUIOnSubmit for the whole application OR specify it to every component or page (a lot of redundant work!). But what you cannot do, is to set a blockUIOnSubmit for the whole application and then specify for a specific use case something else. This is your own comment: "There should be an order of precedence such that a more specific monitor will override a more general one, in cases where more than one monitor might be in effect for the same submit." [ Comment on ICE-7740 ] Isn't the component ace:submitMonitor more specific than the global setting blockUIOnSubmit ? In my scenario, I have over 500 forms on over 300 pages. I want all of the forms to be such that you should block the UI when you do submit something. That is why the setting org.icefaces.blockUIOnSubmit is really good here. But now I have one form that I shouldn't block the UI when submitted. So the only way for me to make it possible is to refactor the whole application? If there isn't a specific reason why the components ace:submitMonitor attribute blockUI shouldn't override the global setting, then it would be a good idea to fix this. P.S. What did you want to say with the icecore:config link? See the <icecore:config> Wiki topic for details: http://www.icesoft.org/wiki/display/ICE/config
        Hide
        Ken Fyten added a comment -

        I meant as a workaround for your solution you could factor your application so that the page that contains the one form that doesn't want blockUIOnSubmit doesn't use it via configuring it on each page instead of via the global config parameter.

        Show
        Ken Fyten added a comment - I meant as a workaround for your solution you could factor your application so that the page that contains the one form that doesn't want blockUIOnSubmit doesn't use it via configuring it on each page instead of via the global config parameter.
        Hide
        Oscar Stigzelius added a comment -

        In this specific use case, that workaround isn't possible because of the one form I don't want blockUI to appear on, is on the page that is the base of every page. Which means that the only way to fix this problem is to take away the global config blockUIOnSubmit and add the component ace:submitMonitor to every form.

        But thanks for proposing a solution.

        Show
        Oscar Stigzelius added a comment - In this specific use case, that workaround isn't possible because of the one form I don't want blockUI to appear on, is on the page that is the base of every page. Which means that the only way to fix this problem is to take away the global config blockUIOnSubmit and add the component ace:submitMonitor to every form. But thanks for proposing a solution.
        Hide
        Oscar Stigzelius added a comment -

        Just to clarify:
        (1) If the global config blockUIOnSubmit is set to true, you cannot disable UIBlock for a form with ace:submitMonitor?
        (2) If the global config blockUIOnSubmit is set to false, you can enable UIBlock for a form with ace:submitMonitor?
        (3) If the global config blockUIOnSubmit is set to true, you can disable UIBlock for a page with <icecore:config blockUIOnSubmit="false"/>?
        (4) If the global config blockUIOnSubmit is set to false, you can enable UIBlock for a page with <icecore:config blockUIOnSubmit="true"/>?
        (5) If the global config blockUIOnSubmit is not specified, you can set UIBlock for a form with ace:submitMonitor ?
        (6) If the global config blockUIOnSubmit is specified, you cannot set UIBlock for a form with ace:submitMonitor?
        (7) If the global config blockUIOnSubmit is not specified, you can set UIBlock for a page with <icecore:config blockUIOnSubmit="true|false"/>>?
        (8) If the global config blockUIOnSubmit is specified, you can set UIBlock for a page with <icecore:config blockUIOnSubmit="true|false"/>?
        (9) If <icecore:config blockUIOnSubmit="false"/> is specified for a page, you can enable UIBlock for a form with _ace:submitMonitor?

        Thanks in advance.

        P.S. Just to clarify, I have many forms on one page, and not only one form per page. and I only want one form that shouldn't block the UI. For more information check out my StackOverflow question: setting blockuionsubmit for a specific form

        P.P.S. If statements (1) and (2) are true, then the configuration blockUIOnSubmit is mixed with the component ace:submitMonitor. making your own statement false:

        The blockUIOnSubmit configuration is a global (or per page) configuration and is not meant to be mixed with the ace:submitMonitor component.

        Show
        Oscar Stigzelius added a comment - Just to clarify: (1) If the global config blockUIOnSubmit is set to true , you cannot disable UIBlock for a form with ace:submitMonitor ? (2) If the global config blockUIOnSubmit is set to false , you can enable UIBlock for a form with ace:submitMonitor ? (3) If the global config blockUIOnSubmit is set to true , you can disable UIBlock for a page with <icecore:config blockUIOnSubmit="false"/> ? (4) If the global config blockUIOnSubmit is set to false , you can enable UIBlock for a page with <icecore:config blockUIOnSubmit="true"/> ? (5) If the global config blockUIOnSubmit is not specified , you can set UIBlock for a form with ace:submitMonitor ? (6) If the global config blockUIOnSubmit is specified , you cannot set UIBlock for a form with ace:submitMonitor ? (7) If the global config blockUIOnSubmit is not specified , you can set UIBlock for a page with <icecore:config blockUIOnSubmit="true|false"/>> ? (8) If the global config blockUIOnSubmit is specified , you can set UIBlock for a page with <icecore:config blockUIOnSubmit="true|false"/> ? (9) If <icecore:config blockUIOnSubmit="false"/> is specified for a page, you can enable UIBlock for a form with _ace:submitMonitor ? Thanks in advance. P.S. Just to clarify, I have many forms on one page, and not only one form per page. and I only want one form that shouldn't block the UI. For more information check out my StackOverflow question: setting blockuionsubmit for a specific form P.P.S. If statements (1) and (2) are true, then the configuration blockUIOnSubmit is mixed with the component ace:submitMonitor. making your own statement false: The blockUIOnSubmit configuration is a global (or per page) configuration and is not meant to be mixed with the ace:submitMonitor component.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: