I have a JSP and there are a link (it invokes an
action) and a form (the form has a submit button).  My
struts-config.xml looks like:

[code]
                <action path="/admin/findUsers"
type=".......admin.action.FindUsersAction"
                                        name="FindUsersForm"
                                        input="/admin/maintainuser">
                        <forward name="default"
path="admin.foundusers.default" />
                </action>
           
                <action path="/admin/selectUsers"
type=".......admin.action.SelectUsersAction"
                                        name="SelectUsersForm"
                                                        
input="/admin/maintainuser">
                        <forward name="default"
path="admin.selectedusers.default" />
                </action>
[/code]

My JSP works well if the JSP has only the link, which
invokes an action.  My JSP also works well if the JSP
has only the form, which has a submit button.
But, if I put both the link and the form in the JSP, I
have the runtime JSP error: "Not getter method for
property selectedUsers[0].selected of bean
org.apache.struts.taglib.html.BEAN"

I do not understand the error message because I have
all the required getter methods and those getter
methods work if I do not put both the action link and
the form within this one single JSP.

I coded the JSP using the JSTL and html-el tags.  
Here is my code (the code is also in the attachment):
[code]
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-html-el"
prefix="html-el"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/core" prefix="c" %> 
<%@ taglib uri="/tags/targeting-foundation"
prefix="ecustoms"%>
<%@ page import="java.util.List"%>
<%@ page
import="gov.cbp.ace.st.tf.common.pojo.user.User" %>

<html:html>
<HEAD>
<link rel="stylesheet" type="text/css"
href="<html:rewrite page='/theme/Master.css'/>">
<TITLE>User Maintenance Home Page</TITLE>
</HEAD>

<BODY>
<html-el:form action="/admin/findUsers.do"> 
        <table width="95%" border="0" align="center">
                <tr>
                        <td colspan="6" align="center">
                                <html-el:submit
accesskey="S">Search</html-el:submit>
                        </td>
                </tr>
                <tr>
                        <td colspan="6" align="center">
                                <br>
                        </td>
                </tr>
        </table>

        <!-- Create a variable in scope called userRows from
the Users object -->
        <c:set var="userRows" value="${requestScope.Users}"
/>
        
        <c:choose>
                <c:when test="${not empty userRows}">
                        <table width="95%" border="0" cellspacing="1"
cellpadding="3" align="center" >
                                <tr>
                                        <td class="adminHeader"><span
class="dataHeader">Select</span></td>
                                        <td class="adminHeader"><span
class="dataHeader">Hash ID</span></td>
                                        <td class="adminHeader"><span
class="dataHeader">First Name</span></td>
                                        <td class="adminHeader"><span
class="dataHeader">Last Name</span></td>
                                        <td class="adminHeader"><span
class="dataHeader">Creation Date</span></td>
                                        <td class="adminHeader"><span
class="dataHeader">Modification Date</span></td>
                                </tr>
                        
                                <!-- create a "user" object for each element in
the userRows -->                        
                                <c:forEach var="user" items="${userRows}"
varStatus="idx">
        
                                        <c:choose>
                                                <c:when test="${( idx.count+1 
)%2==0}">
                                                        <tr 
class="contentCell1">
                                                </c:when>
                                                <c:otherwise>
                                                        <tr 
class="contentCell2">
                                                </c:otherwise>
                                        </c:choose>
                                                                        <td 
align="center">
                                                                                
<span class="dataContent">
                                                                                
                        <html-el:checkbox
property="selectedUsers[${idx.index}].selected" />
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].id"
value="${user.id}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].userIDCode"
value="${user.userIDCode}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].createdByUserID"
value="${user.createdByUserID}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].updatedByUserID"
value="${user.updatedByUserID}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].firstName"
value="${user.firstName}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].lastName"
value="${user.lastName}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].createdDate"
value="${user.createdDate}"/>
                                                                                
                        <html-el:hidden
property="selectedUsers[${idx.index}].updatedDate"
value="${user.updatedDate}"/>
                                                                                
</span>
                                                                        </td>
                                                        <c:choose>      
                                                                <c:when 
test="${not empty
user.createdByUserID}">
                                                                        <td 
align="center"><span
class="dataContent"><c:out
value="${user.createdByUserID}" /></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span
class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.firstName}">
                                                                        <td 
align="center"><span
class="dataContent"><c:out value="${user.firstName}"
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span
class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.lastName}">
                                                                        <td 
align="center"><span
class="dataContent"><c:out value="${user.lastName}"
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span
class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.createdDate}">
                                                                        <td 
align="center"><span
class="dataContent"><c:out value="${user.createdDate}"
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span
class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.updatedDate}">
                                                                        <td 
align="center"><span
class="dataContent"><c:out value="${user.updatedDate}"
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span
class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        </tr>
                                </c:forEach>

                                <tr>
                                        <td colspan="6">
                                                <br>
                                        </td>
                                </tr>
                                <tr>
                                        <td colspan="6" align="left">
                                                <html:link
