On Wed, May 30, 2007, Howard Lewis Ship wrote: > >On 5/30/07, Martin Dietze < [EMAIL PROTECTED]> wrote:
[...] > >> > >For all these I have getters and setters defined. > >> > > > >> > >In my page class I have a constructor like this: > >> > > > >> > >| public CreatePartner() { > >> > >| _contact = new Person(); > >> ^^^^^^^ `person' of course! > >> > >| } [...] > Just noticed your constructor. Don't do that. > > The Person object that you create will become the default value for this > property, rather than null. This is documented. This is strange. If the _person member variable gets reset to the default at the end of each request I would expect not to see the values from it on my page after submit in the render request. What I want to achieve is very much the same scenario found in the documentation section "Form Input and Validation", only I have several compound objects like `Person'. Since the form accesses members of these objects they need to be created in the page class. Since the constructor is obviously not the right place for this, which one would you suggest? Cheers, Martin -- ----------- / http://herbert.the-little-red-haired-girl.org / ------------- =+= Was ist ein Cluster? Wenn vier Bratscher unisono spielen. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]