Hi,

I've found a rather strange behaviour of the nested tag and I wonder if it's 
my fault or a bug.
I've a data-struture that looks like this:

[{'total': '2',
  'stati': [
             {'status': 100, 'count': '1'}, 
             {'status': 200, 'count': '1'}
           ]
 }, 
 {'total': '1', 
  'stati': [
             {'status': 100, 'count': '1'}
           ]
 }
]

A list of hashes where each element contains a list of hashes.
The above structure is saved in the form-bean 
as a property named data. When I iterate over this with nested:iterate in my 
jsp I get the error that stati[0] is a null value (which is not true):

                <nested:iterate property="data">
                        <tr>
                                <td><nested:write property="total"/></td>
                                <nested:iterate property="stati">
                                        <td>
                                        <nested:write property="count"/>
                                        </td>
                                </nested:iterate>
                        </tr>
                </nested:iterate>

However, the following works as expected:

                <nested:iterate property="data">
                        <tr>
                                <td><nested:write property="total"/></td>
                                <nested:iterate id="current" property="stati">
                                        <td>
                                        <bean:write name="current" 
property="count"/>
                                        </td>
                                </nested:iterate>
                        </tr>
                </nested:iterate>

I don't really understand this. Any help?

-- 
Dipl. Inf. (FH) Heiko Stoermer                               
Project Manager                                     Login & Solutions AG
[EMAIL PROTECTED]          http://www.login-solutions.de


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

Reply via email to