The reason is that your checkbox really is no longer in the form, so the framework doesn't know where to pull the value from. All of the <html> and <html-el> tags which create form 'widgets' must be between <html:form> and </html:form>.
What you probably need to do is to create a second form on the page by adding <html:form action="/admin/selectUsers.do"> before the <c:forEach> and change the <html:link> to <html:submit> followed by </html:form> HTH, -ed On 6/29/06, Caroline Jen <[EMAIL PROTECTED]> wrote:
My <html-el:checkbox ....> worked fine. But if the <html-el:form ....> ... </html-el:form> come before the <html-el:checkbox ... >, I got the runtime JSP error: "cannot find bean: "org.apache.struts.taglib.html.BEAN" in any scope". The complaint points specifically to the <html-el:checkbox property="selectedUsers[${idx.index}].selected" />. The getter method for selectedUsers[0].selected can no longer be recognized. I need help because I really do not understand why it happens this way. [code]..... <%@ page import="......common.pojo.user.User" %> ...... ...... <!-- Create a variable in scope called userRows from the Users object --> <c:set var="userRows" value="${requestScope.Users}" /> <c:choose> <html-el:form action="/admin/findUsers.do"> // many textfields and a submit button </html-el:form> <c:when test="${not empty userRows}"> ...... ...... <!-- create a "user" object for each element in the userRows --> <c:forEach var="user" items="${userRows}" varStatus="idx"> <tr> <td align="center"> <html-el:checkbox property="selectedUsers[${idx.index}].selected" /> <html-el:hidden property="selectedUsers[${idx.index}].id" value="${user.id}"/> </td> </tr> ...... ...... </c:forEach> <tr> <td colspan="6" align="left"> <html-el:link action="/admin/selectUsers.do">Edit Selected Users</html-el:link> </td> </tr> </c:when> ...... </c:choose> ...... ...... [/code] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]