Note that there are some explanatory texts on larger screens.

plurals
  1. POJSF 2.0 Dynamic Views
    primarykey
    data
    text
    <p>I'm working on a web project which uses JSF 2.0, PrimeFaces and PrettyFaces as main frameworks / libraries. The pages have the following (common) structure: Header, Content, Footer. </p> <p><strong>Header:</strong> The Header always contains the same menu. This menu is a custom component, which generates a recursive html <code>&lt;ul&gt;&lt;li&gt;</code> list containing <code>&lt;a href="url"&gt;</code> html links, this is all rendered with a custom renderer. The link looks like 'domain.com/website/datatable.xhtml?ref=2'. Where the ref=2 used to load the correct content from the database. I use prettyfaces to store this request value in a backingbean.</p> <p><em>Question 1</em>: Is it ok to render the <code>&lt;a href&gt;</code> links myself, or should I better add an HTMLCommandLink from my UIComponent and render that in the encodeBegin/End?</p> <p><em>Question 2</em>: I think passing variables like this is not really the JSF 2.0 style, how to do this in a better way?</p> <p><strong>Content:</strong> The content contains dynamic data. It can be a (primefaces) datatable, build with dynamic data from the database. It can also be a text page, also loaded from the database. Or a series of graphs. You got the point, it's dynamic. The content is based on the link pressed in the header menu. If the content is of type datatable, then I put the ref=2 variable to a DataTableBean (via prettyfaces), which then loads the correct datatable from the database. If the content is of type chart, I'll put it on the ChartBean.</p> <p><em>Question 3</em>: Is this a normal setup? Ideally I would like to update my content via Ajax.</p> <p>I hope it's clear :)</p>
    singulars
    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.
    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