- Java EE 8 Application Development
- David R. Heffelfinger
- 192字
- 2021-07-02 22:05:00
Form submission
<h:commandButton> renders an HTML submit button in the browser. Just like with standard HTML, its purpose is to submit the form. Its value attribute simply sets the button's label. This tag's action attribute is used for navigation; the next page to show is based on the value of this attribute. The action attribute can have a String constant or a method binding expression, meaning that it can point to a method in a named bean that returns a string.
If the base name of a page in our application matches the value of the action attribute of a <h:commandButton> tag, then we navigate to this page when clicking the button. This JSF feature frees us from having to define navigation rules, like we used to have to do in older versions of JSF. In our example, our confirmation page is called confirmation.xhtml; therefore by convention, this page will be shown when the button is clicked, since the value of its action attribute (confirmation) matches the base name of the page.
Even though the label for the button reads Save, in our simple example, clicking on the button won't actually save any data.
- DB2 V9權威指南
- Advanced Machine Learning with Python
- Maven Build Customization
- Java Web基礎與實例教程(第2版·微課版)
- Vue.js 3.x從入門到精通(視頻教學版)
- Architecting the Industrial Internet
- Python機器學習經(jīng)典實例
- Mastering Ext JS
- WebRTC技術詳解:從0到1構建多人視頻會議系統(tǒng)
- Learning Concurrent Programming in Scala
- Spring Boot+MVC實戰(zhàn)指南
- MATLAB GUI純代碼編寫從入門到實戰(zhàn)
- FusionCharts Beginner’s Guide:The Official Guide for FusionCharts Suite
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐
- Learning WordPress REST API