L.S.,

A while ago, I have been doing a few things for the code generator (MYFACES-1284 in JIRA) but at that time, it was suggested by Manfred to wait with cleaning up all manual changes in the generated code blocks until release 1.1.x was done. You're not doing anything wrong, there are in fact lots of changes between the code generated and the code that is currently in SVN. It's even worse for the Tomahawk components. Personally, I see little added value in the call to _ComponentUtils.getStringValue() generated, so I would suggest to change the code generator to generate the code currently in SVN. I can create a patch for this tomorrow and add it to the JIRA issue mentioned before. When that gets applied, it should get us already one step closer to bringing the generated code back in sync with SVN.

Secondly, I know Trinidad uses a code generator, perhaps Tobago does so too. Does anyone have an idea what they generate and how they do it? It might be a good idea to look if any of the code generators in these other Myfaces subprojects have some extra features to offer on top of what already exists. It might give us a way to have more boilerplate code generated quickly, as Werner Punz was asking earlier today.


Gert Vanthienen
[EMAIL PROTECTED]

L Frohman wrote:
I tried the codegenerator, and it did not produce the results that are in
the existing code:
A file compare gives me a lot of:

<         return vb != null ?
_ComponentUtils.getStringValue(getFacesContext(), vb) : null;
---
        return vb != null ? (String)vb.getValue(getFacesContext()) : null;

is existing svn code
< is generated code

Am I doing something wrong?
-----Original Message-----
From: Manfred Geiler [mailto:[EMAIL PROTECTED] Sent: Thursday, September 07, 2006 4:11 AM
To: MyFaces Development
Subject: Re: GENERATED CODE BEGIN (do not modify!)

Dennis, Lance,
I am indeed of the opinion that is is NOT OK to modify this generated code
parts.
Code generation will get importance again when we do the 1.2 port.
And: Code generation is still important and convenient for coding new
tomahawk components. Well, nobody seems to use it by now. Reason might be
(no, I'm sure it IS) the lack of docs. Yes, Lance, you are right, there are
no docs. Mea culpa.
And in defense I can not even say it's self-explaining. Because it is not!
;-)

Ok, I give you a very short intro:

Codegenerator can be used by doing a "mvn clean install
-Pregenerate-component-code"
You can try it in core/api for instance.

Base for the generation of these code parts is an according xml file that
looks like this:
http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/face
s/component/html/HtmlCommandButton.xml?view=markup
and sits in the same src dir as the component's java file.
(which is nonsense and should be in a config folder according to the maven
standard dir layout, of course)

There are some quirks: No dtd or xsd, and so on
But: it works! And it did a great job in the early days of MyFaces.

HTH and thanks for your interest in this nostalgic thingy  :-)

Manfred



On 9/5/06, L Frohman <[EMAIL PROTECTED]> wrote:
Thanks,
     There is a codegenerator under "build-tools" under "maven".
No documentation? (stupid question?)

-----Original Message-----
From: Dennis Byrne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 05, 2006 12:11 PM
To: MyFaces Development
Subject: Re: GENERATED CODE BEGIN (do not modify!)

Large parts of the original code base were generated. The generator has recently been committed. Check svn ... I forget the name, but it is a seperate sub project.

Is anyone else of the opinion that it is now "OK" to modify this code? One doesn't have to look to far to find plenty of undocumented cases where many of us have done this, and for good reasons.

Dennis Byrne

-----Original Message-----
From: L Frohman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 5, 2006 03:00 PM
To: ''MyFaces Development''
Subject: re: GENERATED CODE BEGIN (do not modify!)

In several of the myfaces components, there is code marked

"GENERATED CODE BEGIN (do not modify!)"

(in particular org.apache.myfaces.component.html.ext.HtmlPanelGroup)
How is this generated?










Reply via email to