Previous: Sketch of Presentation Layer
Finally I got some code working. I downloaded MyFaces and MyFaces Tomahawk, spent some time wondering how can I do something with this hard to reuse code, and finally got a hack.
What I was aimed to do is take Tomahawk's HtmlDataList, add data to it using setValue(new ListDataModel(myList)) and put it on screen. No luck. Empty "ul" element.
I had to create my MessageListItem, add them to HtmlDataList's children, work around JSF Renderers, and get everything worked at the end. Here's the code of app classes and custom view handler.
Note that I have provided class comments as I'm presenting the code to others.
Here you can see WriteSoftWebLoader which should be runned at our application startup. I added configuration info into web.xml. I also added my custom ViewHandler as JSF view handler into faces-config.xml.
And here is the result
Next: Feedback Are Welcomed
No comments:
Post a Comment