2

Hi I have a question that I always want to ask. I'm talking about different types of type tag. I read about it a little, but most pages have only names of different tag and nothing more. what is the scope of such a CommandButton, forms ,maybe tags? Which the textfields are cleaned after use with the tag reset button? Especially (if there are some differences with HTML button) i want to know about JavaServer Faces commandButton.

i'm looking for some advanced specification or something. Thanks.

insict
  • 861
  • 2
  • 11
  • 19
  • http://www.jsftoolbox.com/documentation/help/12-TagReference/html/h_commandButton.html? – Luiggi Mendoza Feb 12 '13 at 20:34
  • I know this web page, did you read my post at all? It's just list the possible options without any explain. I'm looking for more detailed description, like documentation. – insict Feb 12 '13 at 20:50
  • That's the documentation. What are you really looking for? There's no scope for the components nor the forms nor any of the tags, the scope is for the managed beans. Also, the `` will generate a ` – Luiggi Mendoza Feb 12 '13 at 20:55
  • I am looking for a wider description of the different values that the `type` attribute ( `` and so on )can have. – insict Feb 12 '13 at 20:55
  • From the link: *type: The type attribute sets the type of button to create for this component (...) This attribute accepts the following values: reset, submit*. – Luiggi Mendoza Feb 12 '13 at 20:57
  • If you really want to get so technical with JSF, you can read the specification of [JSF 2.0](http://jcp.org/en/jsr/detail?id=314) or the upcoming [JSF 2.2](http://jcp.org/en/jsr/detail?id=344) and find your answers there. – Luiggi Mendoza Feb 12 '13 at 21:00
  • I'm looking for the description of what these values ​​do – insict Feb 12 '13 at 21:01
  • jsf specification does not explain this – insict Feb 12 '13 at 21:05

1 Answers1

7

The <h:commandButton type="submit"> (default) generates a HTML <input type="submit"> the <h:commandButton type="reset"> generates a HTML <input type="reset"> and the <h:commandButton type="button"> generates a HTML <input type="button">.

That's all, really. That's also specified as such in <h:commandButton> tag documentation. For the functional difference between the HTML representations, just look in HTML forms spec. Note that this part is completely beyond the scope of JSF.

After all, perhaps it's helpful if you learn basic HTML before learning JSF as that's basically what JSF generates.

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555