Hi all,
During 1.2 development I came across the maven-faces-plugin from
trinidad. AFAIK it uses some xml files which contains the model for
the generated components. This saves a lot of time to quickly get new
components into work. But there is room to improve it.
Currently customizing the generated component classes requires to
write a template (like UIViewRootTemplate.java) file which contains
custom code. I don't like this approach. Since there is no chance to
modify generated methods and to add custom code. That is even worse if
you only want to add something to save/restore state methods or to add
some parameter checking for setters. I've already seen that some dirty
hacks are implemented to make things work.
IMO there is a way to solve some of the problems by still having
generated code. I'm thinking of an "in place editing" the generated
code inside special marks like this:
public void setXXX(String xxx)
{
/* start custom code */
// do something before the generated code
/* end custom code */
_XXX = xxx;
/* start custom code */
// do something after the generated code
/* end custom code */
}
WDYT?
--
Mathias