Jsf-delete-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 subchapter of JSF - DataTables 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-最初のアプリケーションの章で行ったようにアプリケーションをコンパイルして実行します。 すべてがアプリケーションで問題ない場合、次の結果が生成されます。
任意の行の[削除]ボタンをクリックします。 出力は次のようになります。