Note that there are some explanatory texts on larger screens.

plurals
  1. POsingle-page master-detail in JSF/PrimeFaces
    primarykey
    data
    text
    <p>I am interested to know what are some good patterns for implementing <strong>single-page master-detail</strong> views in a <strong>JSF-PrimeFaces / JPA</strong> stack. It seems that most of the material and tutorials on the web are only discussing the rather trivial one table per view pattern.</p> <p>But I am interested in things such as having <strong>CUSTOMER</strong> and <strong>ORDER</strong> tables in the database and one <strong>xhtml</strong> page where you can view the customers (e.g. as a <strong>p:datatable</strong>) on the top half and the orders for the currently selected customer on the lower half (again as a <strong>p:datatable</strong>). It is not clear to me how to best organize JSF/PrimeFaces/backing beans and facades / entities / JPA code to achieve the above in a generally applicable way with maximum code reuse. E.g.</p> <ol> <li>should I define one backing bean for the whole <strong>xhtml</strong> view or two backing beans, one for each component of the view (master / detail)?</li> <li>can the pattern be generalized to more than one detail tables (at the same level)?. E.g. have a view of the <strong>CUSTOMER</strong> table at the top half and a tabbed view at the lower half, consisting of two views for the <strong>ORDER</strong> and <strong>PAYMENT</strong> detail tables respectively (both in a N-1 relationship with table <strong>CUSTOMER</strong></li> <li>can the pattern be generalized to more than one level of detail (e.g. have on the same page a view of the <strong>CUSTOMER</strong>, the <strong>INVOICE</strong>, and the <strong>INVOICELINE</strong> tables.</li> <li>How easily the proposed pattern can accommodate modifications as well. E.g. using editable datatables one could change the customer details and delete an order and finalize both changes, in one go, using a <em>commit changes</em> button.</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload