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

        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: