Friday, November 18, 2011

Not as Easy as it Looks: h:form to tr:form

So, I'm trying to implement Trinidad's AJAX (Partial Page Rendering) to decouple my ui:components (see prior post, Components and Confusion in Facelets) from Spring Web Flow.

In essence, you have a trigger (like a button) and a receiver (like a tr:form that needs to be refreshed).  These both need to be Trinidad components.  My first attempt was to upgrade the page's current h:form to a tr:form but this caused a bizarre seeming error at runtime.  Then I read the docs more thoroughly (for this blog post) and found that a tr:form seems to require that the entire page is Trinidad-ified either with a tr:document or a trh:html, trh:head and trh:body instead of the base HTML equivalents.  Also note that the f:view tag is only needed for using JSF with JSP (i.e. NOT Facelets).

(Note: image from Google image cache of http://www.caribbean-tour.com)

Fortunately, changing the template for the entire project like this worked out fine.

No comments:

Post a Comment