Jsf-add-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 - 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-最初のアプリケーションの章で行ったようにアプリケーションをコンパイルして実行します。 すべてがアプリケーションで問題ない場合、次の結果が生成されます。
Add Employee Formに値を追加し、_Add Employee_ボタンをクリックします。 次の結果を参照してください。