Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread Ulrich Stärk
I rather meant @Property adding getters and setters in general. And like Markus, this is working fine for me (just tested it with 5.0.18). page class: @Property(write=false) @Validate("required") private String foo; public void setFoo(String foo) { this.foo = foo; System.out.println("s

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread Markus Lux
I set up a fresh application from the maven quickstart archetype and added the sample code posted earlier by osamuo. I also added one sysout to see if the setter is called. I cannot confirm that the setter isn't called when @Validate( "required") is added to the property and you type at least one

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread Howard Lewis Ship
I suspect that setName() isn't being called because the input destined for the property fails validation. On Mon, Feb 23, 2009 at 8:35 AM, Robert Zeigler wrote: > I haven't tested this behavior, but I would consider it a bug for two > reasons: > 1) write = false is specified for @Property. So ta

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread Robert Zeigler
I haven't tested this behavior, but I would consider it a bug for two reasons: 1) write = false is specified for @Property. So tapestry really shouldn't be creating any setters for this property during the class transformation. 2) From Osamuo's text, it sounds like that if you don't have @

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread Ulrich Stärk
No, it's not. This is expected behaviour. Uli inyokoyoko-deve...@yahoo.co.jp schrieb: Hi, I have already known a solution. It seems to be a bug. Don't you think so? osamuo Using the @Property annotation will make Tapestry add getters and setters for this property during class transforma

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread inyokoyoko-develop
Hi, I have already known a solution. It seems to be a bug. Don't you think so? osamuo Using the @Property annotation will make Tapestry add getters and setters for this property during class transformation that will override your supplied ones. Leave out the @Property annotation and specif

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-23 Thread Ulrich Stärk
Using the @Property annotation will make Tapestry add getters and setters for this property during class transformation that will override your supplied ones. Leave out the @Property annotation and specify your own getters and setters and you should be fine. Uli inyokoyoko-deve...@yahoo.co.jp

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-22 Thread inyokoyoko-develop
Hi, You can encounter the same problem with the following code in a freshly set up project. Please try. Click the submit button. Test.java - package org.example.myapp.pages; import java.util.Date; import org.apache.tapestry5.annotations.Property; import org.apa

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-22 Thread Markus Lux
I'm using the same version as you do - 5.0.18 Have you tried the same code in a freshly set up project? The problem seems to be somewhere else in your project. On Sun, Feb 22, 2009 at 5:55 PM, wrote: > Hi, > > What version are you using? > > With the following code setName() was called. > > @Pro

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-22 Thread inyokoyoko-develop
Hi, What version are you using? With the following code setName() was called. @Property( write = false ) private String name; public void setName( String name ){ <== called ... this.name = } With the following code setName() was not called. @Property( write = false ) @Valida

Re: [T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-22 Thread Markus Lux
With your example code I'm getting an ComponentEventException saying that "name" is read-only. Try adding a public-modifier to your setter. That worked for me. On Sun, Feb 22, 2009 at 3:49 PM, wrote: > Hi, > > When I set '@Validate' for a TextField, the setter was never called. > It seems to be

[T5.0.18] Setter method was not called when '@Validate' was set.

2009-02-22 Thread inyokoyoko-develop
Hi, When I set '@Validate' for a TextField, the setter was never called. It seems to be a bug. @Property( write = false ) @Validate( "Required,MinLength=5,MaxLength=16" ) private String name; void setName( String name ){ <=== not called ... this.name = } Thanks, osamuo -