MyFaces Core
  1. MyFaces Core
  2. MYFACES-3340

h:commandButton with f:ajax behavior and f:param renders submit script

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.10, 2.1.4
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Trying this test case:

      <h:commandButton id="submit" value="Submit">
      <f:param name="someparam" value="123"/>
      <f:ajax .... />
      </h:commandButton>

      The final link appends the submit script, but it should not. In theory the submit script should be added but in practice there is no clean way to detect if a "submit" behavior has been added to the component, so to keep things simple, if the button is submit type, it is responsibility of the developer to add a client behavior that submit the form, for example using a f:ajax tag.
      Otherwise, there will be a situation where a full submit could be trigger after an ajax operation. Note we still need to append two scripts if necessary: autoscroll and clearhidden fields, because this code is called for a submit button.

        Activity

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Leonardo Uribe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development