Our team is starting to use primefaces...and first impression is very good. At present we made sample application (approximately 20 views) for our internal company needs. We faced with the problems using some kind of components:
1. Datatable with dynamic="true" doesn't work correctly on 'sortBy'\'filterBy' fields: 0 (zero) values appear and a lot of columns are absolutely empty. From time to time 'Data error.' appears:( if dynamic option is disable ---> all work fine...but it doesn't cover our needs...
xhtml:
Code: Select all
<p:dataTable var="perform" id="dataTableEntitiesId" value="#{reportJobPerformanceListBean.jobPerformanceEntries}" paginator="true" update="jobReportEntityDisplay" rows="10" dynamic="true" lazy="true" >
<p:column sortBy="#{perform.period}">
<f:facet name="header">
<h:outputText value="Period" style="font-weight:bold"/>
</f:facet>
<h:outputText value="#{perform.period}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm" />
</h:outputText>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Operation time" style="font-weight:bold"/>
</f:facet>
<h:outputText value="#{perform.delta}"/>
</p:column>
......
<p:column filterBy="#{perform.status}">
<f:facet name="header">
<h:outputText value="Reason" style="font-weight:bold;"/>
</f:facet>
<h:outputText value="#{perform.status}" rendered="#{perform.jobStatusRunning}" style="color: green; font-weight:bold"/>
<h:outputText value="#{perform.status}" rendered="#{perform.jobStatusFailed}" style="color: red; font-weight:bold" title="#perform.exception}"/>
<h:outputText value="#{perform.status}" rendered="#{perform.jobStatusCompleted}" style="color: blue; font-weight:bold"/>
</p:column>
</p:dataTable>
Code: Select all
public class <ClassName> {
private static final Log log = LogFactory.getLog(<ClassName>.class);
private List<JobStatusReportEntry> jobPerformanceEntries;
....
public class JobStatusReportEntry{
private static final String DATE_FORMAT_PATTERN = "yy.MM.dd HH:mm";
static SimpleDateFormat dateFormatter = new SimpleDateFormat(DATE_FORMAT_PATTERN);
private UUID jobId;
private String jobName;
private String jobGroup;
private Date startDate;
private Date stopDate;
private JobStatus reason;
private long delta;
private Exception exception;
/*
as you can see, entity has 'run-time' fields which has no appropriate fields in entity class.
All that stuff works correctly by the reason getting entity fields value uses reflection with 'get' prefix.
*/
[b] public String getPeriod(){
if ( startDate != null && stopDate != null )
return dateFormatter.format(startDate) + " - " + dateFormatter.format(stopDate);
else
return "";
}[/b]
...
3. Layout component doesn't work correctly in IE6, but works good in FireFox . When mouse is on "Option two" the next <p:submenu label="Next list"> option lost its style. Looks like style dancing...
xtml:
Code: Select all
<p:layoutUnit position="left" width="200" h:header="Management" ...>
<p:menu>
<p:submenu label="List">
<p:menuitem value="Option one" url="/UI/model/....jsf" icon="/UI/design/....png" ajax="false"/>
<p:menuitem value="Option two" url="/UI/model/....jsf" icon="/UI/design/.....png" ajax="false"/>
</p:submenu>
<p:submenu label="Next list">
........
<ui:insert name="left"></ui:insert>
</p:layoutUnit>
Thank you in advance for any solution\thought how we can repair that!