action="/admin/selectUsers.do">Edit Selected
Users</html:link>
                                        </td>
                                </tr>
                        </table>

                        <br>
                        <br>
                        <!-- Pagination -->
                        <center><ecustoms:pagenav
hrefName="pagenavHref"/></center>

                </c:when>
        
                <c:otherwise>
                        <center><H1>No User Found.</H1></center>
                </c:otherwise>
        </c:choose>

</html-el:form>

</body>
</html:html>
[/code]

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-html-el" prefix="html-el"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/core" prefix="c" %> 
<%@ taglib uri="/tags/targeting-foundation" prefix="ecustoms"%>
<%@ page import="java.util.List"%>
<%@ page import="gov.cbp.ace.st.tf.common.pojo.user.User" %>

<html:html>
<HEAD>
<link rel="stylesheet" type="text/css" href="<html:rewrite 
page='/theme/Master.css'/>">
<TITLE>User Maintenance Home Page</TITLE>
</HEAD>

<BODY>
<html-el:form action="/admin/findUsers.do"> 
        <table width="95%" border="0" align="center">
                <tr>
                        <td colspan="6" align="center">
                                <html-el:submit 
accesskey="S">Search</html-el:submit>
                        </td>
                </tr>
                <tr>
                        <td colspan="6" align="center">
                                <br>
                        </td>
                </tr>
        </table>

        <!-- Create a variable in scope called userRows from the Users object 
-->
        <c:set var="userRows" value="${requestScope.Users}" />
        
        <c:choose>
                <c:when test="${not empty userRows}">
                        <table width="95%" border="0" cellspacing="1" 
cellpadding="3" align="center" >
                                <tr>
                                        <td class="adminHeader"><span 
class="dataHeader">Select</span></td>
                                        <td class="adminHeader"><span 
class="dataHeader">Hash ID</span></td>
                                        <td class="adminHeader"><span 
class="dataHeader">First Name</span></td>
                                        <td class="adminHeader"><span 
class="dataHeader">Last Name</span></td>
                                        <td class="adminHeader"><span 
class="dataHeader">Creation Date</span></td>
                                        <td class="adminHeader"><span 
class="dataHeader">Modification Date</span></td>
                                </tr>
                        
                                <!-- create a "user" object for each element in 
the userRows -->                        
                                <c:forEach var="user" items="${userRows}" 
varStatus="idx">
        
                                        <c:choose>
                                                <c:when test="${( idx.count+1 
)%2==0}">
                                                        <tr 
class="contentCell1">
                                                </c:when>
                                                <c:otherwise>
                                                        <tr 
class="contentCell2">
                                                </c:otherwise>
                                        </c:choose>
                                                                        <td 
align="center">
                                                                                
<span class="dataContent">
                                                                                
                        <html-el:checkbox 
property="selectedUsers[${idx.index}].selected" />
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].id" value="${user.id}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].userIDCode" value="${user.userIDCode}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].createdByUserID" 
value="${user.createdByUserID}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].updatedByUserID" 
value="${user.updatedByUserID}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].firstName" value="${user.firstName}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].lastName" value="${user.lastName}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].createdDate" value="${user.createdDate}"/>
                                                                                
                        <html-el:hidden 
property="selectedUsers[${idx.index}].updatedDate" value="${user.updatedDate}"/>
                                                                                
</span>
                                                                        </td>
                                                        <c:choose>      
                                                                <c:when 
test="${not empty user.createdByUserID}">
                                                                        <td 
align="center"><span class="dataContent"><c:out value="${user.createdByUserID}" 
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.firstName}">
                                                                        <td 
align="center"><span class="dataContent"><c:out value="${user.firstName}" 
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.lastName}">
                                                                        <td 
align="center"><span class="dataContent"><c:out value="${user.lastName}" 
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.createdDate}">
                                                                        <td 
align="center"><span class="dataContent"><c:out value="${user.createdDate}" 
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        <c:choose>
                                                                <c:when 
test="${not empty user.updatedDate}">
                                                                        <td 
align="center"><span class="dataContent"><c:out value="${user.updatedDate}" 
/></span></td>
                                                                </c:when>
                                                                <c:otherwise>
                                                                        <td 
align="center"><span class="dataContent"></span></td>
                                                                </c:otherwise>
                                                        </c:choose>
                                                        </tr>
                                </c:forEach>

                                <tr>
                                        <td colspan="6">
                                                <br>
                                        </td>
                                </tr>
                                <tr>
                                        <td colspan="6" align="left">
                                                <html:link 
action="/admin/selectUsers.do">Edit Selected Users</html:link>
                                        </td>
                                </tr>
                        </table>

                        <br>
                        <br>
                        <!-- Pagination -->
                        <center><ecustoms:pagenav 
hrefName="pagenavHref"/></center>

                </c:when>
        
                <c:otherwise>
                        <center><H1>No User Found.</H1></center>
                </c:otherwise>
        </c:choose>

</html-el:form>

</body>
</html:html>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to