I am trying to create checkboxes by iterating thru an ArrayList. The page comes up blank. Userlist is an array of users. "fullname is an element of user. The JSP code is
<s:form action="adminchg">
<s:iterator value="userlist">
<s:checkbox fieldValue="%{user.fullname}" />
</s:iterator>
<s:submit/>
Can someone please help me? I have not been able to get this working.
Thank you for your help. The label rendered when I removed user. prefix. When I look at the source in IE. I see the fieldValue displsayed correctly. I have a better understanding of how to use.
Oh, I didn't understand that the "user" was part of the object being iterated over--my fault.
The reason it works now is because it'll call getFullname() on whatever is on top of the stack. To use the "user.fullname" syntax you'd have to do something like this:
Note the "#" in front of user; it creates a value stack context variable (rather than relying on the user object being the top-most stack item).