You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephan Windmüller <st...@cs.tu-dortmund.de> on 2009/07/01 10:01:54 UTC

Re: Validating nested loops with helper classes

Stephan Windmüller wrote:

> As long as I do not use a List to store the objects, all works fine. But
> when I submit the form above, it always resets and the list consists of
> "undecided" users.

The next thing I found out: This has nothing to do with my helper
classes. Even when I use a list of Strings for the assignments and
construct the select component like

 <t:select model="literal:User1,User2,User3" value="selectedUser"/>

the users are not stored in the list. I tried different values for the
formState-Parameter, nothing helped. Even when I print all values from
the sychronizeValues-Event, all are empty.

Please, is there anyone who can tell me how to iterate over a list and
store data in it?

Regards
 Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Validating nested loops with helper classes

Posted by Stephan Windmüller <st...@cs.tu-dortmund.de>.
Stephan Windmüller wrote:

> Please, is there anyone who can tell me how to iterate over a list and
> store data in it?

I found the solution. It was a mixture of three different things:

1. Using the formState="literal:VALUES" in loops.
2. The two value-elements from select and loop must not be the same
   value, otherwise the object references do not match.
3. Losing the session after reloading the tomcat application or even
   restarting tomcat is not the same as manually logging out.

Another solution I found on this list is using the index-parameter of
the loop, removing the Property-Annotation and using the index in
getAssignedUser.

Hope that helps others.

- Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org