Skip to Content
0
Former Member
Oct 19, 2016 at 11:47 AM

how to delete entry from cartmdodel ?

128 Views

here is my code: final CartData cartData = sparCartFacade.getSessionCartWithEntryOrdering(true); List datalist = null; if (cartData.getEntries() != null && !cartData.getEntries().isEmpty()) { datalist = new ArrayList(cartData.getEntries());

         //final java.util.Iterator<OrderEntryData> i = datalist.iterator();
         for (final java.util.Iterator<OrderEntryData> i = datalist.iterator(); i.hasNext();)
         {
             final OrderEntryData entry = i.next();

             final ArticleApprovalStatus aps = entry.getProduct().getArticleApprovalStatus();

             if (ArticleApprovalStatus.UNAPPROVED.equals(aps))

             {
                 i.remove();
                 
                 **cartService.getSessionCart().modelService.remove(arg0);**

                 modelService.refresh(cartModel);

how to pass value for arg0