You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by simon <sk...@apache.org> on 2008/07/13 12:48:56 UTC

Odd "generated" component classes in the JSF1.2 trunk

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?

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.

Regards,
Simon


Re: Odd "generated" component classes in the JSF1.2 trunk

Posted by Leonardo Uribe <lu...@gmail.com>.
On Tue, Jul 29, 2008 at 2:15 AM, simon.kitching@chello.at <
simon.kitching@chello.at> wrote:

> Leonardo Uribe schrieb:
>
>>
>>
>> On Tue, Jul 15, 2008 at 1:55 PM, simon <simon.kitching@chello.at <mailto:
>> simon.kitching@chello.at>> wrote:
>>
>>
>>    On Mon, 2008-07-14 at 16:36 +0200, Leonardo Uribe wrote:
>>    >
>>    >
>>    > On Sun, Jul 13, 2008 at 12:48 PM, simon <skitching@apache.org
>>    <ma...@apache.org>> 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).
>>
>
> Ok, thanks for explaining that.
>
> I'm not really satisfied with just removing the "generated code" comments
> though. This (formerly generated) code is really ugly. And it lacks all the
> comments of the versions from the 1.1 branch. So I think the right thing to
> do is to replace these files with the versions from the 1.1 branch...
>
> I'll try to find some time to look into this, but have guests visiting at
> the moment so it won't be in the next few days.
>
> BTW, I know you're planning to get some releases out soon (after the
> maven-builder-plugin release). I would like to see myfaces-core-1.1.x
> released then tomahawk. Is that what you are planning?
>

The ideal is release myfaces-core 1.1.x, myfaces-core 1.2.x, and then
tomahawk core and core12 (release myfaces core by fact is optional). But the
first blocking task for now is release myfaces-builder-plugin.


>
> Regards,
> Simon
>
>

Re: Odd "generated" component classes in the JSF1.2 trunk

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Leonardo Uribe schrieb:
>
>
> On Tue, Jul 15, 2008 at 1:55 PM, simon <simon.kitching@chello.at 
> <ma...@chello.at>> wrote:
>
>
>     On Mon, 2008-07-14 at 16:36 +0200, Leonardo Uribe wrote:
>     >
>     >
>     > On Sun, Jul 13, 2008 at 12:48 PM, simon <skitching@apache.org
>     <ma...@apache.org>> 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).

Ok, thanks for explaining that.

I'm not really satisfied with just removing the "generated code" 
comments though. This (formerly generated) code is really ugly. And it 
lacks all the comments of the versions from the 1.1 branch. So I think 
the right thing to do is to replace these files with the versions from 
the 1.1 branch...

I'll try to find some time to look into this, but have guests visiting 
at the moment so it won't be in the next few days.

BTW, I know you're planning to get some releases out soon (after the 
maven-builder-plugin release). I would like to see myfaces-core-1.1.x 
released then tomahawk. Is that what you are planning?

Regards,
Simon


Re: Odd "generated" component classes in the JSF1.2 trunk

Posted by Leonardo Uribe <lu...@gmail.com>.
On Tue, Jul 15, 2008 at 1:55 PM, simon <si...@chello.at> wrote:

>
> On Mon, 2008-07-14 at 16:36 +0200, Leonardo Uribe wrote:
> >
> >
> > On Sun, Jul 13, 2008 at 12:48 PM, simon <sk...@apache.org> 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
>
> >
>
>

Re: Odd "generated" component classes in the JSF1.2 trunk

Posted by simon <si...@chello.at>.
On Mon, 2008-07-14 at 16:36 +0200, Leonardo Uribe wrote:
> 
> 
> On Sun, Jul 13, 2008 at 12:48 PM, simon <sk...@apache.org> 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.

>  
>         
>         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

> 


Re: Odd "generated" component classes in the JSF1.2 trunk

Posted by Leonardo Uribe <lu...@gmail.com>.
On Sun, Jul 13, 2008 at 12:48 PM, simon <sk...@apache.org> 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.


>
> 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.


>
> Regards,
> Simon
>
>