Jsf-edit-datatable
提供:Dev Guides
JSF-DataTableのデータの編集
このセクションでは、dataTableの行に編集機能を追加する方法を紹介します。
応用例
上記の機能をテストするためのテストJSFアプリケーションを作成しましょう。
Step | Description |
---|---|
1 | Create a project with a name helloworld under a package com.finddevguides.test as explained in the JSF - Display DataTable sub-chapter of JSF - Data Tables chapter. |
2 | Modify home.xhtml as explained below. Keep the rest of the files unchanged. |
3 | Compile and run the application to make sure the business logic is working as per the requirements. |
4 | Finally, build the application in the form of war file and deploy it in Apache Tomcat Webserver. |
5 | Launch your web application using appropriate URL as explained below in the last step. |
home.xhtml
すべての変更を完了したら、JSF-最初のアプリケーションの章で行ったようにアプリケーションをコンパイルして実行します。 すべてがアプリケーションで問題ない場合、次の結果が生成されます。
任意の行の[編集]ボタンをクリックします。 出力は次のようになります。
_Save Employees_ボタンをクリックして、編集を保存します。 出力は次のようになります。