Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3340

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.10, 2.1.4
    • JSR-314
    • 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.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: