Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

In the JSF application, when "reset" or "button" (except "submit") is specified in the "type" attribute of the <h:commandButton> tag, "submit" processing is executed. #4383

Open
micRo-wlY opened this issue Oct 10, 2018 · 5 comments

Comments

@micRo-wlY
Copy link

In the HTML style, when the reset button and the generic button (press the click/enter key) are executed, the submit processing is not executed.
However, in the JSF mounting of glassfish, if the above conditions are met, the submit processing will be executed when the reset button and the button (press the click/enter key) are executed.

Specifically, when the following conditions are met.

●Condition 1

  1. The <h:form> tag contains the "onsubmit" attribute.
  2. The <h:form> element contains child elements that match <h:commandButton> below.
        a) In the "type" attribute, "reset" or "button" (*1) is specified.
        b) There are <f:param> elements in the child elements.
  3. The <h:form> element and the element of the HTML form do not contain the <f:ajax> element.
  4. Click link or the button corresponding to the element of 2) (or press the enter key).

●Condition 2

  1. The <h:form> tag contains the "onsubmit" attribute.
  2. The <h:form> element contains child elements that match <h:commandButton> below.
        a) In the "type" attribute, "reset" or "button" (*1) is specified.
        b) Contains the "onclick" attribute.
        c) There are <f:param> elements in the child elements.
  3. The <h:form> element and the element of the HTML form contain the <f:ajax> element.
       "true" is specified in the "disabled" attribute.
  4. Click link or the button corresponding to the element of 2) (or press the enter key).

*1) When there is no attribute, it is judged that "submit" is specified.

From the original HTML style, if the value of the type attribute of the commandButton is other than "submit", "submit" should not be executed.

@micRo-wlY
Copy link
Author

Is there anyone who can respond as quickly as possible, thanks very much. :)

1 similar comment
@micRo-wlY
Copy link
Author

Is there anyone who can respond as quickly as possible, thanks very much. :)

@micRo-wlY
Copy link
Author

testjsf.zip
I made a test app that contains the above conditions. Does anyone respond and suggest a correction.

@erickdeoliveiraleal
Copy link

mojarra issue tracker moved to: https://github.com/eclipse-ee4j/mojarra

@micRo-wlY
Copy link
Author

The issue is moved to: eclipse-ee4j/mojarra#4536

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants