>>>>> "Tuan" == Tuan H Le <[EMAIL PROTECTED]> writes:

    Tuan> -----Original Message-----
    Tuan> From: David M. Karr [mailto:dmkarr@;earthlink.net]
    Tuan> Sent: Sunday, October 20, 2002 12:45 PM

>>>>> "Tuan" == Tuan H Le <[EMAIL PROTECTED]> writes:

    Tuan> session.setAttribute( USER_EMPLOYEE_LIST_KEY, employeeList );
    Tuan> // Forward to the appropriate View
    Tuan> return ( mapping.findForward( target ) );

    Tuan> ********* My JSP page *********************************
    Tuan> <%
    Tuan> ArrayList employeeList = (ArrayList)session.getAttribute( 
IConstants.USER_EMPLOYEE_LIST_KEY );

    Tuan> <logic:present name="employeeList" scope="session">
    Tuan> <!-- Iterate over the results of the query -->
    Tuan> <logic:iterate name="employeeList" id="employee" scope="session" 
type="com.phs.ezhr.business.vo.EmployeeVO" indexId="idx">
    David> What is the value of "IConstants.USER_EMPLOYEE_LIST_KEY"?

    Tuan> Hi David,
    Tuan> Thanks for your response! 

    Tuan> IConstants.USER_EMPLOYEE_LIST_KEY is a string of value "com.xyz.key.USER". 
I'm not sure that's the issue, because the session.getAttribute returned a correct 
ArrayList object employeeList and the for loop works fine.

Read the API documentation for the "present" tag.  You'll find it says this
about the "name" attribute:

      Checks for the existence of a JSP bean, in any scope, with the specified name.

That means the key for the object in the table has to have that name.  In your
"logic:present" tag, you've referenced the name "employeeList", but you put it
into the table with a name of "com.xyz.key.USER".

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to