PrimeFaces p:fileUpload not Appearing

I hit this issue with the PrimeFaces p:fileUpload component this morning and it had me going for about an hour until I figured out what was wrong. A good googling shows that more than a few people have hit this problem but no one had reported a solution, there was even a bug report closed as can’t reproduce.Continue reading

Dynamic DataTable with JSF 2.0

A project I’m working on recently presented me with the problem of totally dynamically creating a data table on a JSF page. At first sight I assumed this would be fairly trivial since I had created a number of other components dynamically with no problems. The difference though was that the other components (for example a line chart) were backed by a clear model and they just displayed the data the model provided. A data table on the other hand is typically provided with a list of objects and columns then pick pieces of data for display.Continue reading

JSF Object Not Found

I recently decided to try writing my own JSF component as I had a need that wasn’t met by the excellent PrimeFaces component library. I had read some horror stories about how hard it is to write custom components so I’d put off doing it as I didn’t want to get bogged down when I had so much else to be getting on with. In reality it turned out to be quite simple but that’s another story.Continue reading

Dynamic Dashboard with PrimeFaces – Part 2

After putting together the first page on writing a dynamic dashboard with PrimeFaces I descovered that the method I had come up with wasn’t as good as it could have been. Most noteably it didn’t work properly when the dashboard was updated via a partial page refresh. Typically that type of update would result in a non-unique ID exception being thrown when the page was rendered.Continue reading

Dynamic Dashboard with PrimeFaces

I do a fair bit of work with the PrimeFaces JSF library and it is, IMHO, the best set of JSF widgets currently available. PrimeFaces has an excellent demonstration site as well which gives examples of the most common usage patterns of each widget available. Occasionally though it’s necessary to stray outside what is demonstrated and one such area is with backing beans. In the project I’m currently working on I need to make a dynamic dashboard and this is how I’ve done it. Continue reading