On Tue, Jul 15, 2008 at 1:55 PM, simon <[EMAIL PROTECTED]> wrote: > > On Mon, 2008-07-14 at 16:36 +0200, Leonardo Uribe wrote: > > > > > > On Sun, Jul 13, 2008 at 12:48 PM, simon <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I've just noticed that quite a few component classes are > > checked in to > > the JSF 1.2 trunk, but carry big "generated code, do not > > modify" > > warnings. > > > > And they look completely different from the versions in the > > JSF1.1 > > branch. > > > > Examples: > > UICommand.java > > UIData.java > > UIGraphic.java > > UIInput > > UINamingContainer > > > > I'm a little confused here. Can someone (Leonardo?) explain > > what is > > happening here? > > > > This comments should be removed, since this classes are not generated. > > But the weird thing is that they *look* generated. The code is just all > over the place, variables declared in the middle of the file, odd line > wrapping. > > And all the documentation that was on the UIData class is completely > gone. > > I don't know what is going on here, but it feels wrong. >
When myfaces core 1.2 started, all classes were generated using myfaces-faces-plugin template approach, so the old code was just replaces. That is the reason because myfaces 1.1 component classes looks different from its 1.2 counterparts. Then, myfaces-builder-plugin was applied, so some generated classes using myfaces-faces-plugin were just moved to src/main/java. I have removed the wrong warnings, since this core classes should not be generated (makes easier to users to check if something is wrong). > > > > > > > At a guess, it looks to me like the difference between JSF1.1 > > and JSF1.2 > > code is that in jsf1.2 things are set up to auto-generate the > > saveState/restoreState methods for these components, while in > > JSF1.1 > > branch it is not (hand-coded implementations are still used). > > > > But: > > > > * I would not expect any auto-generated classes to be checked > > in. > > * I would expect a private base class, or template class to > > exist which > > the generated class is derived from. But I can see no such > > thing (eg no > > _UIData class). > > > > The classes listed above just look horrible; something really > > does need > > to be done about this. > > > > Some classes that extends from UIComponent has its own custom code, so > > in my opinion it is better to let is without generation pattern (in > > this case template pattern is the only way but it is not too much > > flexible as myfaces-faces-plugin). It is more clear for developers. > > I don't understand this. I'll try reading it again after my upcoming > holiday, maybe my brain will work better then :-) > > Regards, > Simon > > > > >