Streamline JSF Development

The following blog by Nadine McKenzie contains some really awesome advise.

http://today.java.net/article/2011/07/22/streamline-jsf-development-these-3-facelets-must-knows

PrimeFaces Dialog

Attribute Description
dynamic 1. This attribute is useful when object that the dialog depends upon is not available at the time of loading the page. This is usually the case with Data Table rows that are selected and then displayed in a Dialog to edit or to add a new row.

2. As mentioned in the showcase, the dynamic=”true” decreases the load time and size of the page.

PrimeFaces DataTable

1. Remove all borders

//selector could be change with your tr td markup
.ui-datatable * {
     border : 0px !important;
}

2. Set the column width

<p:column style="width:50px" headerText="#{msgs['fld.contact.name']}">
  <h:outputText value="#{row.object.contact.name}"/>
</p:column>

*Note: Currently PRIMEFACES-2297 is causing the inner text to be sized and not the column width.

Advertisements