The general strategy that I used was:
1. Build some framework classes that know how to extract basic field level metadata from
ejb/hibernate config info at runtime. Automatically extracted metadata includes types,
lengths, relationships etc. I also provide attributes in these framework classes to add
additional decorations (editable status, pick list options, custom templates types etc.)
2. Provide an XML based config that allows me to specify the data configurations that
should appear on each form in my system, and the facelets template to be used to draw that
form (e.g. a panel renderer, a grid renderer etc) and the view id for that form.
3. Provide a custom facelets resolver that selects the correct rendering template for each
form defined in my config when the user navigates to a particular URL. In this way I
don't have to have actual facelets pages on disk for each form.
4. Build some generic renderers that use the metadata provider classes in conjunction with
the c: tags.
I can support 10s or 100s of entity types in my system supported by only a couple of
generic renderers.
I don't know if this is all a great idea, but it works for me!
Cheers
J
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108969#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...