On 3/8/07, Martin Marinschek <[EMAIL PROTECTED]> wrote:
I still wonder if the approach MyFaces originally had wasn't better
than the new approach of the generator in Trinidad.

Apart from the fact of course that generation should happen on every
run of the build - we kind of neglected that.

What you have with the Trinidad generator now is:

...Template.java:

...

void myMethod() {
  setMyProperty(test); //won't compile, cause setMyProperty is autogenerated!
}

The generator suports a special syntax:

/**/public abstract setMyProperty(...)

for just this sort of thing.

with the MyFaces initial method, this was all in one file, with special markers:

Component.java

void myMethod(){
  setMyProperty(test); //compiles, cause in the same file
}

/** auto generated begin - don't change this code **/

public void setProperty(String property) {...}

/** auto generated end - don't change this code **/

But that means that you've checked into source control
auto-generated code.  Which is a BIG problem.
Auto-generated code should be generated at build
time, and never get checked in.

-- Adam

Reply via email to