You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Miles <ch...@chrismiles.org> on 2010/06/25 22:51:05 UTC
Nested Iterator Problem
Hi
I am running a nested iterator as follows:
<s:iterator value="shippingDetails" var="individualDetail" status="stat">
<div class="confirmOrderShippingDetails">
<span><strong>Address <s:property value="#stat.index+1"/> of <s:property value="shippingDetails.size"/></strong></span>
<br/>
<br/>
<ul class="confirmOrderShippingDetailsAddress">
<li><s:property value="#individualDetail.firstName"/> <s:property value="#individualDetail.lastName"/></li>
<li><s:property value="#individualDetail.houseNumberName"/> <s:property value="#individualDetail.streetName"/></li>
<li><s:property value="#individualDetail.cityTown"/></li>
<li><s:property value="#individualDetail.districtCounty"/>, <s:property value="#individualDetail.postCode"/></li>
</ul>
<s:iterator value="#individualDetail.products" var="product">
<br/>
<ul class="confirmOrderShippingDetailsProduct">
<li><strong><s:property value="#product.name"/></strong></li>
<li><span class="confirmOrderShippingDetailsProductPrice">£<s:property value="#product.price"/></span></li>
</ul>
</s:iterator>
</div>
</s:iterator>
Rendering fails as soon as the second property (price) is called on the product. Price exists and just for testing purposes I tried to render the product name a second time instead and it still fails. Any more HTML which is to be displayed within that iterator never gets rendered and the parent iterator continues.
No errors being debugged anywhere.
I can not figure this out.
Thanks
Chris
Re: Nested Iterator Problem
Posted by Chris Miles <ch...@chrismiles.org>.
Hi,
Thanks. My action class is as follows. It is very basic. The confusion is
that I can call a property once but it fails as soon as I try to even call
the same property a second time. It is beyond reasoning.
Chris
package sentiments.struts2.checkout;
import sentiments.struts2.ShopAction;
import sentiments.business.service.ShopService;
import sentiments.business.domain.cart.Item;
import sentiments.business.domain.cart.Order;
import sentiments.business.domain.PersonalDetails;
import sentiments.business.domain.Product;
import javax.ejb.EJB;
import java.util.List;
import java.util.Calendar;
import java.util.ArrayList;
import com.opensymphony.xwork2.Action;
public class ProcessOrderAction extends ShopAction {
@EJB
private ShopService shopService;
private Order order;
private List<Item> items;
private List<PersonalDetails> shippingDetails;
public void prepare() throws Exception {
this.items = this.getCartMgr().getItems();
this.shippingDetails = buildUniqueShippingDetails();
attachItemsToShippingDetails();
}
private void attachItemsToShippingDetails() {
for (PersonalDetails shippingDetails : this.shippingDetails) {
List<Product> products = new ArrayList<Product>();
// For each item in the cart.
for (Item item : this.items) {
// If this item is being sent to that shipping address.
if (item.getShippingDetails().equals(shippingDetails)) {
products.add(item.getProduct());
}
}
// Attach the products.
shippingDetails.setProducts(products);
}
}
private List<PersonalDetails> buildUniqueShippingDetails() {
List<PersonalDetails> personalDetailses =
new ArrayList<PersonalDetails>();
for (Item item : this.items) {
PersonalDetails existingShippingDetails =
item.getShippingDetails();
if (existingShippingDetails != null
&& !personalDetailses.contains(existingShippingDetails))
{
personalDetailses.add(existingShippingDetails);
}
}
return personalDetailses;
}
public String confirmOrderDetails() throws Exception {
this.addActionMessage("Please confim your order. Once you place the
order payment will be taken.");
return Action.SUCCESS;
}
public Order getOrder() {
return order;
}
public void setOrder(Order order) {
this.order = order;
}
public List<Item> getItems() {
return items;
}
public void setItems(List<Item> items) {
this.items = items;
}
public List<PersonalDetails> getShippingDetails() {
return shippingDetails;
}
public void setShippingDetails(List<PersonalDetails> shippingDetails) {
this.shippingDetails = shippingDetails;
}
}
----- Original Message -----
From: "Ken" <ke...@aerose.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, July 01, 2010 10:46 PM
Subject: Re: Nested Iterator Problem
> His editor should be fine with Unicode... hmm, post your action bean.
>
> On Thu, 2010-07-01 at 14:30 -0700, Chris Pratt wrote:
>
>> On my screen it looks like there's a British pound sign in the text,
>> which I
>> believe is outside the ASCII characters set, I'm just wondering if that
>> could be causing the trouble. It's definitely something I've never tried
>> myself.
>> (*Chris*)
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Nested Iterator Problem
Posted by Ken <ke...@aerose.com>.
His editor should be fine with Unicode... hmm, post your action bean.
On Thu, 2010-07-01 at 14:30 -0700, Chris Pratt wrote:
> On my screen it looks like there's a British pound sign in the text, which I
> believe is outside the ASCII characters set, I'm just wondering if that
> could be causing the trouble. It's definitely something I've never tried
> myself.
> (*Chris*)
Re: Nested Iterator Problem
Posted by Chris Miles <ch...@chrismiles.org>.
Out of interest I tried the html character for the pound sign and it works
now.
Strange that would make it fail when the tag should not care about the HTML
content nested within it.
Chris
----- Original Message -----
From: "Chris Pratt" <th...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, July 01, 2010 10:30 PM
Subject: Re: Nested Iterator Problem
On my screen it looks like there's a British pound sign in the text, which I
believe is outside the ASCII characters set, I'm just wondering if that
could be causing the trouble. It's definitely something I've never tried
myself.
(*Chris*)
On Thu, Jul 1, 2010 at 2:14 PM, <ch...@chrismiles.org> wrote:
> Hi Chris. Thanks for responding. I can not see any invalid characters?
>
> Chris
>
> > Not sure but it looks like there's an invalid character in there. Could
> > that be fouling things up?
> > (*Chris*)
> >
> > On Thu, Jul 1, 2010 at 1:59 PM, Chris Miles <ch...@chrismiles.org>
> wrote:
> >
> >> Does anyone have any ideas? Tearing my hair out with this.
> >>
> >>
> >> Chris
> >>
> >> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
> >> To: "Struts Users Mailing List" <us...@struts.apache.org>
> >> Sent: Tuesday, June 29, 2010 9:47 PM
> >>
> >> Subject: Re: Nested Iterator Problem
> >>
> >>
> >> Is there anything else in the logging I can enable to try and find out
> >> why
> >>> this is not working? It is possibly an expression related issue? Would
> >>> it be
> >>> possible in the first iterator to assign the list to another
> >>> completely
> >>> seperate object to iterator? Or another solution? I have tried every
> >>> possible thing I can think of and drawing complete blanks.
> >>>
> >>> Chris
> >>>
> >>> ----- Original Message ----- From: "Chris Miles" <chris@chrismiles.org
> >
> >>> To: "Struts Users Mailing List" <us...@struts.apache.org>
> >>> Sent: Monday, June 28, 2010 9:13 PM
> >>> Subject: Re: Nested Iterator Problem
> >>>
> >>>
> >>> In the second Iterator I have just got
> >>>>
> >>>> <s:iterator value="#individualDetail.products" var="product">
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsProduct">
> >>>> <li><strong><s:property value="#product.name
> >>>> "/></strong></li>
> >>>> <li><s:property value="#product.name"/></li>
> >>>> </ul>
> >>>> </s:iterator>
> >>>>
> >>>>
> >>>> The resuling HTML looks like.
> >>>>
> >>>>
> >>>> <div class="confirmOrderShippingDetails">
> >>>> <span><strong>Address 1 of 1</strong></span>
> >>>> <br/>
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsAddress">
> >>>> <li>Chris Miles</li>
> >>>> <li>aaaa</li>
> >>>> <li>bbbb</li>
> >>>> <li>cccc</li>
> >>>> </ul>
> >>>>
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsProduct">
> >>>> <li><strong>This is a product name</strong></li>
> >>>> <li>
> >>>> </div>
> >>>>
> >>>> I am calling the same property twice so there is no reason it should
> >>>> fail
> >>>> but as you can see it bombs out right at the point where it should be
> >>>> displaying the property. The parent iterator continues as normal.
> >>>>
> >>>> I have set all Struts and XWork logging to DEBUG and there is no
> >>>> errors
> >>>> or warnings indicating a problem whatsoever.
> >>>>
> >>>> Thanks
> >>>>
> >>>> Chris
> >>>> ----- Original Message ----- From: "Chris Miles"
> >>>> <ch...@chrismiles.org>
> >>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
> >>>> Sent: Friday, June 25, 2010 9:51 PM
> >>>> Subject: Nested Iterator Problem
> >>>>
> >>>>
> >>>> Hi
> >>>>
> >>>> I am running a nested iterator as follows:
> >>>>
> >>>> <s:iterator value="shippingDetails" var="individualDetail"
> >>>> status="stat">
> >>>> <div class="confirmOrderShippingDetails">
> >>>> <span><strong>Address <s:property value="#stat.index+1"/> of
> >>>> <s:property value="shippingDetails.size"/></strong></span>
> >>>> <br/>
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsAddress">
> >>>> <li><s:property value="#individualDetail.firstName"/>
> >>>> <s:property value="#individualDetail.lastName"/></li>
> >>>> <li><s:property value="#individualDetail.houseNumberName"/>
> >>>> <s:property value="#individualDetail.streetName"/></li>
> >>>> <li><s:property value="#individualDetail.cityTown"/></li>
> >>>> <li><s:property value="#individualDetail.districtCounty"/>,
> >>>> <s:property value="#individualDetail.postCode"/></li>
> >>>> </ul>
> >>>> <s:iterator value="#individualDetail.products" var="product">
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsProduct">
> >>>> <li><strong><s:property value="#product.name
> >>>> "/></strong></li>
> >>>> <li><span
> >>>> class="confirmOrderShippingDetailsProductPrice">Ł<s:property
> >>>> value="#product.price"/></span></li>
> >>>> </ul>
> >>>> </s:iterator>
> >>>> </div>
> >>>> </s:iterator>
> >>>>
> >>>> Rendering fails as soon as the second property (price) is called on
> >>>> the
> >>>> product. Price exists and just for testing purposes I tried to render
> >>>> the
> >>>> product name a second time instead and it still fails. Any more HTML
> >>>> which
> >>>> is to be displayed within that iterator never gets rendered and the
> >>>> parent
> >>>> iterator continues.
> >>>>
> >>>> No errors being debugged anywhere.
> >>>>
> >>>> I can not figure this out.
> >>>>
> >>>> Thanks
> >>>>
> >>>> Chris
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Nested Iterator Problem
Posted by Chris Pratt <th...@gmail.com>.
On my screen it looks like there's a British pound sign in the text, which I
believe is outside the ASCII characters set, I'm just wondering if that
could be causing the trouble. It's definitely something I've never tried
myself.
(*Chris*)
On Thu, Jul 1, 2010 at 2:14 PM, <ch...@chrismiles.org> wrote:
> Hi Chris. Thanks for responding. I can not see any invalid characters?
>
> Chris
>
> > Not sure but it looks like there's an invalid character in there. Could
> > that be fouling things up?
> > (*Chris*)
> >
> > On Thu, Jul 1, 2010 at 1:59 PM, Chris Miles <ch...@chrismiles.org>
> wrote:
> >
> >> Does anyone have any ideas? Tearing my hair out with this.
> >>
> >>
> >> Chris
> >>
> >> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
> >> To: "Struts Users Mailing List" <us...@struts.apache.org>
> >> Sent: Tuesday, June 29, 2010 9:47 PM
> >>
> >> Subject: Re: Nested Iterator Problem
> >>
> >>
> >> Is there anything else in the logging I can enable to try and find out
> >> why
> >>> this is not working? It is possibly an expression related issue? Would
> >>> it be
> >>> possible in the first iterator to assign the list to another completely
> >>> seperate object to iterator? Or another solution? I have tried every
> >>> possible thing I can think of and drawing complete blanks.
> >>>
> >>> Chris
> >>>
> >>> ----- Original Message ----- From: "Chris Miles" <chris@chrismiles.org
> >
> >>> To: "Struts Users Mailing List" <us...@struts.apache.org>
> >>> Sent: Monday, June 28, 2010 9:13 PM
> >>> Subject: Re: Nested Iterator Problem
> >>>
> >>>
> >>> In the second Iterator I have just got
> >>>>
> >>>> <s:iterator value="#individualDetail.products" var="product">
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsProduct">
> >>>> <li><strong><s:property value="#product.name
> >>>> "/></strong></li>
> >>>> <li><s:property value="#product.name"/></li>
> >>>> </ul>
> >>>> </s:iterator>
> >>>>
> >>>>
> >>>> The resuling HTML looks like.
> >>>>
> >>>>
> >>>> <div class="confirmOrderShippingDetails">
> >>>> <span><strong>Address 1 of 1</strong></span>
> >>>> <br/>
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsAddress">
> >>>> <li>Chris Miles</li>
> >>>> <li>aaaa</li>
> >>>> <li>bbbb</li>
> >>>> <li>cccc</li>
> >>>> </ul>
> >>>>
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsProduct">
> >>>> <li><strong>This is a product name</strong></li>
> >>>> <li>
> >>>> </div>
> >>>>
> >>>> I am calling the same property twice so there is no reason it should
> >>>> fail
> >>>> but as you can see it bombs out right at the point where it should be
> >>>> displaying the property. The parent iterator continues as normal.
> >>>>
> >>>> I have set all Struts and XWork logging to DEBUG and there is no
> >>>> errors
> >>>> or warnings indicating a problem whatsoever.
> >>>>
> >>>> Thanks
> >>>>
> >>>> Chris
> >>>> ----- Original Message ----- From: "Chris Miles"
> >>>> <ch...@chrismiles.org>
> >>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
> >>>> Sent: Friday, June 25, 2010 9:51 PM
> >>>> Subject: Nested Iterator Problem
> >>>>
> >>>>
> >>>> Hi
> >>>>
> >>>> I am running a nested iterator as follows:
> >>>>
> >>>> <s:iterator value="shippingDetails" var="individualDetail"
> >>>> status="stat">
> >>>> <div class="confirmOrderShippingDetails">
> >>>> <span><strong>Address <s:property value="#stat.index+1"/> of
> >>>> <s:property value="shippingDetails.size"/></strong></span>
> >>>> <br/>
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsAddress">
> >>>> <li><s:property value="#individualDetail.firstName"/>
> >>>> <s:property value="#individualDetail.lastName"/></li>
> >>>> <li><s:property value="#individualDetail.houseNumberName"/>
> >>>> <s:property value="#individualDetail.streetName"/></li>
> >>>> <li><s:property value="#individualDetail.cityTown"/></li>
> >>>> <li><s:property value="#individualDetail.districtCounty"/>,
> >>>> <s:property value="#individualDetail.postCode"/></li>
> >>>> </ul>
> >>>> <s:iterator value="#individualDetail.products" var="product">
> >>>> <br/>
> >>>> <ul class="confirmOrderShippingDetailsProduct">
> >>>> <li><strong><s:property value="#product.name
> >>>> "/></strong></li>
> >>>> <li><span
> >>>> class="confirmOrderShippingDetailsProductPrice">Ł<s:property
> >>>> value="#product.price"/></span></li>
> >>>> </ul>
> >>>> </s:iterator>
> >>>> </div>
> >>>> </s:iterator>
> >>>>
> >>>> Rendering fails as soon as the second property (price) is called on
> >>>> the
> >>>> product. Price exists and just for testing purposes I tried to render
> >>>> the
> >>>> product name a second time instead and it still fails. Any more HTML
> >>>> which
> >>>> is to be displayed within that iterator never gets rendered and the
> >>>> parent
> >>>> iterator continues.
> >>>>
> >>>> No errors being debugged anywhere.
> >>>>
> >>>> I can not figure this out.
> >>>>
> >>>> Thanks
> >>>>
> >>>> Chris
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Nested Iterator Problem
Posted by ch...@chrismiles.org.
Hi Chris. Thanks for responding. I can not see any invalid characters?
Chris
> Not sure but it looks like there's an invalid character in there. Could
> that be fouling things up?
> (*Chris*)
>
> On Thu, Jul 1, 2010 at 1:59 PM, Chris Miles <ch...@chrismiles.org> wrote:
>
>> Does anyone have any ideas? Tearing my hair out with this.
>>
>>
>> Chris
>>
>> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Sent: Tuesday, June 29, 2010 9:47 PM
>>
>> Subject: Re: Nested Iterator Problem
>>
>>
>> Is there anything else in the logging I can enable to try and find out
>> why
>>> this is not working? It is possibly an expression related issue? Would
>>> it be
>>> possible in the first iterator to assign the list to another completely
>>> seperate object to iterator? Or another solution? I have tried every
>>> possible thing I can think of and drawing complete blanks.
>>>
>>> Chris
>>>
>>> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>>> Sent: Monday, June 28, 2010 9:13 PM
>>> Subject: Re: Nested Iterator Problem
>>>
>>>
>>> In the second Iterator I have just got
>>>>
>>>> <s:iterator value="#individualDetail.products" var="product">
>>>> <br/>
>>>> <ul class="confirmOrderShippingDetailsProduct">
>>>> <li><strong><s:property value="#product.name
>>>> "/></strong></li>
>>>> <li><s:property value="#product.name"/></li>
>>>> </ul>
>>>> </s:iterator>
>>>>
>>>>
>>>> The resuling HTML looks like.
>>>>
>>>>
>>>> <div class="confirmOrderShippingDetails">
>>>> <span><strong>Address 1 of 1</strong></span>
>>>> <br/>
>>>> <br/>
>>>> <ul class="confirmOrderShippingDetailsAddress">
>>>> <li>Chris Miles</li>
>>>> <li>aaaa</li>
>>>> <li>bbbb</li>
>>>> <li>cccc</li>
>>>> </ul>
>>>>
>>>> <br/>
>>>> <ul class="confirmOrderShippingDetailsProduct">
>>>> <li><strong>This is a product name</strong></li>
>>>> <li>
>>>> </div>
>>>>
>>>> I am calling the same property twice so there is no reason it should
>>>> fail
>>>> but as you can see it bombs out right at the point where it should be
>>>> displaying the property. The parent iterator continues as normal.
>>>>
>>>> I have set all Struts and XWork logging to DEBUG and there is no
>>>> errors
>>>> or warnings indicating a problem whatsoever.
>>>>
>>>> Thanks
>>>>
>>>> Chris
>>>> ----- Original Message ----- From: "Chris Miles"
>>>> <ch...@chrismiles.org>
>>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>>>> Sent: Friday, June 25, 2010 9:51 PM
>>>> Subject: Nested Iterator Problem
>>>>
>>>>
>>>> Hi
>>>>
>>>> I am running a nested iterator as follows:
>>>>
>>>> <s:iterator value="shippingDetails" var="individualDetail"
>>>> status="stat">
>>>> <div class="confirmOrderShippingDetails">
>>>> <span><strong>Address <s:property value="#stat.index+1"/> of
>>>> <s:property value="shippingDetails.size"/></strong></span>
>>>> <br/>
>>>> <br/>
>>>> <ul class="confirmOrderShippingDetailsAddress">
>>>> <li><s:property value="#individualDetail.firstName"/>
>>>> <s:property value="#individualDetail.lastName"/></li>
>>>> <li><s:property value="#individualDetail.houseNumberName"/>
>>>> <s:property value="#individualDetail.streetName"/></li>
>>>> <li><s:property value="#individualDetail.cityTown"/></li>
>>>> <li><s:property value="#individualDetail.districtCounty"/>,
>>>> <s:property value="#individualDetail.postCode"/></li>
>>>> </ul>
>>>> <s:iterator value="#individualDetail.products" var="product">
>>>> <br/>
>>>> <ul class="confirmOrderShippingDetailsProduct">
>>>> <li><strong><s:property value="#product.name
>>>> "/></strong></li>
>>>> <li><span
>>>> class="confirmOrderShippingDetailsProductPrice">£<s:property
>>>> value="#product.price"/></span></li>
>>>> </ul>
>>>> </s:iterator>
>>>> </div>
>>>> </s:iterator>
>>>>
>>>> Rendering fails as soon as the second property (price) is called on
>>>> the
>>>> product. Price exists and just for testing purposes I tried to render
>>>> the
>>>> product name a second time instead and it still fails. Any more HTML
>>>> which
>>>> is to be displayed within that iterator never gets rendered and the
>>>> parent
>>>> iterator continues.
>>>>
>>>> No errors being debugged anywhere.
>>>>
>>>> I can not figure this out.
>>>>
>>>> Thanks
>>>>
>>>> Chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Nested Iterator Problem
Posted by Chris Pratt <th...@gmail.com>.
Not sure but it looks like there's an invalid character in there. Could
that be fouling things up?
(*Chris*)
On Thu, Jul 1, 2010 at 1:59 PM, Chris Miles <ch...@chrismiles.org> wrote:
> Does anyone have any ideas? Tearing my hair out with this.
>
>
> Chris
>
> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Tuesday, June 29, 2010 9:47 PM
>
> Subject: Re: Nested Iterator Problem
>
>
> Is there anything else in the logging I can enable to try and find out why
>> this is not working? It is possibly an expression related issue? Would it be
>> possible in the first iterator to assign the list to another completely
>> seperate object to iterator? Or another solution? I have tried every
>> possible thing I can think of and drawing complete blanks.
>>
>> Chris
>>
>> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Sent: Monday, June 28, 2010 9:13 PM
>> Subject: Re: Nested Iterator Problem
>>
>>
>> In the second Iterator I have just got
>>>
>>> <s:iterator value="#individualDetail.products" var="product">
>>> <br/>
>>> <ul class="confirmOrderShippingDetailsProduct">
>>> <li><strong><s:property value="#product.name
>>> "/></strong></li>
>>> <li><s:property value="#product.name"/></li>
>>> </ul>
>>> </s:iterator>
>>>
>>>
>>> The resuling HTML looks like.
>>>
>>>
>>> <div class="confirmOrderShippingDetails">
>>> <span><strong>Address 1 of 1</strong></span>
>>> <br/>
>>> <br/>
>>> <ul class="confirmOrderShippingDetailsAddress">
>>> <li>Chris Miles</li>
>>> <li>aaaa</li>
>>> <li>bbbb</li>
>>> <li>cccc</li>
>>> </ul>
>>>
>>> <br/>
>>> <ul class="confirmOrderShippingDetailsProduct">
>>> <li><strong>This is a product name</strong></li>
>>> <li>
>>> </div>
>>>
>>> I am calling the same property twice so there is no reason it should fail
>>> but as you can see it bombs out right at the point where it should be
>>> displaying the property. The parent iterator continues as normal.
>>>
>>> I have set all Struts and XWork logging to DEBUG and there is no errors
>>> or warnings indicating a problem whatsoever.
>>>
>>> Thanks
>>>
>>> Chris
>>> ----- Original Message ----- From: "Chris Miles" <ch...@chrismiles.org>
>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>>> Sent: Friday, June 25, 2010 9:51 PM
>>> Subject: Nested Iterator Problem
>>>
>>>
>>> Hi
>>>
>>> I am running a nested iterator as follows:
>>>
>>> <s:iterator value="shippingDetails" var="individualDetail" status="stat">
>>> <div class="confirmOrderShippingDetails">
>>> <span><strong>Address <s:property value="#stat.index+1"/> of
>>> <s:property value="shippingDetails.size"/></strong></span>
>>> <br/>
>>> <br/>
>>> <ul class="confirmOrderShippingDetailsAddress">
>>> <li><s:property value="#individualDetail.firstName"/>
>>> <s:property value="#individualDetail.lastName"/></li>
>>> <li><s:property value="#individualDetail.houseNumberName"/>
>>> <s:property value="#individualDetail.streetName"/></li>
>>> <li><s:property value="#individualDetail.cityTown"/></li>
>>> <li><s:property value="#individualDetail.districtCounty"/>,
>>> <s:property value="#individualDetail.postCode"/></li>
>>> </ul>
>>> <s:iterator value="#individualDetail.products" var="product">
>>> <br/>
>>> <ul class="confirmOrderShippingDetailsProduct">
>>> <li><strong><s:property value="#product.name
>>> "/></strong></li>
>>> <li><span
>>> class="confirmOrderShippingDetailsProductPrice">£<s:property
>>> value="#product.price"/></span></li>
>>> </ul>
>>> </s:iterator>
>>> </div>
>>> </s:iterator>
>>>
>>> Rendering fails as soon as the second property (price) is called on the
>>> product. Price exists and just for testing purposes I tried to render the
>>> product name a second time instead and it still fails. Any more HTML which
>>> is to be displayed within that iterator never gets rendered and the parent
>>> iterator continues.
>>>
>>> No errors being debugged anywhere.
>>>
>>> I can not figure this out.
>>>
>>> Thanks
>>>
>>> Chris
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Nested Iterator Problem
Posted by Chris Miles <ch...@chrismiles.org>.
Does anyone have any ideas? Tearing my hair out with this.
Chris
----- Original Message -----
From: "Chris Miles" <ch...@chrismiles.org>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, June 29, 2010 9:47 PM
Subject: Re: Nested Iterator Problem
> Is there anything else in the logging I can enable to try and find out why
> this is not working? It is possibly an expression related issue? Would it
> be possible in the first iterator to assign the list to another completely
> seperate object to iterator? Or another solution? I have tried every
> possible thing I can think of and drawing complete blanks.
>
> Chris
>
> ----- Original Message -----
> From: "Chris Miles" <ch...@chrismiles.org>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, June 28, 2010 9:13 PM
> Subject: Re: Nested Iterator Problem
>
>
>> In the second Iterator I have just got
>>
>> <s:iterator value="#individualDetail.products" var="product">
>> <br/>
>> <ul class="confirmOrderShippingDetailsProduct">
>> <li><strong><s:property
>> value="#product.name"/></strong></li>
>> <li><s:property value="#product.name"/></li>
>> </ul>
>> </s:iterator>
>>
>>
>> The resuling HTML looks like.
>>
>>
>> <div class="confirmOrderShippingDetails">
>> <span><strong>Address 1 of 1</strong></span>
>> <br/>
>> <br/>
>> <ul class="confirmOrderShippingDetailsAddress">
>> <li>Chris Miles</li>
>> <li>aaaa</li>
>> <li>bbbb</li>
>> <li>cccc</li>
>> </ul>
>>
>> <br/>
>> <ul class="confirmOrderShippingDetailsProduct">
>> <li><strong>This is a product name</strong></li>
>> <li>
>> </div>
>>
>> I am calling the same property twice so there is no reason it should fail
>> but as you can see it bombs out right at the point where it should be
>> displaying the property. The parent iterator continues as normal.
>>
>> I have set all Struts and XWork logging to DEBUG and there is no errors
>> or warnings indicating a problem whatsoever.
>>
>> Thanks
>>
>> Chris
>> ----- Original Message -----
>> From: "Chris Miles" <ch...@chrismiles.org>
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Sent: Friday, June 25, 2010 9:51 PM
>> Subject: Nested Iterator Problem
>>
>>
>> Hi
>>
>> I am running a nested iterator as follows:
>>
>> <s:iterator value="shippingDetails" var="individualDetail" status="stat">
>> <div class="confirmOrderShippingDetails">
>> <span><strong>Address <s:property value="#stat.index+1"/> of
>> <s:property value="shippingDetails.size"/></strong></span>
>> <br/>
>> <br/>
>> <ul class="confirmOrderShippingDetailsAddress">
>> <li><s:property value="#individualDetail.firstName"/>
>> <s:property value="#individualDetail.lastName"/></li>
>> <li><s:property value="#individualDetail.houseNumberName"/>
>> <s:property value="#individualDetail.streetName"/></li>
>> <li><s:property value="#individualDetail.cityTown"/></li>
>> <li><s:property value="#individualDetail.districtCounty"/>,
>> <s:property value="#individualDetail.postCode"/></li>
>> </ul>
>> <s:iterator value="#individualDetail.products" var="product">
>> <br/>
>> <ul class="confirmOrderShippingDetailsProduct">
>> <li><strong><s:property
>> value="#product.name"/></strong></li>
>> <li><span
>> class="confirmOrderShippingDetailsProductPrice">£<s:property
>> value="#product.price"/></span></li>
>> </ul>
>> </s:iterator>
>> </div>
>> </s:iterator>
>>
>> Rendering fails as soon as the second property (price) is called on the
>> product. Price exists and just for testing purposes I tried to render the
>> product name a second time instead and it still fails. Any more HTML
>> which is to be displayed within that iterator never gets rendered and the
>> parent iterator continues.
>>
>> No errors being debugged anywhere.
>>
>> I can not figure this out.
>>
>> Thanks
>>
>> Chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Nested Iterator Problem
Posted by Chris Miles <ch...@chrismiles.org>.
Is there anything else in the logging I can enable to try and find out why
this is not working? It is possibly an expression related issue? Would it be
possible in the first iterator to assign the list to another completely
seperate object to iterator? Or another solution? I have tried every
possible thing I can think of and drawing complete blanks.
Chris
----- Original Message -----
From: "Chris Miles" <ch...@chrismiles.org>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, June 28, 2010 9:13 PM
Subject: Re: Nested Iterator Problem
> In the second Iterator I have just got
>
> <s:iterator value="#individualDetail.products" var="product">
> <br/>
> <ul class="confirmOrderShippingDetailsProduct">
> <li><strong><s:property
> value="#product.name"/></strong></li>
> <li><s:property value="#product.name"/></li>
> </ul>
> </s:iterator>
>
>
> The resuling HTML looks like.
>
>
> <div class="confirmOrderShippingDetails">
> <span><strong>Address 1 of 1</strong></span>
> <br/>
> <br/>
> <ul class="confirmOrderShippingDetailsAddress">
> <li>Chris Miles</li>
> <li>aaaa</li>
> <li>bbbb</li>
> <li>cccc</li>
> </ul>
>
> <br/>
> <ul class="confirmOrderShippingDetailsProduct">
> <li><strong>This is a product name</strong></li>
> <li>
> </div>
>
> I am calling the same property twice so there is no reason it should fail
> but as you can see it bombs out right at the point where it should be
> displaying the property. The parent iterator continues as normal.
>
> I have set all Struts and XWork logging to DEBUG and there is no errors or
> warnings indicating a problem whatsoever.
>
> Thanks
>
> Chris
> ----- Original Message -----
> From: "Chris Miles" <ch...@chrismiles.org>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Friday, June 25, 2010 9:51 PM
> Subject: Nested Iterator Problem
>
>
> Hi
>
> I am running a nested iterator as follows:
>
> <s:iterator value="shippingDetails" var="individualDetail" status="stat">
> <div class="confirmOrderShippingDetails">
> <span><strong>Address <s:property value="#stat.index+1"/> of
> <s:property value="shippingDetails.size"/></strong></span>
> <br/>
> <br/>
> <ul class="confirmOrderShippingDetailsAddress">
> <li><s:property value="#individualDetail.firstName"/>
> <s:property value="#individualDetail.lastName"/></li>
> <li><s:property value="#individualDetail.houseNumberName"/>
> <s:property value="#individualDetail.streetName"/></li>
> <li><s:property value="#individualDetail.cityTown"/></li>
> <li><s:property value="#individualDetail.districtCounty"/>,
> <s:property value="#individualDetail.postCode"/></li>
> </ul>
> <s:iterator value="#individualDetail.products" var="product">
> <br/>
> <ul class="confirmOrderShippingDetailsProduct">
> <li><strong><s:property
> value="#product.name"/></strong></li>
> <li><span
> class="confirmOrderShippingDetailsProductPrice">£<s:property
> value="#product.price"/></span></li>
> </ul>
> </s:iterator>
> </div>
> </s:iterator>
>
> Rendering fails as soon as the second property (price) is called on the
> product. Price exists and just for testing purposes I tried to render the
> product name a second time instead and it still fails. Any more HTML which
> is to be displayed within that iterator never gets rendered and the parent
> iterator continues.
>
> No errors being debugged anywhere.
>
> I can not figure this out.
>
> Thanks
>
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Nested Iterator Problem
Posted by Chris Miles <ch...@chrismiles.org>.
In the second Iterator I have just got
<s:iterator value="#individualDetail.products" var="product">
<br/>
<ul class="confirmOrderShippingDetailsProduct">
<li><strong><s:property
value="#product.name"/></strong></li>
<li><s:property value="#product.name"/></li>
</ul>
</s:iterator>
The resuling HTML looks like.
<div class="confirmOrderShippingDetails">
<span><strong>Address 1 of 1</strong></span>
<br/>
<br/>
<ul class="confirmOrderShippingDetailsAddress">
<li>Chris Miles</li>
<li>aaaa</li>
<li>bbbb</li>
<li>cccc</li>
</ul>
<br/>
<ul class="confirmOrderShippingDetailsProduct">
<li><strong>This is a product name</strong></li>
<li>
</div>
I am calling the same property twice so there is no reason it should fail
but as you can see it bombs out right at the point where it should be
displaying the property. The parent iterator continues as normal.
I have set all Struts and XWork logging to DEBUG and there is no errors or
warnings indicating a problem whatsoever.
Thanks
Chris
----- Original Message -----
From: "Chris Miles" <ch...@chrismiles.org>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, June 25, 2010 9:51 PM
Subject: Nested Iterator Problem
Hi
I am running a nested iterator as follows:
<s:iterator value="shippingDetails" var="individualDetail" status="stat">
<div class="confirmOrderShippingDetails">
<span><strong>Address <s:property value="#stat.index+1"/> of
<s:property value="shippingDetails.size"/></strong></span>
<br/>
<br/>
<ul class="confirmOrderShippingDetailsAddress">
<li><s:property value="#individualDetail.firstName"/>
<s:property value="#individualDetail.lastName"/></li>
<li><s:property value="#individualDetail.houseNumberName"/>
<s:property value="#individualDetail.streetName"/></li>
<li><s:property value="#individualDetail.cityTown"/></li>
<li><s:property value="#individualDetail.districtCounty"/>,
<s:property value="#individualDetail.postCode"/></li>
</ul>
<s:iterator value="#individualDetail.products" var="product">
<br/>
<ul class="confirmOrderShippingDetailsProduct">
<li><strong><s:property
value="#product.name"/></strong></li>
<li><span
class="confirmOrderShippingDetailsProductPrice">£<s:property
value="#product.price"/></span></li>
</ul>
</s:iterator>
</div>
</s:iterator>
Rendering fails as soon as the second property (price) is called on the
product. Price exists and just for testing purposes I tried to render the
product name a second time instead and it still fails. Any more HTML which
is to be displayed within that iterator never gets rendered and the parent
iterator continues.
No errors being debugged anywhere.
I can not figure this out.
Thanks
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org