You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ice96 <ic...@gmail.com> on 2008/06/05 23:40:47 UTC
Tapestry 5 server side validation
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;
}
}
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<head>
<title>Register Page</title>
</head>
<body>
<h1>myapp Start Page</h1>
<p> This is the start page for this application, a good place to
start your modifications.
Just to prove this is live: </p>
<t:beaneditform t:id="user" />
</body>
</html>
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Tapestry 5 server side validation
Posted by ice96 <ic...@gmail.com>.
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org