so try private class User implements Serializable.
that should solve the problem.
-Igor
On 1/9/06, Crash_neo <
[EMAIL PROTECTED]> wrote:
I'm having trouble with a very simple file.
For the record this works on wicket 1.1
I am now using wicket head.
If you run the attached files on HEAD you get this Error:
java.lang.RuntimeException: Internal error cloning object
wicket.Session.setAttribute (Session.java:838)
wicket.Session.update(Session.java:892)
wicket.protocol.http.WebSession.update(WebSession.java:282)
wicket.RequestCycle.cleanUp(RequestCycle.java:797)
wicket.RequestCycle.steps (RequestCycle.java:1067)
wicket.RequestCycle.request(RequestCycle.java:534)
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:199)
javax.servlet.http.HttpServlet.service(HttpServlet.java :689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
on a tomcat 5.5.9 webserver
If you remove the FORM it works fine.
It breaks on
line 833: new ObjectOutputStream(out).writeObject(value);
Is this an error occurred by the 1.1 -> 1.2 migration, thus am I doing something wrong?
Or is it really an error?
Cheers Thijs
UserId: Message goes here
username: Message goes here
UserId:
UserName:
import wicket.markup.html.WebPage;
import wicket.markup.html.basic.Label;
import wicket.markup.html.form.Form;
import wicket.markup.html.form.TextField;
import wicket.model.PropertyModel;
public class Index2 extends WebPage{
public Index2(){
User user = new User();
add(new Label("userId", new PropertyModel(user, "userId")));
add(new Label("userName", new PropertyModel(user, "userName")));
add(new UserForm("userInputForm", user));
}
private final class UserForm extends Form
{
public UserForm(String id, User user)
{
super(id);
add(new TextField("userIdInput", new PropertyModel(user, "userId")));
add(new TextField("userNameInput", new PropertyModel(user, "userName")));
}
protected void onSubmit(){}
}
private class User{
int userId = 200;
String userName = "Thijs";
public User(){}
public int getUserId() { return userId; }
public void setUserId(int userId) { this.userId = userId; }
public String getUserName() { return userName; }
public void setUserName(String userName) { this.userName = userName; }
}
}
