Hi,
I make some nice night experience about editing a list in a form.
Here is my template
===============
<t:form>
<t:loop source="users" value="user">
<t:textfield value="user.loginUser" t:validate="required"/><br/>
</t:loop>
<t:submit />
</t:form>
and here is my page
===============
public class ListBean {
private List<User> users = new ArrayList<User>(0);
private User user;
@PageLoaded
public void initUsers(){
users.add(new User("mic1","pass1"));
users.add(new User("mic2","pass2"));
users.add(new User("mic3","pass3"));
users.add(new User("mic4","pass4"));
users.add(new User("mic5","pass5"));
users.add(new User("mic6","pass6"));
}
public void onValidate(){
System.out.println(users);
}
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users = users;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}
I bump into really strange things ...
1) onValidate is called six time !! Probably as much as users.size() I
guess, is that expected ?
2) Debugging and logging show me that the list of users is never updated
whatever the input in the textfields
Is all that normal or did I miss a key concept
--
Michael Courcy
http://courcy.blogspot.com
http://courcy-en.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]