ICEfaces
  1. ICEfaces
  2. ICE-7405

Setting <f:ajax disabled="true"> does not work for h:commandLink and h:commandButton having an f:param

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.GA
    • Fix Version/s: 3.0.RC1, 3.0, EE-2.0.0.GA_P01
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      windows 7, jdk 1.6, eclipse Indigo

      Description

      Bug: Setting <f:ajax disabled="true"> does not work for h:commandLink

      Problem:
      In a Portal Envrionement, such as Liferay, you sometimes need to trigger an regular (non-ajax) Post Call which triggers the Portal's ACTION_PHASE. The problem is that it is not going to work for commandLinks. It looks like as soon as JSF decorates a commandButton or a commandLink with the onclick="mojarra.jsfcljs(document.getElementById('myForm'),{'myForm:noneButton2':'myForm:noneButton2'},'');return false" function, ICEfaces is having troubles to detect whether these components have really been disabled via f:ajax disable=true

      The commandButton actually works in ICEfaces but as soon as the mojarra patch is applied the commandButtons acts like a commandLink (as you would expect) and thus none of them interprets the f:ajax disabled="true" correctly and a ajax post is sent instead

      What is the mojarra patch:
      There is a bug in mojarra which fails to decorate the commandButton having an onclick method if the f:ajax disabled is set to true: thus the f:param is not set to the requestParameterMap

      In order to Fix that Behavoir patch Line: 137:
      FROM:
      RenderKitUtils.renderOnclick(context, component, params, null, false);
      TO:
      RenderKitUtils.renderOnclick(context, component, params, null, true);
      1. application.js
        26 kB
        Ted Goddard
      2. icefaces_7405_R2.xlsx
        12 kB
        Patrick Dobler
      3. icefaces_7405.xlsx
        12 kB
        Patrick Dobler
      4. submit.js
        13 kB
        Ted Goddard

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          onclick="console.log();" will not work on IE; instead, use something like onclick="var x = 0;".

          Show
          Ted Goddard added a comment - onclick="console.log();" will not work on IE; instead, use something like onclick="var x = 0;".
          Hide
          Cruz Miraback added a comment -

          The recent merge with the trunk is causing a regression failure. Please see ICE-7454.

          Show
          Cruz Miraback added a comment - The recent merge with the trunk is causing a regression failure. Please see ICE-7454.
          Hide
          Ted Goddard added a comment -

          This fix is causing failures with various ACE components due to the following:

          ice.ace.AjaxRequest = function(cfg) {

          ...

          ice.fullSubmit(jsfExecute, jsfRender, null, source || form[0], function(parameter) {

          The synthetic event passed by ice.ace.AjaxRequest is null.

          This should be addressed, but will likely require extensive changes to where ice.ace.AjaxRequest is used. A sufficient fix to solve the regression will be to check for the null event when it occurs. The drawback will be that ice.ace.AjaxRequest cases will likely ignore ajax disabled.

          Show
          Ted Goddard added a comment - This fix is causing failures with various ACE components due to the following: ice.ace.AjaxRequest = function(cfg) { ... ice.fullSubmit(jsfExecute, jsfRender, null, source || form [0] , function(parameter) { The synthetic event passed by ice.ace.AjaxRequest is null. This should be addressed, but will likely require extensive changes to where ice.ace.AjaxRequest is used. A sufficient fix to solve the regression will be to check for the null event when it occurs. The drawback will be that ice.ace.AjaxRequest cases will likely ignore ajax disabled.
          Hide
          Ted Goddard added a comment -

          A fix is checked in to proceed when the event is null.

          Show
          Ted Goddard added a comment - A fix is checked in to proceed when the event is null.
          Hide
          Ted Goddard added a comment -

          This has been verified fixed in the reported cases. If specific cases are found where ajax disabled does not interact correctly with parameters, specific JIRAs can be created.

          Show
          Ted Goddard added a comment - This has been verified fixed in the reported cases. If specific cases are found where ajax disabled does not interact correctly with parameters, specific JIRAs can be created.

            People

            • Assignee:
              Ted Goddard
              Reporter:
              Patrick Dobler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: