Hm...maybe it is a problem beacuse of Set (not List) ?
--
Milan
Milan Milanovic wrote:
>
> I really don't understand what do you need more ?
>
> For this:
>
> <s:param value="#session.order.orderList[#rowstatus.index].price"/>
>
> I have:
>
> class Order {
>
> Set<OrderElement> orderList = new java.util.TreeSet<....
>
> // get/set methods exists for this orderList
>
> }
>
> class OrderElement {
>
> BigDecimal price;
>
> // get/set methods exists for price
> }
>
> I have filled this element and put it in session, and as I get 5 when call
> "size" it is there, but I cannot access every element in collection with
> above syntax in Struts 2.0.11.1.
>
> I also tested order.orderList with logging before showing jsp, and I have
> those elements, and every element have a price!
>
> --
> Milan
>
>
> newton.dave wrote:
>>
>> Without knowing what the data is you're using there's no way to be of any
>> further assistance.
>>
>> If the backing data is there the syntax provided (and IIRC Stephan was
>> also able to use), AFAICT, works fine. Without knowing the differences
>> between my code, which works fine, and yours, there's not much else to
>> say.
>>
>> Dave
>>
>> --- On Tue, 8/26/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
>>
>>> From: Milan Milanovic <[EMAIL PROTECTED]>
>>> Subject: Re: [S2] Iterate through two lists
>>> To: [email protected]
>>> Date: Tuesday, August 26, 2008, 11:13 AM
>>> Dear Dave,
>>>
>>> I tried everything nad I always got null values. I think
>>> that I have similar
>>> problem as here:
>>> http://www.nabble.com/More-OGNL-Woes-td18877994.html
>>> http://www.nabble.com/More-OGNL-Woes-td18877994.html ,
>>> altough without
>>> importing. I tried all of these syntax and it doesn't
>>> work, I tried even
>>> without params' "name" attribute.
>>>
>>> I'm stuck here with my project for days now :-((((((.
>>>
>>> --
>>> Milan
>>>
>>>
>>>
>>> newton.dave wrote:
>>> >
>>> > ...
>>> >
>>> > I already knew the JSP that was causing the error.
>>> >
>>> > Dave
>>> >
>>> > --- On Mon, 8/25/08, Milan Milanovic
>>> <[EMAIL PROTECTED]> wrote:
>>> >
>>> >> From: Milan Milanovic
>>> <[EMAIL PROTECTED]>
>>> >> Subject: Re: [S2] Iterate through two lists
>>> >> To: [email protected]
>>> >> Date: Monday, August 25, 2008, 1:10 PM
>>> >> Hi Dave,
>>> >>
>>> >> here is complete jsp:
>>> >>
>>> >> <s:iterator
>>> value="activeOrder.orderList"
>>> >> status="rowstatus">
>>> >> <tr id="row_<s:property
>>> >> value="reference"/>"
>>> >> class="odd">
>>> >> <td>
>>> >> <s:text name="order.ref" >
>>> >> <s:param name="value"
>>> >> value="reference"/> <- THIS WORKS
>>> >> </s:text>
>>> >>
>>> >> </td>
>>> >> <s:if test="#session.order !=
>>> null">
>>> >> <- order in session is
>>> >> recognized
>>> >> <td>
>>> >> <s:text name="order.price" >
>>> >> <s:param name="value"
>>> >>
>>> value="#session.order.orderList[#rowstatus.index].price"/>
>>> >> <- null values
>>> >> </s:text>
>>> >> </td>
>>> >> </s:if>
>>> >> <td>
>>> >> <s:text name="order.price" >
>>> >> <s:param name="value"
>>> >> value="price"/> <- HERE IT WORKS,
>>> from
>>> >> activeOrder.
>>> >> </s:text>
>>> >> </td>
>>> >> </tr>
>>> >> </s:iterator>
>>> >>
>>> >> I checked many times if I have orderList in my
>>> session and
>>> >> I have orderList
>>> >> in it filled.
>>> >>
>>> >> --
>>> >> Milan
>>> >>
>>> >>
>>> >> newton.dave wrote:
>>> >> >
>>> >> > --- On Mon, 8/25/08, Milan Milanovic wrote:
>>> >> >> <s:if test="#session.order !=
>>> >> null">
>>> >> >> <- HERE IT WORKS (order is recognized
>>> >> >> in session)!!
>>> >> >> <td>
>>> >> >> <s:text
>>> name="order.price"
>>> >> >
>>> >> >> <s:param
>>> >> name="value"
>>> >> >>
>>> >>
>>> value="#session.order.orderList[#rowstatus.index].price"/>
>>> >> >> <- HERE IT
>>> >> >> DOESN'T WORK - null value!
>>> >> >> </s:text>
>>> >> >> </td>
>>> >> >> </s:if>
>>> >> >
>>> >> > "IT" is two *entirely different
>>> >> expressions*, and you continue to provide
>>> >> > no additional information that might be
>>> usable to
>>> >> solve the problem. It's
>>> >> > not an OGNL syntax issue. If you want more
>>> help,
>>> >> provide more details.
>>> >> >
>>> >> > (IIRC I also didn't use
>>> <s:param...>'s
>>> >> "name" attribute; I don't think
>>> >> > it's necessary, although I don't know
>>> if the
>>> >> presence of it will cause the
>>> >> > message to be parameterized incorrectly.)
>>> >> >
>>> >> > Dave
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> ---------------------------------------------------------------------
>>> >> > To unsubscribe, e-mail:
>>> >> [EMAIL PROTECTED]
>>> >> > For additional commands, e-mail:
>>> >> [EMAIL PROTECTED]
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/-S2--Iterate-through-two-lists-tp19052842p19147809.html
>>> >> Sent from the Struts - User mailing list archive
>>> at
>>> >> Nabble.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]
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-S2--Iterate-through-two-lists-tp19052842p19164005.html
>>> Sent from the Struts - User mailing list archive at
>>> Nabble.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]
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/-S2--Iterate-through-two-lists-tp19052842p19165640.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]