[jboss-user] [JBoss Seam] - Re: DRY Edit pages
wsollers
do-not-reply at jboss.com
Wed Jun 6 08:40:53 EDT 2007
The problem of changing db / entity metadata requiring a second change in the ui is not new and has been around for ever and predates java.
However to make life easier just make a utility f(x) that will grab the entity and check for the field and see if it has a Hibernate annotation or your own custom annotation and get the appropriate metadata (length / precision etc ) you need and then use it.
Maxlength and size both support EL. So you can do a size="#{fieldMetadata.sizeCalc('foo.class', 'field'}" instead of a " size="2".
You can use custom facelets to do the same thing.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051697#4051697
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051697
More information about the jboss-user
mailing list