[jboss-user] [JBoss Seam] - Re: generating forms programatically

steshaw do-not-reply at jboss.com
Thu Nov 29 09:43:14 EST 2007


J, I've seen an example in my searches that used the c: tags to help with a little logic (choosing between a "display" set of components and an "edit" set of components I think). That could certainly have some uses. However, is it possible to inquire about annotations and other meta data about bean properties using only c: tags? Can you show an example, maybe I'm missing something.

I feel at that point, even if possible, that it is too much logic in the template. I cannot imagine that refactoring c: tags in Facelets templates would be much fun :) - I imagine we don't even have "extract method". With templating, and Facelets in particular, aren't we trying to avoid logic in the template?

I would love to do as Peter suggest and do it "with code". I'm just struggling to find the appropriate place to do it. Btw, I am hoping to reuse the s:decorate component from within my code, along with any other useful components. Creating my own component set seems to be quite a bit of trouble though, looking at Hightower part 4 article (seems to be at least one bug in there too). However, that is certainly one option that I am considering (it's so annoying how you have to create a Component and a Tag and a mention in the taglib.xml file!). I recently discovered Ajax4Jsf/RichFaces CDK which could help cutting down the boilerplate with that. Peter I noted that you have had similar thoughts on your blog :).

It seems that JSF templating convolutes the creation of the component tree and the template/layout itself. If I could create my component tree with code and lay them out in a template (amongst more static components I guess), things might be heading towards my ideal scenario.

I will certainly follow up with the Facelets list. Thanks for the thoughts. Keep them coming!

I've also come across an old article from 2004 "Improving JSF by dumping JSP". I haven't finished yet but it's starting to talk about the idea of using a programmatic view handler (instead of JSP in this case - perhaps before Facelets was around) where you can construct the component tree "in code". A custom view handler could be hard to sell to the team though :(.

Cheers,
Steve.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108904#4108904

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108904



More information about the jboss-user mailing list