Re: Tapestry 5 server side validation

2008-06-06 Thread ice96

Thanks! I'm stupid!;)
-- 
View this message in context: 
http://www.nabble.com/Tapestry-5-server-side-validation-tp17680152p17687166.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry 5 server side validation

2008-06-06 Thread nille hammer

Hi ice,

> public Object onSubmit()
> {
>   return Start.class;
> }
Rename the method to onSuccess(). That should solve the problem.

Regards, nillehammer


- original Nachricht ----

Betreff: Tapestry 5 server side validation
Gesendet: Do, 05. Jun 2008
Von: ice96<[EMAIL PROTECTED]>

> 
> Hello, 
> I have problems with tapestry 5 server side validations. First o all there
> is my code:
> package org.example.myapp.model;
> 
> import org.apache.tapestry.beaneditor.NonVisual;
> import org.apache.tapestry.beaneditor.Validate;
> 
> public class User {
>   private int id;
>   private String name;
>   private String surname;
>   
>   
>   public int getId() {
>   return id;
>   }
>   @NonVisual
>   public void setId(int id) {
>   this.id = id;
>   }
>   @Validate("required")
>   public String getName() {
>   return name;
>   }
>   
>   public void setName(String name) {
>   this.name = name;
>   }
>   
>   @Validate("required")
>   public String getSurname() {
>   return surname;
>   }
>   
>   public void setSurname(String surname) {
>   this.surname = surname;
>   }
> }
> 
> 
> 
> package org.example.myapp.pages;
> 
> import org.example.myapp.model.User;
> 
> public class Register {
> private User user;
> 
> public User getUser() {
>   return user;
> }
> 
> public void setUser(User user) {
>   this.user = user;
> }
> 
> public Object onSubmit()
> {
>   return Start.class;
> }
> 
> }
> 
> 
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> 
> Register Page
> 
> 
> myapp Start Page
> 
>  This is the start page for this application, a good place to
> start your modifications.
> Just to prove this is live: 
> 
> 
> 
> 
>     
> 
> 
> 
> 
> After disabling java script validation stop working. Some times after page
> refresh I can see validatio messanges, but not after click submit button. I
> have tested on firefox 3  and opera (in linux)
> -- 
> View this message in context:
> http://www.nabble.com/Tapestry-5-server-side-validation-tp17680152p17680152.
> html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--- original Nachricht Ende 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry 5 server side validation

2008-06-05 Thread ice96

Hello, 
I have problems with tapestry 5 server side validations. First o all there
is my code:
package org.example.myapp.model;

import org.apache.tapestry.beaneditor.NonVisual;
import org.apache.tapestry.beaneditor.Validate;

public class User {
private int id;
private String name;
private String surname;


public int getId() {
return id;
}
@NonVisual
public void setId(int id) {
this.id = id;
}
@Validate("required")
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Validate("required")
public String getSurname() {
return surname;
}

public void setSurname(String surname) {
this.surname = surname;
}
}



package org.example.myapp.pages;

import org.example.myapp.model.User;

public class Register {
private User user;

public User getUser() {
return user;
}

public void setUser(User user) {
this.user = user;
}

public Object onSubmit()
{
return Start.class;
}

}


http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Register Page


myapp Start Page

 This is the start page for this application, a good place to
start your modifications.
Just to prove this is live: 









After disabling java script validation stop working. Some times after page
refresh I can see validatio messanges, but not after click submit button. I
have tested on firefox 3  and opera (in linux)
-- 
View this message in context: 
http://www.nabble.com/Tapestry-5-server-side-validation-tp17680152p17680152.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]