Open rootkit007 opened 11 years ago
You would need to add an IValueFormatter implementation for UINamingContainer. Probably all it needs to do is call ExportUtil.transformComponentsToString(), passing its children as the components to transform.
Any reason why we cant just change it in implementation of DefaultFormatter?
The idea is to have a separate IValueFormatter implementation for each component type that needs to be formatted. DefaultFormatter is a last-ditch formatter for when no other formatters match the component.
Understandable. However to me it seems ExportUtils.transformComponentsToString() will do a better last-ditch effort than just .toString()?
Not necessarily. The component may not have any children, or it may have children that don't render anything the user can see and which shouldn't be formatted (e.g. p:ajax).
I ran into a problem with my composite component, so far no clue. See http://stackoverflow.com/questions/16443446/convert-jsf-composite-component-to-text
I'm not sure what's wrong. I would have to experiment with this myself. Unfortunately, I don't have the time right now.
Currently these show up as javax.faces.component.UINamingContainer in exported file. Would also appreciate any pointers on how to implement this on my own